Re: IBPalettes
Re: IBPalettes
- Subject: Re: IBPalettes
- From: Rainer Brockerhoff <email@hidden>
- Date: Sun, 3 Oct 2004 21:58:58 -0300
>On Sep 29, 2004, at 7:18 PM, Rainer Brockerhoff wrote:
>>I'm writing a ground-up replacement for NSSplitView and, of course, seized the occasion to do an IBPalette for it too - it would be somewhat worthless otherwise, anyway.
>>
>>I did make some headway for the basic stuff by looking at the available IBPalette samples, but I need to do more complex processing, like showing generated subviews in the instance outline view, allowing dragging other views into my split view's subviews, and so on.
Well, here's an intermediate progress report. I've managed to set up a split view with two subviews and have it set up correctly in the IB window, showing the two subviews correctly in the outline view, too.
The snag is, I can't figure out a way to allow the user to drag other views - buttons, NSTextViews and so forth - into those subviews. The accepted procedure is to register some permanent object as a dragging delegate with +[NSView registerViewResourceDraggingDelegate], then have the delegate implement:
- (NSArray *)viewResourcePasteboardTypes {
return [NSArray arrayWithObject:IBViewPboardType];
}
to indicate that it wants to get dragged-on views (or whatever).
Unfortunately this works for all IB object types _except_ for views. If I substitute any of the other entity types for IBViewPboardType, it works correctly; my view is highlighted and my delegate is called correctly.
I have used the available APIs and judicious breakpoints to check out whether built-in dragging delegates want to handle IBViewPboardType (none do) and whether the views that can be dragged put IBViewPboardType correctly on the pasteboard (they do).
I can only conclude that, either by bug or by design, Interface Builder intercepts view drags prematurely and doesn't pass them on to third-party IBPalettes at all.
Has somebody any light to shed on this issue, or a workaround? I'll file a bug anyway but wonder if it's any use wasting a support incident on something that _should_ be working correctly...
--
Rainer Brockerhoff <email@hidden>
Belo Horizonte, Brazil
"It's extremely unlucky to be superstitious, for no other reason
than it is always unlucky to be colossally stupid." (Stephen Fry)
Weblog: http://www.brockerhoff.net/bb/viewtopic.php
_______________________________________________
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