Is this a bug or am I missing something?

John john at onechip.com
Thu Oct 9 14:50:42 EDT 2014


Mark,

   I can see your line of reasoning but it does not quite track.  The first line in the result field does show that the focus is with main stack card where the menu buttons are located.  In my case, the second line indicates that the focus is on the sub stack field, *not* the result field.

   Perhaps we are seeing different things on different machines if the focusedObject is changing while the single line script (in the menu bar mouseDown handler) is running.  To test for this I changed the menubar script to this:

on mouseDown
   local theObject
   put the focusedObject into theObject
   put the long name of theObject & return & return & theObject into field "results"
end mouseDown

   I now get the following result:

field "Field with property" of card id 1002 of stack "Sub Stack" of stack "/Users/john/Downloads/Test stack.livecode"

field id 1004 of card id 1002 of stack "Sub Stack" of stack "/Users/john/Downloads/Test stack.livecode”

    Both lines indicate that the focus in on the field on in the sub stack even though they are in different formats.  If I am thinking about this right, it means that the focusedObject was changing during the execution of the single line script.

Thanks,
John


On Oct 9, 2014, at 10:42 AM, Mark Wieder <mwieder at ahsoftware.net> wrote:

> John-
> 
> My apologies - I forgot about the weirdness of menus on osx.
> My earlier response was based on linux, which has a much more reasonable
> approach to UI interaction.
> 
> So here's what I see happening on osx:
> 
> 1. click in the substack field
> 2. click on a menu item
> 
> This actually moves the focus to the main stack because the menubar is part
> of the mainstack. You can see this if you examine the stack in the
> Application Browser or Project Browser. But buttons (and menus by extension)
> can't receive the focus, so the focus ends up being on the currrent card.
> That's the first line you see.
> 
> But *now that you have put text into the result field*, it now becomes the
> focused object, and the second time you try to access the focused object you
> will be referring to th field. The second line reflects that fact.
> 
> -- 
> Mark Wieder
> ahsoftware at gmail.com
> 
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list