Inheritance in Revolution?
Chipp Walters
chipp at chipp.com
Fri Sep 10 01:25:36 EDT 2004
Why not just create a library and 'start using' it? Then you could do
something like:
on mouseUp
if the myCustomPropFavoriteColor of btn "xyz" is "blue" then
do stuff etc...
end if
pass mouseUp
end mouseUp
Now, all you need to do is create a custom property of the control you
wish to handle and you've effectively done what it is you want.
I use this technique all the time. You could also use this as a
FrontScript as well, though the library method is 'cleaner.'
-Chipp
Arthur Urban wrote:
> I probably wasn't as clear as I could have been. These 50 buttons all live
> on different cards, different sub-stacks, etc. Think of this ability as one
> might approach a Password Field. You'd write the clever text hiding code in
> the field's script, and then maybe use this field in two or three different
> locations. When you discover that bug, you just change the master script,
> and no matter where the other buttons happen to be, they gain the benefit of
> the fix without extra copy/paste efforts.
>
> This is probably too cool a feature to ever actually see, but I can hope.
> What do the Rev Developers think? Wouldn't this add a tremendous level of
> code (and object) reusability, not to mention data/code encapsulation?
More information about the use-livecode
mailing list