Re: NSTimer issue
Re: NSTimer issue
- Subject: Re: NSTimer issue
- From: Daniel Luis dos Santos <email@hidden>
- Date: Thu, 6 Nov 2008 13:32:21 +0000
You already answered your own question. If you see two different
values for 'self' for two objects of your view subclass then of
course there are two instances.
The NIB file has a window taken from the pallete, where I have dropped
a button and a generic NSView both from the pallete. On the NSView's
properties I have changed the class name from NSView to a class in my
Xcode project. I also have an NSObject item taken from the pallete
which represents the same object implementing the view.
This situation usually comes about when a view is created in code,
and a view of the same class is also added to a NIB file.
Note that, because the view you're actually controlling via the
timer (presumably the one created in code) doesn't draw, it probably
hasn't been added to a superview either. It sounds like you
accidentally created a new view instead of getting a reference to
the one in the NIB file using an IBOutlet.
Now it is obvious that the view in the window and the object in the
xib are not the same.
_______________________________________________
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