Page 1 of 1
Option menu btn cancel a closefield?
Posted: Wed Feb 28, 2018 8:01 pm
by trevix
The lookAndFeel is set to "Appearance Manager".
I have a field with
Code: Select all
on closeField
put true into sHasChanged
end closeField
and an Option menu btn.
If I change the field content and then try to change the option menu, the "closeField" is not triggered. It only triggers if I put a "Focus on nothing" in the beginning of the menupick.
Is this how it should be? (does not make sense to me)
Regards
Trevix
Re: Option menu btn cancel a closefield?
Posted: Wed Feb 28, 2018 11:19 pm
by dunbarx
So this is interesting. Know that "exitField" is the message of choice when you leave a field without changing its content, whereas "closeField" only fires when you do.
But in both cases, leaving a field and going immediately to an option menu does not trigger either. In fact, the field messages are on hold until after you fool around with the option menu. So you can place both handlers in the field script, and if you click on the card you will get a message whether you change the text or not. But if you click on the option menu, and then the card, the appropriate message is only sent at the card click.
I am not sure if this is intended behavior or not.
One way around it is to place a "mouseLeave" handler in the field.
Craig Newman
Re: Option menu btn cancel a closefield?
Posted: Wed Feb 28, 2018 11:35 pm
by bogs
dunbarx wrote: ↑Wed Feb 28, 2018 11:19 pm
One way around it is to place a "mouseLeave" handler in the field.
Except that, if your like me, you generally move the mouse out of the field right after clicking in it, which might throw mushi on your plans.
Re: Option menu btn cancel a closefield?
Posted: Thu Mar 01, 2018 12:34 am
by dunbarx
Bogs.
Yep. You might just get two messages. Set a custom property for each message, clearing them all if you click anywhere?
"Mushi"?
Craig
Re: Option menu btn cancel a closefield?
Posted: Thu Mar 01, 2018 2:53 am
by bogs
Thats as good as anything I came up with
dunbarx wrote: ↑Thu Mar 01, 2018 12:34 am
"Mushi"?
Well, not knowing how old you might be, it is a reference to a line muttered by Jack Soo during an episode of Barney Miller (an old tv series).
Someone brought brownies into the precinct laced with hashish, Soo's character got stoned (as almost all the detectives in the room did), and at one point said "Mushi mushi". Probably you would have had to see it to get the joke, but I still remember it all these decades later.
Re: Option menu btn cancel a closefield?
Posted: Thu Mar 01, 2018 5:44 pm
by Klaus
If the option menu button has its "traversalon" property set, this should work right out of the box!
Just made a little test on my Mac and it worked as exspected.
Re: Option menu btn cancel a closefield?
Posted: Thu Mar 01, 2018 5:48 pm
by Klaus
bogs wrote: ↑Thu Mar 01, 2018 2:53 am
dunbarx wrote: ↑Thu Mar 01, 2018 12:34 am
"Mushi"?
Well, not knowing how old you might be, ...
Question should be: where are you from?
Not every shitty american TV-series is running outside ot the US of A!

Re: Option menu btn cancel a closefield?
Posted: Thu Mar 01, 2018 6:30 pm
by dunbarx
Crappy US television aside, setting the traversalOn does indeed work as Klaus mentioned.
It is not clear that this property exists for option menus, though, and does not appear in the inspector. It never occurred to me, but makes sense...
Craig
Re: Option menu btn cancel a closefield?
Posted: Thu Mar 01, 2018 6:35 pm
by Klaus
This is in the inspector in version 8.x and 9.x!
Re: Option menu btn cancel a closefield?
Posted: Thu Mar 01, 2018 6:39 pm
by trevix
Doesn't seem in LC8.2
Re: Option menu btn cancel a closefield?
Posted: Thu Mar 01, 2018 6:43 pm
by Klaus
I see this in LC 8.1.9 and LC 9 DP 11, never touched 8.2x so far...
But if this is not in the inspector, use the message box to set this property!
Re: Option menu btn cancel a closefield?
Posted: Thu Mar 01, 2018 9:00 pm
by bogs
Klaus wrote: ↑Thu Mar 01, 2018 5:48 pm
bogs wrote: ↑Thu Mar 01, 2018 2:53 am
dunbarx wrote: ↑Thu Mar 01, 2018 12:34 am
"Mushi"?
Well, not knowing how old you might be, ...
Question should be: where are you from?
Not every shitty american TV-series is running outside ot the US of A!
Huh, from all I read, that is all they show over there, the crud they produce over here, so I wouldn't have expected you to see this show, which actually had some merit value during its production run
Topics that were presented (through humor) all the way back then are *still* in the headlines of today. Repeatedly. It is almost like watching the future, with a chuckle.
... although Craig likes to stay on the quieter side of the spectrum, so that his location is harder to pin down, I tend to believe he actually was on this side of the pond as it were (don't ask me why, I don't think I ever tried to confirm it or not). If I am wrong, my apologies my friend
