Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 07-06-2009, 05:43 PM   #2 (permalink)
barrrt
Registered Member
 
Join Date: May 2009
Posts: 23
Default

Quote:
Originally Posted by Jume View Post
This is making me crazy.

I have a simple NIB file where I put two NSTextFields and one subclassed NSImageView under UIWindow... I want my NSImageView be the firstResponder for key events... I have read the documentation and according to that I set my custom subbclassed NSImageView as initialFirstResponder.

But that wont work... still the text fields are focused automatically and are firstRespodners... Even when I switch the focus with Tab key, the NSImageview wont be selected so it never becomes a first responder.

How do I solve this? I wan't to listen to key events on my custom NSImageView...
In cases like this you want to look at the reference for the class you are having a problem with. In this case, a quick look reveals that NSImageView is derived from, among others, the NSResponder class. As such, a scan of methods in NSResponder yields the following:

NSResponder Class Reference

This may or may not be the answer, but I have a feeling it will.

Bart
barrrt is offline   Reply With Quote
 

» Advertisements
» Online Users: 294
22 members and 272 guests
ADY, apatsufas, BdR, Diegan, djohnson, Duncan C, F_Bryant, glenn_sayers, Guthook, Herbie, ilmman, Joseph Nardone, Music Man, NSeven, Profile, rodgo, TheWebWizz, VikMyr, vogueestylee, yomo710, zbynda, ziocleto
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,876
Threads: 89,225
Posts: 380,708
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jorge599
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:01 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.