• 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: IBPalette Frustration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IBPalette Frustration


  • Subject: Re: IBPalette Frustration
  • From: "Shawn Erickson" <email@hidden>
  • Date: Wed, 23 May 2007 08:31:53 -0700

On 5/23/07, Mike Burns <email@hidden> wrote:
I know that this is a dumb newbie question but I would really
appreciate the help as I am truly stumped.

I've been trying to create an IBPalette for a custom view (SceneView)
so that I can expose some bindings in IB.  I created my project using
the IBPalette template, added code to the custom view Framework, and
set up the palette nib to include a custom view set to SceneView.
Everything compiles fine, and when I open Interface Builder I can add
the palette with Interface Builder->Preferences.

Problem is, when I select my palette in the Palette View, there is
nothing.  As I understand it (every piece of documentation I can find
shows this) the CustomView I created in SceneViewPalette is supposed
to show up here so I can drag it over to my window, but there's nada.

What am I doing wrong?

You have a subclass of IBPalette correct? That subclass takes ownership of a nib and in that need you should have a window (NSPanel in this case). In that window you need to place view elements that will be used to represent items available via your palette. You can either connect "originalWindow" of File's Owner to that window or in you subclass return a reference to the window by overriding originalWindow. So make sure the originalWindow connection exists.

Also you may have to associate view objects in the pallet window to
the real object it represents if the represented object isn't a view
object (not a sub-class of NSView). You can do that association in
finishInstantiate using -[IBPalette associateObject:ofType:withView:].

Finally check the console for error message when you attempt to use
the palette... likely want to quit out of IB fully and try it again to
see what you find.

If I had to guess something is wrong with the state of the palette
(possibly cannot find a class that it expects) and so palette loading
fails which results in nothing showing up when you click on your
palette icon. You should see something in console if this is happening
and IIRC an error dialog (at least in some cases).

-Shawn
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: 
 >IBPalette Frustration (From: Mike Burns <email@hidden>)

  • Prev by Date: Re: Key hooks and Mouse hooks
  • Next by Date: Re: releasing NSProgressIndicator
  • Previous by thread: IBPalette Frustration
  • Next by thread: Key hooks and Mouse hooks
  • Index(es):
    • Date
    • Thread