Why... is the selected text deselected?

Jan Schenkel janschenkel at yahoo.com
Thu Feb 20 11:29:01 EST 2003


--- "J. Landman Gay" <jacque at hyperactivesw.com> wrote:
> On 2/20/03 12:18 AM, Alex Rice wrote:
> 
> > Thanks for the suggestion. I know I can select the
> text with a handler 
> > if necessary. I just have a lot of cards and want
> to *maintain the 
> > selection in the first place* :-)
> 
> Okay, if I understand it right, you have a field
> that you only want to 
> display on one card. You want its text selection to
> be persistent.
> 
> If that is the case, you do not need to group the
> field or assign 
> backgroundbehavior to it. It is just a card field.
> All you need to do is 
> make sure it is a list field. Non-list fields will
> not maintain their 
> selection.
> 
> If you can't make it a list field for some reason,
> then you will have to 
> track the selection and reset it each time the card
> opens, probably in a 
> preOpenCard handler.
> 

I'm sorry Jacqueline, but that doesn't work:
- create a new stack
- make a list field, set its text to
  line 1
  line 2
  line 3
- add a button "Go next" with the equivalent script
- create a new card
- add a button "Go prev" with the equivalent script
And with this test stack, see if the selection sticks
as you move back and forth between the cards. It
doesn't.
The instant you 'leave' the card, the selection is
gone.

In fact, if you stick it into a 'background' group,
the selection is saved when you hop from card to card,
but is lost as soon as you go to a card that doesn't
have this background group.

As it is relatively easy to code around in an
openCard/closeCard pair, it's mostly an annoyance.
However, the question is : as HyperCard _did_ save
this info, and a number of people may argue that this
would be expexted behaviour, can we regard this as a
bug ?

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time."  (La Rochefoucauld)

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



More information about the use-livecode mailing list