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.

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.

Try:

systemStatusBar()'s

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

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!

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