• 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
Associating interface state with NIB content
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Associating interface state with NIB content


  • Subject: Associating interface state with NIB content
  • From: Graham <email@hidden>
  • Date: Thu, 21 Feb 2008 11:32:33 +1100

Hi all,

I have developed a general purpose "dockable palettes" system for an app I'm working on - you know the sort of thing, you can drag palettes around and drag them into sets, or drag them out into their own windows.

A palette can have any user content specified by attaching a view to the palette. The view comes from an outlet in a NIB file - maybe an existing NIB with multiple view outlets or separate NIBs (needs to be flexible).

The problem I have is how to efficiently save the user interface state between launches. Saving the size, positions and grouping of the palettes is no real problem but reconnecting it to the same actual content is currently a bit kludgey - I'm saving a unique tag string with each saved palette in the prefs and using that to identify the NIB+outlet that the content view comes from. It strikes me as fragile and awkward though.

Can anyone suggest an easier way? - I expect there's some obvious solution staring me in the face. Is there a place in a NIB-stored view that I can stash an identifier of some sort and then locate the view using this identifier when my app is launched?

--------
S.O.S.
_______________________________________________

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


  • Follow-Ups:
    • Re: Associating interface state with NIB content
      • From: Uli Kusterer <email@hidden>
  • Prev by Date: Re: Rotated NSImage drawAtPoint:... slow (*$?! photoshop)
  • Next by Date: How to get my class instance that's in IB
  • Previous by thread: Re: NSTableView tooltips
  • Next by thread: Re: Associating interface state with NIB content
  • Index(es):
    • Date
    • Thread