Bug? ResizeControl Triggers From Outside of CustomControl with Assigned Behavior

Sannyasin Brahmanathaswami brahma at hindu.org
Sat Jul 15 11:25:11 EDT 2017


WE have a peculiar bug, at least I think it is a bug.

Where

1) navigation bar at bottom of screen, a custom control with a  bkgnd grc 50 px tall 1024 wide and 4 widgets on it.

2) has assigned behavior "behavior_bottomToolsNav"
      # with some complex dynamic layout stuff happening to handle change of orientation
      # the four widgets will automatically find their proper relative position in either orientation

3)  It has a resize control that does the dynamic layout change when the device is turn one way or the other.



BUG:

I'm working way up on this card "far away" from the rect of the bottom tool bar.

context:
1) paste a chevron widget… supposed serve as a go next button
2) switch to select tool, change the shape of the widget and the bottom bar's icons change position

So I put this in the behavrio just to confirm

on resizeControl
answer "gotcha!" with "OK"
LayoutControl
end resizeControl

and indeed, on resizing the widget outside the custom control resize is "heard" by that behavior
OK close card, do not save

try again, this time adjust some other object on the card, outside the custom control.. yep!  same thing.. nothing to do with my widget. I can change the rect of a fld up the card and the bottom bar "reacts"

shouldn't

resizeControl

only be triggered  by "me"

??

assuming this is a bug, I hacked around it with this:

on resizeControl
put the childControlNames of me into tNavControls
if the short name of the target is not among the lines of tNavControls then
answer "That's not in me!" with "OK"; exit to top
else
LayoutControl
end if
end resizeControl
for testing and then this for production

on resizeControl
put the childControlNames of me into tNavControls
if the short name of the target is among the lines of tNavControls then
LayoutControl
end if
end resizeControl

But do we agree? this is a bug?






More information about the use-livecode mailing list