views:

147

answers:

1

Hi,

I am creating a Status Bar application which requires a URL being entered in a text field. The text field is a subview of the NSMenuItem. The problem I am facing though is that the value of the text field cannot be changed and only "indirectly highlighted" (it's not the normal blue highlighting but a grey one and only occurs when double clicking the value of the text field).

Does someone know why this is?The text field hasn't been disabled by me, but it seems to apply read only properties or something...

+2  A: 

It's most likely your menu has "Auto Enables Items" turned on. With this on (the default), your menu items have to have an action and a target to be enabled, which is likely disabling their contents (your NSTextField). Turn it off and you should be fine.

Joshua Nozzi
Thanks very much.This was indeed the solution :-)
David Schiefer
I have just noticed that when NSUIElement is set to 1 in the Info.plist file, hiding the app icon, the same error reappears :S
David Schiefer