The RR programming model
Sarah
sarahr at genesearch.com.au
Thu Nov 14 23:01:01 EST 2002
> Stacks and Messages paths --and yet that doesn't seem clear enough to
> me.
> Looking at the discussion on the list, it is frequently stressed if
> you want
> speed, you keep the data out of the stack-card-field paradym and put
> the
> information in a variable or an array.
This is a good point but I think it needs to come second. Firstly,
consider that all these xCard development tools started off using the
rolodex metaphor i.e. a stack of cards but with easier navigation,
searching etc. Then they became more general programming tools so the
rolodex metaphor is no longer so relevant but it is still there.
As someone else said, unless your database is massive (probably under
1000 cards would be fine) then using the card system will work well. So
you might have your address book stack with one card per person. Added
to that you might have other stacks which act more like dialog boxes
than stacks. They would be one card stacks offering print options,
search options, preferences, splash screen, whatever...
Moving on from this concept, you might decide that you have too many
addresses for a stack of cards, so you decide to store your addresses
in some other way and have the addresses stack as a one card stack to
allow easy viewing & editing. This might be faster but it isn't as easy
to implement first off, so I would recommend trying the rolodex method
and altering it later if you aren't sure.
Going back to the original question about the programming model, I tend
to think of Rev as an object oriented language with preset objects. To
talk in C++ speak for a moment, you can instantiate a button, give it
data (name, size, color, custom properties etc), and give it methods
(mouseUp, mouseDown, doMyStuff). Purists would probably say that it
isn't properly object oriented since any other object can read & write
it's data directly, instead of sending it a message. Your button also
becomes part of a hierarchy that allows messages to be sent up the
chain higher & higher until they are handled or finally ignored. If you
want to make yourself a custom object, start with an existing object,
edit one copy the way you want it, then use this is a template to clone
other copies.
Because each object is visible on your screen, it is very easy to edit
it's properties and it's scripts. This makes a language like Rev not
only quick & easy to use, but amazingly easy to debug, even after a
long time. If your program crashes when you click a button, then the
problem is nearly always right there in the button itself.
Cheers,
Sarah
On Friday, November 15, 2002, at 03:27 am, Fred_D_Yocum at mail.mcc.org
wrote:
>
> Another words if I was designing an address database: with my stack
> hat on I
> think I should create a stack with multiple cards each dedicated to the
> information of one individual. But this does not seem to be what I
> should doing.
> I should really be keeping things out of stacks-cards-fields except
> for display
> purposes and then I'm back a not dis-similar method of programing than
> any
> other?.
>
> Fred
>
>
> _______________________________________________
> 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