Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Jim Bauwens

Pages: 1 ... 7 8 [9] 10 11 ... 125
121
News / Re: Mini vMac for the TI-Nspire
« on: July 31, 2013, 02:45:55 pm »
Hmm, very strange. Are you running any other Ndless program that possibly could cause this misbehavior? Or do you have a very full device? Also, did you put the files in the correct directory (I assume you did, but you never know) ?

122
News / Re: Mini vMac for the TI-Nspire
« on: July 31, 2013, 01:26:01 pm »
Hmm, Mini vMac is compiled with the r6xx branch, maybe that some change is causing the issue. If possible could you try with an older version of Ndless? I don't have the setup at the moment to recompile and test under r866.

123
News / Re: Mini vMac for the TI-Nspire
« on: July 31, 2013, 01:12:36 pm »
Hmm, I've successfully used in on a touchpad. What version of Ndless are you using?

124
Site Feedback and Questions / Unsecure bb code video blocks
« on: July 29, 2013, 06:45:06 am »
As I demostrated here, http://ourl.ca/19304, you can easily manipulate the URL that gets loaded inside the vimeo player (just an iframe). Although you're still limited to the player.vimeo.com domain (you can load any site on that domain) I think here should be some added protections. The same issue with Nico video player, you can load any JS script from the ext.nicovideo.jp domain. While this still is very restricted, it's important to remember that if Vimeo or Nico change something on their website, those stuff might be used to exploit stuff here.

125
Humour and Jokes / This is amazing
« on: July 29, 2013, 06:03:30 am »
[vimeo]20241459?autoplay=1[/vimeo]

(autoplaying video)
Don't you agree :)

126
Miscellaneous / Re: My Little Pony: Friendship is Magic
« on: July 29, 2013, 04:36:26 am »
Sure. I believe you.
Don't worry, I'll figure something out. You'll not be skipped.


127
Miscellaneous / Re: My little Jim Bauwens: Winning the game is magic
« on: July 28, 2013, 03:26:24 pm »
What happened to the topic of this channel....

128
As far as I can see, the TI-Nspire line is the succesor for the 68k line. The mathematical engine is a direct continuation of their code base. So I don't think you can expect a color 68k calc, as that's what the CX actually is.

129
Lua / Re: Creating/formating an evaluated Math Box from Lua script?
« on: July 26, 2013, 10:53:32 am »
Sorry for the late reply. I don't think it's possible. The sizes are actually 'parameters' for the 1word, 1title, etc commands, but as we can't supply commands using the \keyword syntax it isn't possible.

130
Lua / Re: Lua Q&A
« on: July 26, 2013, 08:04:41 am »
Well, here is an other example, hope it's a bit more clear.

So, lets say you have a car driving game and all the cars should have their own set of attributes. Managing this using classes is very easy, you start by creating your Car class, basically a prototype of your car or if said in another way, the mold you use to create all your cars.

Code: [Select]
Car = class()
function Car:init(model)
  self.model = model or "LuaCar"
  self.distance = 0
end

function Car:drive(d)
  self.distance = self.distance + d
  print(self.model .. " just drove " .. d .. " km")
end

function Car:totalDistance()
  print(self.model .. " drove " .. self.distance .. " km in total")
end

So, that's our class. Now a Car has two properties, a model name and a distance. Now lets make some Car objects and play with them.

Code: [Select]
myCar1 = Car("Fiat Ducato")
myCar2 = Car("Ford Fiesta")

myCar1:totalDistance()
myCar2:totalDistance()

print()

myCar1:drive(10)
myCar2:drive(5)

print()

myCar1:totalDistance()
myCar2:totalDistance()

print()

myCar2:drive(10)

print()

myCar1:totalDistance()
myCar2:totalDistance()

the output of this is

Code: [Select]
Fiat Ducato drove 0 km in total
Ford Fiesta drove 0 km in total

Fiat Ducato just drove 10 km
Ford Fiesta just drove 5 km

Fiat Ducato drove 10 km in total
Ford Fiesta drove 5 km in total

Ford Fiesta just drove 10 km

