Can I use Revolution for this?

Björnke von Gierke bvg at
Sat Aug 3 07:52:01 EDT 2002

On Samstag, August 3, 2002, at 07:48 , knowledgeworks wrote:

> One thing that struck me this week, would be the possibility of writing 
> an
> object-relational mapping using Revolution.  That is, it should be 
> theoretically
> possible to get a script to interrogate a database and reconstruct the 
> tables as
> stacks.  By parsing the data definitions for the tables, and using the 
> dynamic
> scripting of Transcript the stacks could be constructed on the fly.  
> Once this
> is done, one could map the relationships between the tables (be nice to 
> do it
> with drag and drop...but I haven't got far enough in the docs to see if 
> that is
> possible).  Even if the drag and drop isn't possible, I was hoping that 
> one
> could also create mappings via user-selected means (drop down lists, for
> example).

I don't see how that application would need anything which is limited in 
a standalone made with Revolution.

Shure you wont be able to create very big scripts automaticaly, but does 
that really mater? I just don't see how you would need that feature. I 
would just create templates of the listfelds, drop downs etc. and clone 
them. You can also put the script into a higher level of the message 
path (group, card, stack) and put any script there, so that the newly 
generated object doesn't need any script.
If, however, you want to dynamically generate scripts during runtime, 
you have many ways to choose from:

Partly dynamic:
You can use pre-generated code-chunks of ANY size and put them into up 
to 50 stacks and then use them via 'start using stack "stackname" '. 
This enables you to predefine many different scripts which then can be 
used as needed.

Fully dynamic:
Generate chains of scripts. You can put 10 lines of scripts into an 
object during runtime. When you only use 9 of them for your needs, then 
you can use the 10th to chain another script afterwards. This lets you 
generate many many many lines of codes! I tried that once (I didn't have 
the license back then) , and I can tell you, it is possible, but also 
really annoying to do so. You have to adjust all if's and repeat's to 
fit into the structure, which is ok, but combined with the debugging it 
will take all the fun away.


--in the button:
on mouseup
   --9 lines
end mouseup

--in the group:
on calculate Giants
   withaParameter LamaParameter
   do predefinedMessage "you can also split your lines into two!"
   --8 additional lines
end calculate Giants

--in the card:
on predefinedMessage discardChunk
end predefinedMessage

Calculation of the maximum number of codelines which can be generated in 
a standalone during runtime and afterwards executed during one event:
9 lines in the messagereciever (eg the button which got clicked)
9 lines in the group in which the button is in
9 lines in the card
9 lines in the stack
9 lines in the mainstack
9 x 50 in the stacks in use
9 x 10 in the frontScripts
9 x 10 in the back Scripts
9 x 10 in the do commands
1 additional line in the last executed control structure  :)
766 lines

> ....
> It was amazing to read Dan mentioning scriptExpert - I had just 
> conceived of the
> possibility of such a thing a couple of days ago, and now I hear it has 
> existed
> for years on Hypercard (now I desperately want to see that working.... 
> does it
> still exist? would it work with Revolution or would there be too many 
> Hypertalk
> specifics missing?)

I would like to see that stack too! (if aviable)

> Do the above quoted remarks mean that Revolution standalones would be 
> quite
> limited in their ability to dynamically create objects?

No not at all!
You can create as much objects as you wish. You can change their 
properties. You can change their layout. You can change their position. 
BUT you are limited in the way you can change their scripts during 
runtime in a standalone!

the 10-10-50-10 Statement is only about the scripts, nothing else.

Hope this clarifies a little

* quoted remarks removed by demand of Simplicity legals ; )

More information about the Use-livecode mailing list