• 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: NSView subclass IB plug-ins conundrum
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSView subclass IB plug-ins conundrum


  • Subject: Re: NSView subclass IB plug-ins conundrum
  • From: "Dalzhim Dalzhim" <email@hidden>
  • Date: Thu, 23 Oct 2008 14:05:38 -0400

Hello Martin-Gilles,

in your NSView subclass interface builder implementation category, add the following method:

- (NSView *)ibDesignableContentView
{
    retourne self;
}

You can also have a look at the documentation of this method if you wish to know what would be the effects of returning something else than self.


-Dalzhim



2008/10/23 Martin-Gilles Lavoie <email@hidden>
Hi folks.

Been a while since I couldn't answer my question by sifting through the web...

Up until now, we've been using an NSView subclass in our code, by setting the class name in Interface Builder Custom View object. This allows us to drop objects inside that view, such as buttons and whatnot, directly from within IB.

This NSView subclass is a complete layout management class and the number of possibilities in that code has piled up so much that I've decided it was time to create an IB plug-in to handle the many possible configuration of that subclass. Originally, everything was setup programatically within our awakeFromNib methods.

So, at this point, I have a complete IB plug-in with switches in the inspector that allows me to toggle some options of that class of ours. All fine and dandy.

However, for some reason, IB itself doesn't recognise our view as being a subclass of NSView and it wont let me drop objects inside it, like it does for recular custom views. The object is treated as a non-container.

What gives?

Martin-Gilles Lavoie | Senior software developer | 514.905.8658
Oracle - Macintosh Native Desktop Client, Beehive
600, boul. de Maisonneuve West, Suite  1900 | Montréal (Québec)  H3A 3J2



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSView subclass IB plug-ins conundrum
      • From: Martin-Gilles Lavoie <email@hidden>
References: 
 >NSView subclass IB plug-ins conundrum (From: Martin-Gilles Lavoie <email@hidden>)

  • Prev by Date: NSView subclass IB plug-ins conundrum
  • Next by Date: Re: NSView subclass IB plug-ins conundrum
  • Previous by thread: NSView subclass IB plug-ins conundrum
  • Next by thread: Re: NSView subclass IB plug-ins conundrum
  • Index(es):
    • Date
    • Thread