• 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: Draggable Tags?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Draggable Tags?


  • Subject: Re: Draggable Tags?
  • From: Kay Roepke <email@hidden>
  • Date: Fri, 2 Jul 2004 23:11:42 +0200

On 2. Jul 2004, at 7:16 Uhr, Rachel Blackman wrote:

I am trying to implement something a little odd, a heavily-customized
tab view.

[...]

Implementing the NSDraggingSource informal protocol in my NSTabViewItem
subclass doesn't seem to do it, neither does adding it in my custom
NSTabView subclass. In fact, the draggingSourceOperationMaskForLocal:
method is never even called. :(

Any advice/help/pointers? Thanks!

I have once been cracy enough to try something very similar. Try looking in the archives
for "tear off" and "tabview item" (or some combination of those keywords).

The trouble is that NSTabView enters its own private run loop to catch mouse drags after
the mouseDown event. Ever noticed that once you click and drag a tabviewItem the selected
item will follow the mouse drag? That's the catch.
You need to override mouseClicked (or was it called mouseDown:? - can't remember right now)
and do your own handling of the drags.
The tricky part will probably be to actually produce a nice looking drawing (that's where I
left the stage - after all it was mostly a proof-of-concept project for me) while dragging.
I haven't been able to get a hold of the actual tabViewItem's screen representation to
redraw while dragging. Maybe it's just because I didn't try hard enough ;-)

Anyway, if you don't succeed via the archives send me a private message and I'll go
looking for the source code. It must be somewhere around those disks ;-)

Regards,

Kay
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Draggable Tags? (From: Rachel Blackman <email@hidden>)

  • Prev by Date: Re: Object class name/setObjectClass in NSController
  • Next by Date: Re: Adding methods to dataSource
  • Previous by thread: Draggable Tags?
  • Next by thread: Re: Draggable Tags?
  • Index(es):
    • Date
    • Thread