Array of struct
jm.lekston at idvector.com
Thu May 23 04:41:00 EDT 2002
>Firstly, how can I create a structure?
>And, how can I create an array of structures?
Unfortunaly, Hyper-talk is poor language:
Fixed types, no "true" arrays or list avaible, u can't create your own class
or struct, Not easy syntax, ugly grammar rules, lot of reserved words,
In fact, Revolution is a RAD for GUI.
But for your task, i used this :
Revolution made a strong link between models and views => A model = view.
With this point of view, Groups can be saw as a Class (object) definition
where method are group scripts and attibuts are fields (this is
view are fixed you can add controleur (buttons) directly in this goup.
Groups support agregation (group can be used in other groups), but
inheritance is not directly avaible.
In fact you can't, strictly, define a Class (as object definition), you only
can define a particular group (a particular object) and clone (copy) it to
simulate instantiation (and after call a particular method to initiate
If you want a struct without associated view you can set visible property to
In my personnal project, i create an invisible substack (named tools or
definition ) where i put all my class definition. An i use his path to get
Finaly if You need object containers, You can use long ID of this objects
(groups) as references and put it in hash-array, comma separate list or in
field. With this kind of view you can create your own container with
particular methods to manage your collection.
In an other mail i will tell You how to implements some design pattern
Ps : My appologize for this "french" english
More information about the use-livecode