Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

[MBS] NSStatusItemMBS events don't fire (MBS Xojo Plugin Mailinglist archive)

Back to the thread list
Previous thread: [MBS] [ANN] Real Studio Developer Magazine's Conference Specials -- 50% off All Books for Attendees!
Next thread: [MBS] Re: Mbsplugins monkeybreadsoftware.info Digest, Vol 436, Issue 2


Re: [MBS] Extra PrefItems?   -   Garth Hjelte
  [MBS] NSStatusItemMBS events don't fire   -   Gavin Smith
   Re: [MBS] NSStatusItemMBS events don't fire   -   Christian Schmitz
   Re: [MBS] NSStatusItemMBS events don't fire   -   Gavin Smith
   Re: [MBS] NSStatusItemMBS events don't fire   -   Christian Schmitz
   Re: [MBS] NSStatusItemMBS events don't fire   -   Gavin Smith
   Re: [MBS] NSStatusItemMBS events don't fire   -   Christian Schmitz
   Re: [MBS] NSStatusItemMBS events don't fire   -   Gavin Smith
   Re: [MBS] NSStatusItemMBS events don't fire   -   Christian Schmitz
   Re: [MBS] NSStatusItemMBS events don't fire   -   Gavin Smith

[MBS] NSStatusItemMBS events don't fire
Date: 11.04.13 00:20 (Thu, 11 Apr 2013 00:20:29 +0100)
From: Gavin Smith
The Action and DoubleAction events don't fire for NSStatusItemMBS. Is this a known issue?

http://www.monkeybreadsoftware.net/statusitem-nsstatusitemmbs-event.shtml

Re: [MBS] NSStatusItemMBS events don't fire
Date: 11.04.13 12:37 (Thu, 11 Apr 2013 13:37:04 +0200)
From: Christian Schmitz

Am 11.04.2013 um 13:33 schrieb Gavin Smith <gavinsmith@me.com>:

> Yes, I have simply modified the "Statusitem with textfield" example by creating subclass of NSStatusitemMBS and changing your s property to be my subclass. I added an Action event but it never gets called. The rest of the menu works fine but I specifically need the functionality of this Action event. I need to know when the statusitem is clicked on.

You call SendActionOn method?

Greetings
Christian

Re: [MBS] NSStatusItemMBS events don't fire
Date: 11.04.13 12:33 (Thu, 11 Apr 2013 12:33:37 +0100)
From: Gavin Smith
On Apr 11, 2013, at 8:18 AM, Christian Schmitz <<email address removed>> wrote:

>
> Am 11.04.2013 um 01:20 schrieb Gavin Smith <gavinsmith@me.com>:
>
>> The Action and DoubleAction events don't fire for NSStatusItemMBS. Is this a known issue?
>
> a quick test here with sample project shows that it's working fine.
>
> Do you keep instance of your NSStatusItemMBS subclass object alive?

Yes, I have simply modified the "Statusitem with textfield" example by creating subclass of NSStatusitemMBS and changing your s property to be my subclass. I added an Action event but it never gets called. The rest of the menu works fine but I specifically need the functionality of this Action event. I need to know when the statusitem is clicked on.

Re: [MBS] NSStatusItemMBS events don't fire
Date: 11.04.13 08:18 (Thu, 11 Apr 2013 09:18:01 +0200)
From: Christian Schmitz

Am 11.04.2013 um 01:20 schrieb Gavin Smith <gavinsmith@me.com>:

> The Action and DoubleAction events don't fire for NSStatusItemMBS. Is this a known issue?

a quick test here with sample project shows that it's working fine.

Do you keep instance of your NSStatusItemMBS subclass object alive?

Greetings
Christian

Re: [MBS] NSStatusItemMBS events don't fire
Date: 13.04.13 18:52 (Sat, 13 Apr 2013 18:52:08 +0100)
From: Gavin Smith
On Apr 13, 2013, at 4:18 PM, Christian Schmitz <<email address removed>> wrote:

>
> Am 13.04.2013 um 00:58 schrieb Gavin Smith <gavinsmith@me.com>:
>
>>
>> Did you add actual menu items to the menu? As soon as you do, the Action event stops firing, I just tried it with statusitem.rbp
>
> I think you simply can't have both.

I was pretty sure I had done this in the past in Xcode but I haven't any more time to test this.

> Or maybe use a CustomNSViewMBS as the status item view.

Yeah - I think I'll probably use an NSPopoverMBS.

