• 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: InterfaceBuilder - Palletizing Windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InterfaceBuilder - Palletizing Windows


  • Subject: Re: InterfaceBuilder - Palletizing Windows
  • From: Ricky Sharp <email@hidden>
  • Date: Mon, 4 Sep 2006 20:16:57 -0500


On Sep 4, 2006, at 6:49 PM, Alberto Ricart wrote:

I know that this has been discussed previously but I am yet to to see a solution. Is there a way of palletizing an NSWindow/NSPanel. Our window draws its own background, and we want to make it easy to create windows of this kind without adding code specific to the window type.

First, pleast don't cross-post.


I haven't yet done this myself, but I think the following will work:

@interface YourPalette : IBPalette <IBViewResourceDraggingDelegates>
{
@protected
    IBOutlet NSImageView* yourWindowProxy;

    YourWindow* yourWindow;

...
}

Then in the implementation...

- (void)finishInstantiate
{
    yourWindow = [[[YourWindow alloc] initWithThisAndThat...

[self associateObject:yourWindow ofType:IBWindowPboardType withView:yourWindowProxy];
}


I believe the key thing here is using IBWindowPboardType. Note that you use IBViewPboardType for views (controls, etc.)


In your palette's nib, put an NSImageView to represent your window object (assign to yourWindowProxy outlet). You should then be able to drag these windows/panels to nibs from your palette.


Add in a custom inspector, and you're all done.

___________________________________________________________
Ricky A. Sharp         mailto:email@hidden
Instant Interactive(tm)   http://www.instantinteractive.com

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


  • Follow-Ups:
    • Re: InterfaceBuilder - Palletizing Windows
      • From: Alberto Ricart <email@hidden>
References: 
 >InterfaceBuilder - Palletizing Windows (From: Alberto Ricart <email@hidden>)

  • Prev by Date: InterfaceBuilder - Palletizing Windows
  • Next by Date: Re: What's the fastest way to get icons for file/folders?
  • Previous by thread: InterfaceBuilder - Palletizing Windows
  • Next by thread: Re: InterfaceBuilder - Palletizing Windows
  • Index(es):
    • Date
    • Thread