Fiat Ducato drove 10 km in total
Ford Fiesta drove 15 km in total

As you can see, myCar1 and myCar2 are total different instances (objects) of Car. You can use all the methods defined in the Car class. The 'self' refers to each unique instance.

As Levak said, the ':' isn't actually more than a short cut. Take for example the Car:drive method. You could also write it this way and it would work exactly the same:
Code: [Select]
function Car.drive(self, d)
  self.distance = self.distance + d
  print(self.model .. " just drove " .. d .. " km")
end

Now, if we call myCar1:drive(10), that would be the same as myCar1.drive(myCar1, 10). Through metatables the myCar1 table is linked to the Car table (object and classes are in the end still tables). So basically when you do myCar:drive(10) you do Car.drive(myCar1, 10).

131
Introduce Yourself! / Re: Hello, local me = "Tjakka5"
« on: July 26, 2013, 07:19:25 am »
Welcome to the forum Tjakka5!
Glad to see yet another Lua programmer out there. While I mostly program Lua on the TI-Nspire, I have done several stuff with Love2D.

132
TI-Nspire / Re: Jens' Script Editor - An on-calc lua editor
« on: July 24, 2013, 01:46:45 pm »
Jens, regarding the manual, you could save it in an external document that you but in the MyLib folder. You then could make the editor detect if it's present and load it if that's the case.

133
Lua / Re: Creating/formating an evaluated Math Box from Lua script?
« on: July 23, 2013, 11:07:41 am »
Anyway, I've noticed the the following behavior:
the reference manual talks about '\\1 <command>...\\' pattern (note the ending backslashes).
My experience is that '\\1 <command>' is effecting the only the first word of '...', the ending '\\' is not used at all (so I see an extra backslash at the end of '...' text.
If I want to e.g. underline text

   'word1 word2 word3'

I have to put a formating command in front of each word, i.e.

   '\\1title word1 \\1title word2 \\1title word3'

(this can be automatized with using e.g.

   string.gsub("...","(%w+)","\\1title %1")

I did not try on the calculator, it's experience from using the PC software.
Did you have such experiences?

Yes, this is normal behavior. The internal XML representation is even worse:
Code: [Select]
<leaf name="1word" fi="1" np="1" tc0="0" fc0="268435199" fn0="TI-Nspire Sans" fs0="9" fst0="0" fest0="0" feun0="0" fesub0="0" fesup0="0" cc0="0" pp0="4">What </leaf>
                <leaf name="1word" fi="1" np="1" tc0="0" fc0="268435199" fn0="TI-Nspire Sans" fs0="9" fst0="0" fest0="0" feun0="0" fesub0="0" fesup0="0" cc0="0" pp0="3">the </leaf>
                <leaf name="1word" fi="1" np="1" tc0="0" fc0="268435199" fn0="TI-Nspire Sans" fs0="9" fst0="0" fest0="0" feun0="0" fesub0="0" fesup0="0" cc0="0" pp0="4">heck</leaf>

This would be for three words without markup and all the same style. Grouping the words together works but then you can get into problems with line breaks. So, it's absolutely normal that you have to repeat and repeat your stuff^^

134
Lua / Re: Ti-Nspire: Changing menu items dynamically?
« on: July 22, 2013, 03:20:04 pm »
Glad I could help you :)
Also, it would be indeed better to open new topics or you could also post in the Lua Q&A thread if it are small questions.

135
Lua / Re: Creating/formating an evaluated Math Box from Lua script?
« on: July 22, 2013, 03:17:13 pm »
[lua]D2Editor:setExpression[/lua] should contain some more info about the formatting. However, it's not possible to have the same functionality and options as the notes editor (actually it's possible but the method is very complex and very hacky. It requires some special Lua document creation and stuff, not so easy).

I personally use mathboxes in a D2Editor here https://github.com/adriweb/EEPro-for-Nspire/blob/master/2%20-%20%20FormulaPro/2%20-%20FPGui.lua#L365 but I suppose you already know and do what I do there.

Pages: 1 ... 7 8 [9] 10 11 ... 125