• 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: Faulty NSWindow connection in CoreData doc-based app?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Faulty NSWindow connection in CoreData doc-based app?


  • Subject: Re: Faulty NSWindow connection in CoreData doc-based app?
  • From: Cameron Hendrix <email@hidden>
  • Date: Thu, 04 Aug 2005 19:22:59 -0700

Charilaos Skiadas wrote:

>How are you testing it? In my project it seems to be connected just fine.
>If you select File's Owner and go to the connections inspector, isn't there a
>window connection?

Yes, there is a window connection in the NIB file, which is what seems so strange.  I am testing it by, in my "windowControllerDidLoadNib" code (after calling the super implementation), setting the alpha value of the window to a value like 0.5.

James DiPalma wrote:

>Sounds good, but when your nib file is loaded, your window outlet (properly
>established in IB) is connected by calling setWindow: which will not
>set your window ivar. This behavior is probably unexpected (*).

I think this pointed me in the right direction.  The documentation suggested that setWindow: could be overridden, so I did, as such:

-(void)setWindow:(NSWindow *)aWindow {
	window = aWindow;
	[super setWindow:aWindow];
}

Which brings me to another question.  Do I need to release the "window" object, even though I didn't allocate/retain it myself?  For now (until I play around with it), I assume not.  The memory management thing is still rather new to me, as I used to code prolifically in Java.

Thanks for all the help,

Cameron
 _______________________________________________
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

  • Prev by Date: Re: Using C++ AutoPtr within an Obj C file.
  • Next by Date: NSMatrix prototype cell
  • Previous by thread: Re: Faulty NSWindow connection in CoreData doc-based app?
  • Next by thread: ComboBox Questions
  • Index(es):
    • Date
    • Thread