Defining Custom Objects

Sarah sarahr at genesearch.com.au
Sun Jan 5 17:43:07 EST 2003


There is a way around defining a custom class and that is by making a 
template object and then "cloning" it. Say you need a super-button i.e. 
a normal button but with some extra features (custom properties, 
scripts, whatever). Make a single button and set it up exactly the way 
you want it. Then when you want another of these, just use the message 
box or a script to:

	clone button "Super Button"
	set the name of it to "New Super Button"

This doesn't help you update all the objects at once, so if you think 
you need to do that, put their scripts higher up the message path i.e. 
in the card or stack script. If you need a general mouseUp handler, 
don't put one in the buttons themselves, put one in the card or stack 
script and use "the target" to see what object actually got the click.

Cheers,
Sarah


On Monday, January 6, 2003, at 07:36  am, Igor de Oliveira Couto wrote:

> Dear Rev Folks,
>
> I seem to vaguely remember someone mentioning that it IS possible to 
> define a new object CLASS in Revolution - so that if I update the 
> class, all objects that are based on it are automatically updated.
>
> The 'Object Library' allows us to save and 'copy and paste' objects, 
> however that is not the same... - ie, it provides no way for me to 
> update ALL objects of a certain 'kind' at once...  I still end up with 
> a long list of individual objects, and if I want to make a change to 
> the functionality of that type of object throughout my application, I 
> still have to go and change, one by one, the script of all these 
> objects...
>
> If it IS, indeed, possible to define one's own custom-object types, 
> could someone pleeeeease post a little list of instructions for us 
> newbies?...
>
> Many, many thanks, in advance!
>
> Kindest Regards,
> --
> Igor de Oliveira Couto
> ----------------------------------
> igor at pixelmedia.com.au
> ----------------------------------
>
> _______________________________________________
> 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