Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > - (IBAction)setUserIcon:(id)sender

- (IBAction)setUserIcon:(id)sender
Thread Tools
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Feb 28, 2001, 08:19 AM
 
I have noticed something really strange. It seems that if I subclass NSWindow and have an action in it wuth a signiture:
- (IBAction)setUsericon id)sender
Then when my window is awoken from the nib that method is called. I have tried this different times with the same result. The same thing slao happens to me if I have an action with a signature like:
- (IBAction)setComputerIcon id)sender

I had originally thought that maybe the control that I had it on called it for some unkown reason but I got rid of the control and nothing uses those methods and it still does it. My solution was to simply rename my methods but I was wondering if anyone else could confirm that this happens in subclasses of NSWIndow and is this a bug or just some "feature" that I was unaware of?

[This message has been edited by Dalgo (edited 03-01-2001).]
     
Dedicated MacNNer
Join Date: Jan 2001
Location: Virginia, US
Status: Offline
Reply With Quote
Feb 28, 2001, 11:19 AM
 
This means you also have an outlet named "usericon".

This is kind of a feature, really -- when setting an outlet named "foobar", the machinery first looks for a method named -setFoobar:, and if it's found, then it's invoked with the outlet as the argument and assumes the method sets the instance variable. If the method is not found, then the instance variable is assigned directly.

So, you either need to rename your outlet or rename your action method.
     
Dalgo  (op)
Mac Enthusiast
Join Date: Feb 2000
Location: Storrs,Connecticut, USA
Status: Offline
Reply With Quote
Mar 1, 2001, 05:17 AM
 
Okay. Interesting feature.
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:28 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2