"semi modal" view
"semi modal" view
- Subject: "semi modal" view
- From: "B.J. Buchalter" <email@hidden>
- Date: Wed, 19 May 2010 19:32:30 -0400
Hey Folks,
I would like to implement something that I would describe as "popup"
text entry. Effectively I have a view that displays some textual
information. I would like to make it so that if the user clicks on the
view it becomes a text entry box.
I have worked out how to insert a NSTextField into the view hierarchy
and make it the first responder. That works well.
What I would like to do is make it so that if the user hits tab or
enter, the "popup" text entry is removed and the text that was entered
is commited. I think I understand how to do that.
I also need for the popup text entry to be removed when the user
clicks outside of the NSTextField.
In my Carbon version of this, I made a modal window that I stuck the
text edit field into, and I could detect if there was a click outside
that window.
With Cocoa, Ideally, I would rather just let the event loop run
normally, but I can't work out how to detect if the user has clicked
outside of the NSTextField. Is there any way to do this easily, or do
I need to run a local eventloop, or do I need to go back to the way I
did it in Carbon and stick the entire text entry into its own window?
Any guidance (or pointers to the relevant docs would be greatly
appreciated!!
Thanks!
B.J. Buchalter
Metric Halo
http://www.mhlabs.com
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden