• 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: After Unarchive Object Exists, After First GUI Action, gone...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Re: After Unarchive Object Exists, After First GUI Action, gone... (From: John Joyce <email@hidden>)

  • Prev by Date: Trying to calculate a running total using Core Data
  • Next by Date: Re: Implementing a Slightly Unusual NSTableView
  • Previous by thread: Re: After Unarchive Object Exists, After First GUI Action, gone...
  • Next by thread: Re: After Unarchive Object Exists, After First GUI Action, gone...
  • Index(es):
    • Date
    • Thread