Re: [MBS] NSStatusItemMBS events don't fire
Date: 13.04.13 16:18 (Sat, 13 Apr 2013 17:18:10 +0200)
From: Christian Schmitz

Am 13.04.2013 um 00:58 schrieb Gavin Smith <gavinsmith@me.com>:

>
> Did you add actual menu items to the menu? As soon as you do, the Action event stops firing, I just tried it with statusitem.rbp

I think you simply can't have both.

Or maybe use a CustomNSViewMBS as the status item view.

Greetings
Christian

Re: [MBS] NSStatusItemMBS events don't fire
Date: 12.04.13 23:58 (Fri, 12 Apr 2013 23:58:09 +0100)
From: Gavin Smith
On Apr 11, 2013, at 10:16 PM, Christian Schmitz <<email address removed>> wrote:

>
> Am 11.04.2013 um 18:06 schrieb Gavin Smith <gavinsmith@me.com>:
>
>> No, I didn't know I had to. I just went to http://www.monkeybreadsoftware.net/statusitem-nsstatusitemmbs-event.shtml#1 and decided that was the right event. How would I have known to use SendActionOn? Perhaps I just don't use the MBS plugins enough to know. I'm pretty proficient with Xcode and Real Studio but every time I use MBS I feel like I get stuck! Perhaps I need a beginner's guide to MBS plugins ;)
>
> Maybe you email me your code?
>
> I just tried with my statusitem.rbp project from examples.
> Here I can comment out the HighlightMode and SendActionOn lines. Still I get action events.

Did you add actual menu items to the menu? As soon as you do, the Action event stops firing, I just tried it with statusitem.rbp

> So I have to ask:
> * Do you have a subclass from NSStatusItemMBS with code in action event?
> * Do you really use this subclass when you create new object?
> * Do you call CreateMenu to create the status item?
> * Do you keep your status item object in Real Studio alive? Like as a property of app, a window or a module?

Yes to all these (reasonable) questions. It works fine if I have no items in my menu but obviously that isn't much use!

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

Re: [MBS] NSStatusItemMBS events don't fire
Date: 11.04.13 22:16 (Thu, 11 Apr 2013 23:16:46 +0200)
From: Christian Schmitz

Am 11.04.2013 um 18:06 schrieb Gavin Smith <gavinsmith@me.com>:

> No, I didn't know I had to. I just went to http://www.monkeybreadsoftware.net/statusitem-nsstatusitemmbs-event.shtml#1 and decided that was the right event. How would I have known to use SendActionOn? Perhaps I just don't use the MBS plugins enough to know. I'm pretty proficient with Xcode and Real Studio but every time I use MBS I feel like I get stuck! Perhaps I need a beginner's guide to MBS plugins ;)

Maybe you email me your code?

I just tried with my statusitem.rbp project from examples.
Here I can comment out the HighlightMode and SendActionOn lines. Still I get action events.

So I have to ask:
* Do you have a subclass from NSStatusItemMBS with code in action event?
* Do you really use this subclass when you create new object?
* Do you call CreateMenu to create the status item?
* Do you keep your status item object in Real Studio alive? Like as a property of app, a window or a module?

Greetings
Christian

Re: [MBS] NSStatusItemMBS events don't fire
Date: 11.04.13 17:06 (Thu, 11 Apr 2013 17:06:16 +0100)
From: Gavin Smith

On Apr 11, 2013, at 12:37 PM, Christian Schmitz <<email address removed>> wrote:

>
> Am 11.04.2013 um 13:33 schrieb Gavin Smith <gavinsmith@me.com>:
>
>> Yes, I have simply modified the "Statusitem with textfield" example by creating subclass of NSStatusitemMBS and changing your s property to be my subclass. I added an Action event but it never gets called. The rest of the menu works fine but I specifically need the functionality of this Action event. I need to know when the statusitem is clicked on.
>
> You call SendActionOn method?

No, I didn't know I had to. I just went to http://www.monkeybreadsoftware.net/statusitem-nsstatusitemmbs-event.shtml#1 and decided that was the right event. How would I have known to use SendActionOn? Perhaps I just don't use the MBS plugins enough to know. I'm pretty proficient with Xcode and Real Studio but every time I use MBS I feel like I get stuck! Perhaps I need a beginner's guide to MBS plugins ;)

The event doesn't fire for me still. I am calling SendActionOn with s.SendActionOn NSLeftMouseDownMask+NSLeftMouseUpMask. Should this work with a textual statusitem?