• 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: Finding windows made in Interface Builder?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finding windows made in Interface Builder?


  • Subject: Re: Finding windows made in Interface Builder?
  • From: "Blain Hamon" <email@hidden>
  • Date: Wed, 11 Jul 2007 09:22:01 -0700


On Jul 11, 2007, at 9:08 AM, I. Savant wrote:

I have like fifty or so windows and was sort of hoping
I could just find them by an identifier.

NSWindow doesn't have an "identifier". If you really have "fifty or so" wndows and that number is fixed (ie, not arbitrary like opening a new generic "message" window for each viewed message in Mail), you'll probably have to share more details about your design if you want suggestions for a better approach. I suspect something about your design could benefit from further consideration. If I'm wrong about that,

Agreed. The structure is the key. Is this one document that has 50 windows to it? If so, you might want to reconsider your layout. Otherwise, if this is one core application window, and 49 subwindows, identical in structure, each representing a discrete object, then you might be able to misuse NSDocumentManager. That is, treat each subwindow as a file, and then you can use DocumentManager or WindowManager to parse through them.


The other way to do this, with less NS abuse, would be to have an NSArray of controller objects that you've made. Each controller object would 'own' a nib, and thus, only need one or two window outlets. But again, either way, you've still got 50 outlets. It's just that you've added another layer of obfuscation, or hidden it in something else.

I savant is right in suggesting that it might be design, not implementation, that is the issue.

_______________________________________________

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: 
 >Finding windows made in Interface Builder? (From: Kai-Mikael Jää-Aro <email@hidden>)
 >Re: Finding windows made in Interface Builder? (From: "I. Savant" <email@hidden>)
 >Re: Finding windows made in Interface Builder? (From: Kai-Mikael Jää-Aro <email@hidden>)
 >Re: Finding windows made in Interface Builder? (From: "I. Savant" <email@hidden>)

  • Prev by Date: Re: Finding windows made in Interface Builder?
  • Next by Date: Re: Wait for applescript to complete
  • Previous by thread: Re: Finding windows made in Interface Builder?
  • Next by thread: fileDidClose Notification?
  • Index(es):
    • Date
    • Thread