Re: silly newbie obj-c question
Re: silly newbie obj-c question
- Subject: Re: silly newbie obj-c question
- From: Stephane Sudre <email@hidden>
- Date: Fri, 8 Apr 2005 11:56:16 +0200
On 8 avr. 05, at 05:59, Duncan Campbell wrote:
I'm pretty new to obj-c, and am having problems with something that
should be really easy, but the answer eludes me..
I have a main NSView, with a property - (float) size;
I have defined key/values for this property in the usual way:
-(float)size;
-(void)setSize:(float)newSize;
Now in this view, I am creating child NSViews and I want to access the
value of the parent "size" property from these child objects.
In the child NSView, i have tried:
[ [self superview] size]
and also
[[self superview] valueForKey:@"size"]
neither of which work.
Can anyone help out?
Cheers,
What does NSLog(@"%@", [self superview]); is saying?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden