Re: Newbie: Simple display with NSView - problem
Re: Newbie: Simple display with NSView - problem
- Subject: Re: Newbie: Simple display with NSView - problem
- From: Genu Mathew <email@hidden>
- Date: Fri, 3 Oct 2008 08:22:55 -0700 (PDT)
Thanks, I will check it out and also change the name.
Genu
--- On Wed, 10/1/08, Jonathan del Strother <email@hidden> wrote:
> From: Jonathan del Strother <email@hidden>
> Subject: Re: Newbie: Simple display with NSView - problem
> To: email@hidden
> Cc: "Graham Cox" <email@hidden>, email@hidden
> Date: Wednesday, October 1, 2008, 6:47 PM
> On Thu, Oct 2, 2008 at 12:42 AM, Graham Cox
> <email@hidden> wrote:
> >
> > On 2 Oct 2008, at 5:02 am, Genu Mathew wrote:
> >
> >> On debugging, I found that when I run the command
> [NewWindow
> >> showWindow:self] in the APPController class, the
> constructor of
> >> 'OUSubImageView is called twice
> >
> >
> >
> > Sounds like you have one view instantiated in the nib
> and another one
> > instantiated in code. Do one or the other, but not
> both.
> >
> > If you set up your custom view in the nib, there's
> no need to init another
> > one - it already exists. Objects in nibs are real
> objects, they are not
> > placeholders for objects you create at runtime.
> >
>
> Also, I suspect that JPEGImage is nil. I'm guessing
> that the line in
> ssetImage that reads:
> [JPEGImage initWithContentsOfFile:imageFileImage];
> should actually be:
> JPEGImage = [[NSImage alloc]
> initWithContentsOfFile:imageFileImage];
>
> (While we're here, JPEGImage sounds like a class - the
> instance
> variable would usually be called jpegImage)
_______________________________________________
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