Friday, December 15, 2017

#1 2015-11-17 05:08:09 pm

mrpires
Member
Registered: 2010-11-16
Posts: 20

menu bar app works on my Mac, not on others

I've been trying to troubleshoot an app i'm developing that display a menu bar icon with some statuses and it's not working on other Macs, just mine. I've isolated this line as being the culprit.

Applescript:

logThis("step 8") -- prints
set menuStatus to NSStatusBar's systemStatusBar's statusItemWithLength_(current application's NSSquareStatusItemLength)
logThis("step 9") -- does not print

everything else works up to this. I tested by logging before an after to a file.

My computer is on El Cap. The computer I'm testing on is on Yosemite.

Thanks for any help.

Offline

 

#2 2015-11-17 06:35:05 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5199

Re: menu bar app works on my Mac, not on others

Try:

systemStatusBar()'s


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/

Offline

 

#3 2015-11-18 09:27:36 am

mrpires
Member
Registered: 2010-11-16
Posts: 20

Re: menu bar app works on my Mac, not on others

Thanks, I tried that but same thing. What it came down to was using an integer instead of that property to set a width:

Applescript:

set menuStatus to NSStatusBar's systemStatusBar's statusItemWithLength_(20)

Where 20px is the width of my icon.

Very bizarre. I actually came upon a thread where you pointed someone else in the right direction with regards to the variable status item length. Thanks!

Offline

 

#4 2015-11-18 05:41:47 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5199

Re: menu bar app works on my Mac, not on others

mrpires wrote:

I actually came upon a thread where you pointed someone else in the right direction with regards to the variable status item length.


That rings a bell. I think it's changed type with different versions of the OS.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)