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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com