Re: Qustion about possibly bad advice in NSView documentation
Re: Qustion about possibly bad advice in NSView documentation
- Subject: Re: Qustion about possibly bad advice in NSView documentation
- From: Dominik Pich <email@hidden>
- Date: Tue, 25 Sep 2007 17:26:47 +0200
Hi, you verfied this? I was under the impressions that
performSelector same as NSInvocation transparently 'unwraps'
NSValues........or maybe only NSInvocation!?
well that's what I understood and that may be totally wrong :)
IF it is: sorry for bad advice :)
Regards,
Dominik
On 25.09.2007, at 17:11, Erik Buck wrote:
Indeed, you can wrap NSRect structures in an NSValue object. That
doesn't help in this case. The documentation seems to be
suggesting that the following is valid (I don't think it is):
- (void)drawRect:(NSRect)aRect
{
[self performSelector:@selector(setNeedsDisplayInRect:)
withObject:NSMakeRect(0,0, 100, 100) afterDelay:0.0];
}
Even if this is changed to use NSValue, it doesn't help:
- (void)drawRect:(NSRect)aRect
{
[self performSelector:@selector(setNeedsDisplayInRect:)
withObject:[NSValue valueWithRect:NSMakeRect(0,0, 100, 100)]
afterDelay:0.0];
}
I doesn't help because the setNeedsDisplayInRect: method is not
expecting an NSValue argument; it's expecting an NSRect structure
argument.
Dominik Pich <email@hidden> wrote:
You can wrap primitves using the NSValue class and pass it that
way
as an object.
_______________________________________________
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
_______________________________________________
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