On Sun, 26 Sep 1999, M. Uli Kusterer wrote:
> >If I understand this discussion correctly the need is for a mechanism of
> >"duplicating" objects with all their properties script included. Scott I
> >think mentioned "shareScript" which makes a lot of sense.
> >Generally speaking I can see the usefulness of "shareProps" as well which
> >would allow making changes to the duplicated object to appear in the
> >duplicates as well. This of course must be limited or take parameters [set
> >shareProps(textFont,backgroundColor,script,etc.) to true/false]. A script
> >would look something like this:
> >
> >set shareProps(textFont,backgroundColor,script) of fld X of stack S to true
> >duplicate fld X of stack S in card 2 of this stack
>
> Andu,
>
> I hate this syntax. Why don't we just add a new property "the
> sharedProperties" which contains a list of the properties that are shared:
>
> set the sharedProperties to "loc, rect, highlight, text"
> set the sharedProperties to empty -- all are card-local
> set the sharedProperties to the properties of me -- all are shared
>
> This is much more xTalk-y. BTW, do we already have "the properties"
> property in MC? HC has this for its xWindows, and it's the most sensible
> choice.
There is in 2.3, and its an associative array (property name, value
pairs). I can't think of any reason why this wouldn't work with a
separate "sharedProperties" property (which would actually be just
another array attached to the object), although of course getting and
setting the values of any object with a "sharedProperties" property
would be slower (because it would have to look up the property to see
if it were shared each time).
But there are still a lot of issues here:
1) What happens when you get or set a shared property? Does
"effective" work here too? Does it override the "shared" property and
remove it from the list in the sharedProperties?
2) How is the hierarchy defined? Is there a "sharedParent" property
or something? If so, is it another real object and can it have shared
properties of its own?
3) How does this solve the composite-object problem? Are the
"children" of a group one of the things that can be shared?
Regards,
Scott
> Cheers,
> -- M. Uli Kusterer
>
> ------------------------------------------------------------
> http://www.weblayout.com/witness
> 'The Witnesses of TeachText are everywhere...'
>
> --- HELP SAVE HYPERCARD: ---
> Details at: http://www.hyperactivesw.com/SaveHC.html
> Sign: http://www.giguere.uqam.ca/petition/hcpetition.html
>
>
********************************************************
Scott Raney [EMAIL PROTECTED] http://www.metacard.com
MetaCard: You know, there's an easier way to do that...