• 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
Re: Newbie: Simple display with NSView - problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:19:11 -0700 (PDT)

Graham,

Thank you for the reply. Is there any placeholder for the custom view that I can use in the NIB file such that I can instantiate the view in the code and then load it onto the window?

I can not hard code the filename into the custom view class and use it in the NIB as the image to be displayed will not always be the same and it can change depending on where the user will click on the main window.

Thanks,
Genu


--- On Wed, 10/1/08, Graham Cox <email@hidden> wrote:

> From: Graham Cox <email@hidden>
> Subject: Re: Newbie: Simple display with NSView - problem
> To: email@hidden
> Cc: email@hidden
> Date: Wednesday, October 1, 2008, 6:42 PM
> 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.
>
> hth,
>
> Graham



_______________________________________________

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

  • Follow-Ups:
    • Re: Newbie: Simple display with NSView - problem
      • From: Graham Cox <email@hidden>
References: 
 >Re: Newbie: Simple display with NSView - problem (From: Graham Cox <email@hidden>)

  • Prev by Date: NSURLConnection and HTTPS
  • Next by Date: Re: IB plugins
  • Previous by thread: Re: Newbie: Simple display with NSView - problem
  • Next by thread: Re: Newbie: Simple display with NSView - problem
  • Index(es):
    • Date
    • Thread