Xojo Conferences
XDCMay2019MiamiUSA

[MBS] NSToolbar selectedItemIdentifier method (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] Window.HasToolbarButtonMBS broken
Next thread: [MBS] Windows Video


Re: [MBS] Website Forum Instead of this Newsletter?   -   Garth Hjelte
  [MBS] NSToolbar selectedItemIdentifier method   -   Yoann Besnard
   Re: [MBS] NSToolbar selectedItemIdentifier method   -   Yoann Besnard
   Re: [MBS] NSToolbar selectedItemIdentifier method   -   Christian Schmitz

[MBS] NSToolbar selectedItemIdentifier method
Date: 25.01.12 07:13 (Wed, 25 Jan 2012 07:13:53 +0100)
From: Yoann Besnard
Hi Christian,

In your NSToolbar, it's possible to specify that certain items in the
toolbar can indicate a selected state by using
toolbarSelectableItemIdentifiers. I use
toolbarSelectableItemIdentifiers for changing 'panels' in my
application. I have a matching Menu for those 'panels'. When I click
on a 'panel' menu item, the matching toolbar item is never selected. I
can't find anywhere a method to do it by code, but by reading the
Apple Toolbar Programming Guide, I discovered that
selectedItemIdentifier existed:

http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSToolbar_Class/Reference/Reference.html#//apple_ref/occ/instm/NSToolbar/selectedItemIdentifier

Would it be possible to have it implemented ?

Best,

Yoann
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] NSToolbar selectedItemIdentifier method
Date: 25.01.12 21:20 (Wed, 25 Jan 2012 21:20:04 +0100)
From: Yoann Besnard
Er... Well, sorry for not reading properly the MBS documentation

Yoann

On 25 January 2012 14:09, Christian Schmitz
<<email address removed>> wrote:
>
> Am 25.01.2012 um 07:13 schrieb Yoann Besnard:
>
>> Hi Christian,
>>
>> In your NSToolbar, it's possible to specify that certain items in the
>> toolbar can indicate a selected state by using
>> toolbarSelectableItemIdentifiers.
>
> Yes.
>
>> When I click
>> on a 'panel' menu item, the matching toolbar item is never selected. I
>> can't find anywhere a method to do it by code, but by reading the
>> Apple Toolbar Programming Guide, I discovered that
>> selectedItemIdentifier existed:
>
> We have a selectedItemIdentifier property there already.
>
> Greetings
> Christian
>
> --
> See you in Orlando, Florida for Real World 2012
>
> More details and registration here:
> http://www.realsoftware.com/community/realworld.php
>
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> <email address removed>
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
<email address removed>
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Re: [MBS] NSToolbar selectedItemIdentifier method
Date: 25.01.12 14:09 (Wed, 25 Jan 2012 14:09:20 +0100)
From: Christian Schmitz

Am 25.01.2012 um 07:13 schrieb Yoann Besnard:

> Hi Christian,
>
> In your NSToolbar, it's possible to specify that certain items in the
> toolbar can indicate a selected state by using
> toolbarSelectableItemIdentifiers.

Yes.

> When I click
> on a 'panel' menu item, the matching toolbar item is never selected. I
> can't find anywhere a method to do it by code, but by reading the
> Apple Toolbar Programming Guide, I discovered that
> selectedItemIdentifier existed:

We have a selectedItemIdentifier property there already.

Greetings
Christian