Re: flagsChanged:
Re: flagsChanged:
- Subject: Re: flagsChanged:
- From: Devin Lane <email@hidden>
- Date: Sun, 19 Oct 2003 13:42:05 -0700
Daniel
Whoops. Sorry about that. Forgot I was using Xcode, not Project
Builder. The only thing you need is a subclass of NSWindow that
implements my flagsChanged: method. Of course, you can do whatever you
want with the method, it doesn't matter to me. Just make sure that you
reset the title back to the original when the user releases the command
key. Other than that, I just make the default window in the project be
a subclass of my custom window, and that was it. No controller
necessary.
And don't worry, you aren't bothering me. I am very interested in
this stuff, so any discussion is great. Feel free to email me back
with other questions if you have any.
-- Devin Lane, Cocoa Programmer
email: email@hidden
On Oct 18, 2003, at 9:50 PM, Daniel Todd Currie wrote:
For the time being, i just copied your flagsChanged: method into my
NSWindow subclass. I'm not even receiving the initial NSLog at the
beginning of your method, so something isn't working. I can't get
Xcode nor Project Builder to open your .pbxproj file, so I can't build
it myself to see how it works...
Is there anything else I would need to do? I looked at your nib file
and there are no actions, outlets, instances, etc. so I'm not sure
what else I would need to do... Sorry to bug you with this stuff, but
I have no idea how to work with events and responders, and Apple's
online materials are really only good for mouse clicks in NSViews.
Thanks,
// D
On Saturday, October 18, 2003, at 08:23 PM, Devin Lane wrote:
Daniel
I wrote a simple app to demonstrate this:<CommandTet.sitx>
Unfortunately, I was unable to get the command-key glyph to display
properly (some weird unicode thing)
Hope this helps,
-- Devin Lane, Cocoa Programmer
email: email@hidden
On Oct 18, 2003, at 4:22 PM, Daniel Todd Currie wrote:
I'm trying to implement the functionality seen in several other OSX
apps, where the command shortcut is shown on a button whenever the
command key is down. I've tried (upon several different
recommendations) subclassing NSResponder, NSApplication, and
NSWindow, using flagsChanged:, keyDown:, and acceptsFirstResponder
methods wherever appropriate. I've tried linking these classes in
IB, instantiating them in my applicationDidFinishLaunching:
delegate, basically anything i can think of. Nothing works; can
someone please just tell me which classes/methods will do this and
how I need to set it up (please try to avoid speculation, I've had
quite enough suggestions that "should work" and didn't).
Thanks in advance,
// Daniel Currie
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.