sharedVisible enhancement?

J. Landman Gay jacque at hyperactivesw.com
Wed Oct 12 17:01:06 EDT 2005


Timothy Miller wrote:
> If bg field text can be different on each card containing the group, or 
> shared by each instance of the bg field then...
> 
> Why couldn't the visible be handled in a similar way? With the 
> (hypothetical) sharedvisible set to true, every instance of that bg 
> field would be either visible or invisible. With the sharedvisible set 
> to false, I could hide an instance of the bg field on one card, but the 
> same field would still be visible on other cards.

I suspect the need for this feature would be minimal, since in most 
cases fields are only shared when they are intended to be displayed 
universally. It would also open up the question of whether *all* field 
properties need to have variable states. That is, if the visibility 
could be variable, why not the showborder? Or the style? Etc.

It is easy to set these things in a preopencard handler, so I suspect it 
isn't worth addressing the can of worms it would open. What I'd do is 
set a custom property on each card:

   set the cShowField of this card to false/true

And in a preOpenCard handler:

   set the visible of fld "blah" to the cShowField of this card

Using a custom property removes the need to create a container to store 
the value.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list