• 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: Is it possible to define class from interface builder?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it possible to define class from interface builder?


  • Subject: Re: Is it possible to define class from interface builder?
  • From: Fritz Anderson <email@hidden>
  • Date: Wed, 14 Aug 2013 09:53:46 -0500

On 14 Aug 2013, at 6:48 AM, Izak van Langevelde <email@hidden> wrote:

> On 13 aug. 2013, at 20:43, Scott Ribe wrote:
>
>> On Aug 13, 2013, at 12:34 PM, Izak van Langevelde <email@hidden> wrote:
>>
>>> Is there any way to derive a subclass of NSView from this form, so that it can be reused?
>>
>> NSViewController, combined with a window nib containing the form, so you'd instantiate the nib, pull out the content view, and so on?
>
>
> Works for me, but it feels clumsy that entities created in interface builder can only be reused through code.
> I had hoped for a more elegant solution.

I'm curious to know what a more-elegant solution would look like.

Having to write code to ask for a copy of a view is only rational: How would you get a new copy without asking?

NSViewController takes the name+bundle for a NIB. It loads the view and connects it to your subclass object automatically. Your subclass takes it from there.

That looks like the most AppKit (or any other solution) could do for you; Cocoa does everything it knows about, and you code only what's unique to your application.

What more do you envision?

	— F


_______________________________________________

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: Is it possible to define class from interface builder?
      • From: Scott Ribe <email@hidden>
References: 
 >Is it possible to define class from interface builder? (From: Izak van Langevelde <email@hidden>)
 >Re: Is it possible to define class from interface builder? (From: Scott Ribe <email@hidden>)
 >Re: Is it possible to define class from interface builder? (From: Izak van Langevelde <email@hidden>)

  • Prev by Date: Re: "Provide Feedback" on documentation pages is broken
  • Next by Date: Re: Dismissing Open dlog before doc actually opens
  • Previous by thread: Re: Is it possible to define class from interface builder?
  • Next by thread: Re: Is it possible to define class from interface builder?
  • Index(es):
    • Date
    • Thread