Brian:

Thanks for your comments. My problem was spending hours trying to write a Flip routine, only to come across it by accident. There was no clue that it existed from looking at the Image properties or events. After this accidental encounter, I now feel as if I have to learn every single detail before proceeding at all, which is daunting and frustrating. Thus my comment that associating the "methods" with the objects would have been a good idea. And if that was not possible architecturally, at least document them somewhere.

And then I tried to do some string manipulations (change the string <"FRED"> to the string <FRED>, that is, remove the quotes), and simply gave up: there is no section on how to manage strings.

I know I'm coming from another programming environment, and I don't expect it to be trivial, but when I can't find any information at all, I get frustrated. I can't be the first one...

:)

Jon


Brian Yennie wrote:

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
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution



_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to