Re: may not respond to '-addSubView:'...
Re: may not respond to '-addSubView:'...
- Subject: Re: may not respond to '-addSubView:'...
- From: patrick <email@hidden>
- Date: Mon, 9 Jan 2006 10:08:49 -0800
Of course! Thanks for spotting that.
Patrick
On 1/8/06, Eric Smith <email@hidden> wrote:
> You need to replace the uppercase V with a lowercase: addSubview.
>
> Eric
>
> On Jan 8, 2006, at 9:42 PM, patrick wrote:
>
> > I'm creating a simple screen saver that will use a custom view class
> > from another project. I'm trying to add this second view to the screen
> > saver view with:
> >
> > @implementation MyScreenSaverView
> >
> > - (id)initWithFrame:(NSRect)frame
> > {
> > // create custom view
> > myView = [ ... initialize ... ];
> > [self addSubView:myView];
> > }
> >
> > ...
> >
> > @end
> >
> > When I compile, I get a warning:
> >
> > (Messages without a matching method signature will be assumed to
> > return 'id' and accept '...' as arguments.)
> > warning: 'MyScreenSaverView' may not respond to '-addSubView:'
> >
> > Given that ScreenSaverView is an NSView, why wouldn't it respond to
> > addSubView?
> >
> > Patrick
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Cocoa-dev mailing list (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> > 40mac.com
> >
> > This email sent to email@hidden
>
>
_______________________________________________
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