Is this a bug or am I missing something?

Peter Haworth pete at lcsql.com
Thu Oct 9 16:42:28 EDT 2014


Certainly true about buttons not being focusable on OSX, not so sure about
the focus changing when the button is clicked.

I put the cursor into a field on a card then entered this in the message
box:

put the long name of the focusedObject & return & the focusedObject

The first line of the output referred to my card (not the field that had
focus) and the second line to a field in the revmessagebox stack.

No button clicks involved but there's still an inconsistency depending on
just how you refer to the focusedObject.

But, easy to work round as you pointed out.

Pete
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
SQLiteAdmin <http://www.lcsql.com/sqliteadmin.html>

On Thu, Oct 9, 2014 at 1:02 PM, J. Landman Gay <jacque at hyperactivesw.com>
wrote:

> On 10/9/2014, 2:10 PM, John wrote:
>
>>   While this may be the case in general, when the menubar script is:
>>
>> on mouseDown
>>       put the long name of the focusedObject & return & return & the
>> focusedObject into field "results"
>> end mouseDown
>>
>> The first part of the put (the long name of the focusedObject) results in
>> a card on the main stack being written to the “results” field and the
>> second part of the put (the focusedObject) results in the field on the sub
>> stack being written to the “results” field.
>>
>
> It still holds. Menus are buttons, buttons are not focusable on Mac, so
> LC reports the card as focused.
>
> I haven't tracked the problem with two different values in your scripts,
> but my first thought was like Mark's: on mouseDown the focus changes to the
> menu button. Since buttons can't have focus on Mac, you get the card
> reported instead.
>
> I almost never use focusedObject. The handler worked fine when you checked
> the selectedfield, which is how I have always done it too. The discrepancy
> you're seeing is interesting (and maybe worth a bug report,) but the
> alternative method is easy enough.
>
> --
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.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