• 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: self Changes on Open Panel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: self Changes on Open Panel


  • Subject: Re: self Changes on Open Panel
  • From: "K. Darcy Otto" <email@hidden>
  • Date: Tue, 9 Jun 2009 09:41:27 -0700

Okay, so if I'm seeing two different objects, I guess the question is, where is the second object being created? I had a look an my .xib: the File's Owner is of type "MyDocument"; but there appear to be no places where I instantiate a MyDocument object. I put an NSLog into the -init of MyDocument; it seems like it is only being called once. Is there some other way to create the object (there are no other init- type routines in the class)?

On 8-Jun-09, at 10:55 PM, Fritz Anderson wrote:

On 8 Jun 2009, at 10:02 PM, K. Darcy Otto wrote:

The sheet opens at *. Two questions: (i) why is MyDocument at a different address before and after * (incidentally, it changes back to 0x1036290 after the sheet has closed)? (ii) Why is sheetOpen (which is a class variable) not YES after * (in fact, under no circumstances does it return a YES, before, during or after the sheet)?

What you're describing isn't one object moving around and "resetting" its contents. What you're seeing are two different objects.


Are you instantiating a MyDocument within your NIB? Don't. Documents get created by AppKit, in memory. They are represented by "File's Owner" in Interface Builder. Adding a new one in the NIB will get you a second document.

	— F

--
Fritz Anderson -- Xcode 3 Unleashed: Now in its second printing -- <http://x3u.manoverboard.org/ >



_______________________________________________

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


References: 
 >self Changes on Open Panel (From: "K. Darcy Otto" <email@hidden>)
 >Re: self Changes on Open Panel (From: Fritz Anderson <email@hidden>)

  • Prev by Date: Re: How to tell if a Panel is Open
  • Next by Date: Re: [NSTask] -launch return
  • Previous by thread: Re: self Changes on Open Panel
  • Next by thread: Re: self Changes on Open Panel
  • Index(es):
    • Date
    • Thread