More TopStack-DefaultStack Mysterious - TraveralOn (false) Selection lost?

Brahmanathaswami brahma at hindu.org
Sat Aug 29 20:32:54 EDT 2015


I think I found a very obscure bug. i created another palatte stack with 
my button... it works as expected.

So there is was something different about my my utilities stack... well 
...it has a field object on it "Monitor-log"

this field had it's traversalOn set to true, autotab is off.

even when I set the entire stack to mode 4 "palette"  even just clicking 
on the background of the stack causes the top stack to lose it's selection..

if I delete that field OR  set the traversalOn of the field to "false" 
then  the problem disappears... behavior is as expected...

Palette my utilities stack  like this:

on mouseUp
    set the defaultstack to the topStack
    put  selectedChunk()
end mouseUp

now reports:

char 468 to 488 of field 1  # correct... from the top stack

go back to my utilities stack.. set the traversalOn of the field back to 
"true" and voila... even if the stack is palette mode, touching the 
stack will steal the focus back from the topStack.

ergo: The very presence of a field on the card that has 
"traversalOn=True"  will cause the palette stack to take the focus, even 
if your button is set to "traversalOn=false"..

Perhaps this is "as expected"  the work around now is, in my toggle mode 
button on the utilities stack:

on mouseup
   if the mode of this stack is 4 then
     toplevel this stack
     set the traversalOn of fld "monitor-log" to true
   else
     palette this stack
    set the traversalOn of fld "monitor-log" to false
   end if

end mouseup

  I think what is happening is: even though Auto tab is off, if you have 
a field exposed on a card and go to that card the cursor "jumps" into 
the field... not matter what mode the stack is in...

Should I report this?


Richard Gaskin wrote:


Works here, and given how much of the IDE relies on that sort of thing 
I'd be surprised it a regression survived release.

Have you double-checked the palette mode, and the button's traversalOn?
> Brahmanathaswami wrote:
>
> > 7.1.rc 1
> >
> >   I could have sworn this used to work:
> >
> > make stack # Call it no. 1 "utilities"
> > create button
> > set traversalON of the button to "false"
> >
> > on mouseUp
> >     set the defaultstack to the topStack
> >     put  selectedChunk()
> > end mouseUp
> >
> > set stack 1 to palette mode.
> >
> > go to stack 2 with text in a field selected
> >
> > in the utilities stack... click the button:  even though the
> > traversal is set to false for the button the text selection in
> > the top stack field is lost /de-selected result
> >
> > char 1 to 0 of fld 1
> >
> > ??
>





More information about the use-livecode mailing list