• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
silly newbie obj-c question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

silly newbie obj-c question


  • Subject: silly newbie obj-c question
  • From: Duncan Campbell <email@hidden>
  • Date: Fri, 8 Apr 2005 13:59:50 +1000

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,

D.

_______________________________________________
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


  • Follow-Ups:
    • Re: silly newbie obj-c question
      • From: Stephane Sudre <email@hidden>
  • Prev by Date: Re: iSight & Cocoa - SGDataProc
  • Next by Date: Re: Good License other then GNU
  • Previous by thread: Rotating Monitor => rotated display
  • Next by thread: Re: silly newbie obj-c question
  • Index(es):
    • Date
    • Thread