documentation organizational problems
Brian Yennie
briany at qldlearning.com
Wed Jun 1 18:38:24 EDT 2005
Jon,
Revolution objects generally _are_ manipulated by setting properties
and sending or processing messages.
For the most part, you:
1) Write "handlers" to respond to "messages" -- this is like a Java
listener, except that Revolution is always listening.
So if you want something to happen in response to an event,
consult the "messages" for that object
on mouseUp
answer "You clicked me!"
end mouseUp
2) Set properties to manipulate physical objects -- there are no
accessor methods
So if you want to change something ABOUT an object, consult the
"properties"
set the icon of button "MyButton" to 4000
get the icon of button "MyButton"
That is, there is no "setIcon()" method, and there is no
"setMouseUpListener()".
Now there are exceptions, and the documentation doesn't necessarily do
justice to all of the relationships, but I think you'll find more than
you are expecting available via properties and messages.
For example, for images here are just a few:
set the fileName of img "myImage" to "/images/happy.jpg"
set the height of img "myImage" to 200
set the angle of img "myImage" to 90
set the borderWidth of img "myImage" to 4
set the imageData of img "myImage" to img "otherImage"
on mouseUp
if (the fileName of me contains "happy") then answer "I am happy!"
else answer "I am sad!"
end mouseUp
Now there _are_ other top level commands, i.e.
delete img "myImage"
create image
select image "myImage"
But you'll find that these are lesser in number, and apply to all sorts
of objects- so the learning curve is not all that bad.
Hope that helps a little.
- Brian
> Jaqueline:
>
> What I find under Objects is a list of properties and messages, but no
> commands. Do you see something different?
>
> :)
>
> Jon
>
>
> J. Landman Gay wrote:
>
>> On 6/1/05 2:24 PM, Jon wrote:
>>
>>> Unlike programming languages like Delphi, C, or Java, methods are
>>> not explicitly associated with objects in Revolution. This means
>>> that it is very difficult to use the Rev documentation to find all
>>> of the methods (commands) for images, or for string manipulation.
>>> Am I the only one who finds this to be awkward, time consuming, and
>>> frustrating?
>>
>>
>> I think what you want (if I understand right) is in the docs already.
>> Click the "Objects" icon at the top of the documentation window.
>> Under each heading (which represents an object) is a list of commands
>> and properties associated with that object.
>>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
More information about the use-livecode
mailing list