Re: After Unarchive Object Exists, After First GUI Action, gone...
Re: After Unarchive Object Exists, After First GUI Action, gone...
- Subject: Re: After Unarchive Object Exists, After First GUI Action, gone...
- From: Andrew Farmer <email@hidden>
- Date: Mon, 21 Apr 2008 01:16:56 -0700
On 20 Apr 08, at 18:55, John Joyce wrote:
Looks like I found a solution... anyone please let me know if my
solution stinks. (or any of the rest of this thing!)
In the method
- (void)windowControllerDidLoadNib:(NSWindowController *) aController
I added this:
[textView setString:[[stickitNotes objectAtIndex:0] noteBody]];
A few general notes:
1. You should never have to call setNeedsDisplay: on anything except
self (in NSView subclasses). A properly written view will do that on
its own when its contents change.
2. There's a lot of duplication in your code. You should probably
factor out some common code into a new method (updateCurrentNotes?
setNoteIndex?). Alternatively, you may want to take a look at Cocoa
Bindings - in particular, NSArrayController - which should be able to
do a lot of this work for you.
_______________________________________________
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