equivalent to rbscript
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
equivalent to rbscript
Please I would need to know the equivalent to RealBasic Scripts in LiveCode. Because I need to create an app where the user could introduce a mathematical function to plot it.
Thank you in advance
Thank you in advance
Re: equivalent to rbscript
Hi cjmj,
I don't think that someone will post a more or less complete comparison chart
RB commands <-> LiveCode commands, so if you could be a bit more specific,
we might be able to help you
And welcome to the forum!
In the meantime you might want to take a look at these stacks:
http://www.runrev.com/developers/lesson ... nferences/
Best
Klaus
I don't think that someone will post a more or less complete comparison chart
RB commands <-> LiveCode commands, so if you could be a bit more specific,
we might be able to help you

And welcome to the forum!
In the meantime you might want to take a look at these stacks:
http://www.runrev.com/developers/lesson ... nferences/
Best
Klaus
Re: equivalent to rbscript
Thank you Klaus. I want to create in the stack a text entry field, where the user introduce something like that: "y = x^2 -3x +2", then when the user pushes a button, the program draws it.
Re: equivalent to rbscript
You need math to do that, not a specific programming language, for example:
Code: Select all
put field "formula" into theFormula
repeat with x = 1 to 10
put theFormula into theTemporary
replace "x" with x in theTemporary
put x & comma & value(theTemporary) & return after theData
end repeat
-- draw data here using math
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: equivalent to rbscript
Thank you BvG, that´s great!, but I don´t understand what you want to say with "math" in this case.
Re: equivalent to rbscript
Screen coordinates are the same as carthesian coordinates (altho inverted because LC starts at the topleft with 0,0). All things that need positioning on (as in precise on a certain point) a carthesian system are algebra. Algebra is math. You do the math.
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: equivalent to rbscript
OK BvG, I understand. By the way, is there any example of code of math graphics on carthesian system?, it would be very useful for me to survey it.
Thanks for your kindness
Thanks for your kindness
Re: equivalent to rbscript
Sure, here you go:
http://en.wikipedia.org/wiki/Cartesian_ ... ate_system
http://www.mathsisfun.com/data/cartesia ... ctive.html
http://mathworld.wolfram.com/CartesianCoordinates.html
Just do a google search, a lot of things will pop up
http://en.wikipedia.org/wiki/Cartesian_ ... ate_system
http://www.mathsisfun.com/data/cartesia ... ctive.html
http://mathworld.wolfram.com/CartesianCoordinates.html
Just do a google search, a lot of things will pop up
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
Re: equivalent to rbscript
Sorry BvG I would want to say livecode code.
Thanks
Thanks
Re: equivalent to rbscript
I don't understand then I guess, didn't I say it's math, and not code?
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
-
- Livecode Opensource Backer
- Posts: 328
- Joined: Mon Dec 05, 2011 5:34 pm
- Contact:
Re: equivalent to rbscript
Hi cjmj,
I think you need to look in the LC dictionary for the references to "points" in the graphic object.
You can assign the points that are generated by your math functions to lines, which will then be drawn.
where myDataPointsList is an array of x,y values.
That should give you a programmatical start to creating graphs of your data.
Cheers,
Dave
I think you need to look in the LC dictionary for the references to "points" in the graphic object.
You can assign the points that are generated by your math functions to lines, which will then be drawn.
Code: Select all
set the points of graphic "fred" to myDataPointsList
That should give you a programmatical start to creating graphs of your data.
Cheers,
Dave
Coding in the Sun - So much Fun.
Visit http://electronic-apps.info for released App information.
Visit http://electronic-apps.info for released App information.
Re: equivalent to rbscript
I think it is just I need.
I´ll take a look to "point" in the Dictionary
Thanks
Carlos
I´ll take a look to "point" in the Dictionary
Thanks
Carlos