Re: How to embed a popup menu in an NSTextField
Re: How to embed a popup menu in an NSTextField
- Subject: Re: How to embed a popup menu in an NSTextField
- From: Ryan Stevens <email@hidden>
- Date: Wed, 17 Nov 2004 07:10:03 -0800
I noticed this too, after I posted. :/
After a little testing, it looks like it's happening based on when the cell is getting set - if I set it a little earlier I get different (almost normal) behavior. There is a note in the docs (somewhere?) about setting the cell as early as possible, IIRC. I don't know why it should make any difference.
I'm sort of at a loss, the code is very straight forward. The only thing I can think to do is rename the files/objects again. Something short, CCDField and CCDFieldCell? Shorter than that? What happens on a really slow machine? I'll keep digging.
As for a popup menu, I'd add something like this to your action method..
- (void)textfieldButtonClicked:(id)sender
{
[NSMenu popUpContextMenu:yourMenu withEvent:[NSApp currentEvent] forView:sender];
}
On Nov 17, 2004, at 12:11 AM, Larry Gerndt wrote:
I tried this tonite, and it does put the button up, but as soon as the text field becomes active (either by clicking the button itself or anywhere in the text field, the button disappears. It appears again when the field becomes not first responder. Any idea what either I or you may have missed?
Also, if I'm not becoming a pest, may I ask: how do I make the button be a popup menu?
--
Larry Gerndt
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden