Re: Tracking visibleRect changes using Autolayout

2013-02-18 Thread Kyle Sluder
On Sun, Feb 17, 2013, at 11:46 PM, iain wrote:
 I'll give this a go, does -setFrameSize just deal with the visible
 portion
 when inside an NSScrollView/NSClipView? If so, thank you, that's great.

No. You're missing my point.

You have -viewWillDraw, an override point at which you know your view
will draw. You don't need to track your visible rect. You will only be
asked to draw rects that intersect with your visible rect[1]. Just query
-getRectsBeingDrawn:count: from within -drawRect, and render your
waveform for those rects.

Or better yet, fork that work off to a background queue.

[1] If your view is layer-backed, this becomes a lot more complicated.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Dynamic Creation

2013-02-18 Thread Christ Levesque
Ability to create instances of classes that did not exist at the time an app 
was compiled and dynamically load and link new class at runtime.
How to implement it?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


What is the meaning of idMyProtocol?

2013-02-18 Thread Christ Levesque

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: What is the meaning of idMyProtocol?

2013-02-18 Thread Jean-Daniel Dupas

http://www.catb.org/esr/faqs/smart-questions.html

Le 18 févr. 2013 à 10:20, Christ Levesque iapplechocol...@me.com a écrit :

 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please 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:
 https://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org
 
 This email sent to devli...@shadowlab.org

-- Jean-Daniel





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: What is the meaning of idMyProtocol?

2013-02-18 Thread Mike Abdullah
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithProtocols/WorkingwithProtocols.html#//apple_ref/doc/uid/TP40011210-CH11-SW1

On 18 Feb 2013, at 09:20, Christ Levesque iapplechocol...@me.com wrote:

 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please 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:
 https://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
 
 This email sent to cocoa...@mikeabdullah.net


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Accessors

2013-02-18 Thread Christ Levesque
Technique for funneling all access to an objects properties at runtime.
As you know we can use accessors that @property declared but the question is 
there when you create an objects at runtime  how to create accessors for them.

How to implement it?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Archiving and Unarchiving dynamic objects at runtime

2013-02-18 Thread Christ Levesque
Used to copy or store a group of interrelated dynamic objects at runtime.

How to implement it?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Associative Storage

2013-02-18 Thread Christ Levesque
Organizes data and keys so that data can be quickly and easily accessed used 
the corresponding keys at runtime based on dynamic objects.

How to implement it?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Flyweight

2013-02-18 Thread Christ Levesque
1- Reduce storage requirements 2- Stand-Ins for other objects

How to implement it?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Facade

2013-02-18 Thread Christ Levesque
1- Provide a simple interface to a complex subsystem. 2- Limit coupling.

How to implement them?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Proxies and Forwarding

2013-02-18 Thread Christ Levesque
1- Allow message to be sent to an objector that is separated from the message's 
sender by time or space.
2- Forwarding simplifies the capture of messages as invocations so that they 
can be resent, delayed, repeated, stored, or altered

How to implement them?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Flyweight

2013-02-18 Thread Ronald Oussoren

On 18 Feb, 2013, at 10:59, Christ Levesque iapplechocol...@me.com wrote:

 1- Reduce storage requirements 2- Stand-Ins for other objects
 
 How to implement it?

Write some code?

Your questions are too vague to give sane answers, and also give the impression 
that you are using the list as a homework anwering service.

Ronald

 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please 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:
 https://lists.apple.com/mailman/options/cocoa-dev/ronaldoussoren%40mac.com
 
 This email sent to ronaldousso...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Associative Storage

2013-02-18 Thread Fritz Anderson
On 18 Feb 2013, at 3:58 AM, Christ Levesque iapplechocol...@me.com wrote:

 Organizes data and keys so that data can be quickly and easily accessed used 
 the corresponding keys at runtime based on dynamic objects.
 
 How to implement it?

At your first question or two, I was inclined to answer, but your questions 
reflect complete ignorance of Objective-C and the Cocoa frameworks. Apple's 
documentation offers excellent introductions to these concepts, and there are 
many good books.

The busy people who participate in this list do not have time to read them to 
you. Read them yourself.

— F

-- 
Fritz Anderson
Xcode 4 Unleashed: 4.5 supplement for free!
http://www.informit.com/store/xcode-4-unleashed-9780672333279


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Associative Storage

2013-02-18 Thread Alex Zavatone
Stop it.

On Feb 18, 2013, at 4:58 AM, Christ Levesque wrote:

 Organizes data and keys so that data can be quickly and easily accessed used 
 the corresponding keys at runtime based on dynamic objects.
 
 How to implement it?
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please 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:
 https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
 
 This email sent to z...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Tracking visibleRect changes using Autolayout

2013-02-18 Thread Kyle Sluder
Resending to the list.

On Feb 18, 2013, at 2:50 AM, iain i...@sleepfive.com wrote:

 
 
 On Mon, Feb 18, 2013 at 7:17 PM, Kyle Sluder k...@ksluder.com wrote:
 On Sun, Feb 17, 2013, at 11:46 PM, iain wrote:
  I'll give this a go, does -setFrameSize just deal with the visible
  portion
  when inside an NSScrollView/NSClipView? If so, thank you, that's great.
 
 No. You're missing my point.
 
 You have -viewWillDraw, an override point at which you know your view
 will draw. You don't need to track your visible rect. You will only be
 asked to draw rects that intersect with your visible rect[1]. Just query
 -getRectsBeingDrawn:count: from within -drawRect, and render your
 waveform for those rects.
 
 Well, that's essentially what I'm doing, by only drawing in the dirtyRect 
 (yeah, I know that's just one big union of the results of getRectsBeingDrawn, 
 but essentially).

Right, but you're missing the crucial step of caching this drawing.

I'm obviously not being clear. Here's some pseudocode:

- setFrameSize:(NSSize)size {
  [super setFrameSize:size];
  [self discardEntireWaveformCache];
}

- setNeedsDisplayInRect:(NSRect)rect {
  [super setNeedsDisplayInRect:rect];
  [self invalidateWaveformCacheForReft:rect];
}

- viewWillDraw {
  if ([self waveformCacheDiscarded]) {
[self allocateWaveformCacheOfSize:self.bounds.size];
  }

  for (NSRect rect in [self getRectsBeingDrawn]) {
if (!([self waveformCacheIsValidForRect:rect])) {
  [self cacheWaveformForRect:rect];
}
  }
}

- drawRect:(NSRect)unused {
  for (NSRect rect in [self getRectsBeingDrawn]) {
[self drawWaveformCacheForRect:rect];
  }
}

Implementation of the waveform cache, as well as more sophisticated techniques 
like background rendering the waveform cache are left as exercises to the 
reader.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Facade

2013-02-18 Thread Ian was here
There is a wonderful book Cocoa Design Patterns. I would highly recommend 
reading it.




 From: Christ Levesque iapplechocol...@me.com
To: cocoa-dev@lists.apple.com cocoa-dev@lists.apple.com 
Sent: Monday, February 18, 2013 2:00 AM
Subject: Facade
 
1- Provide a simple interface to a complex subsystem. 2- Limit coupling.

How to implement them?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/howlewere%40yahoo.com

This email sent to howlew...@yahoo.com
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Dynamic Creation

2013-02-18 Thread Wim Lewis

On 18 Feb 2013, at 1:17 AM, Christ Levesque wrote:
 Ability to create instances of classes that did not exist at the time an app 
 was compiled and dynamically load and link new class at runtime.
 How to implement it?


NSBundle is the Cocoa way to deal with loading new code at runtime (plugins, 
etc). (Or CFBundle if you prefer the CoreFoundation APIs.) You can either use 
NSBundle's -principalClass or -classNamed: methods to find the newly-loaded 
class, or you can give the class a +load method and have it register itself 
with your app somehow when the bundle is loaded. (See the NSObject 
documentation for information about the +load method.)





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


No mouseExited when switching windows

2013-02-18 Thread Steve Mills
If I set up an NSTrackingArea in my view as so:

NSTrackingArea* trackingArea = [[NSTrackingArea alloc] 
initWithRect:box options:(NSTrackingInVisibleRect | NSTrackingMouseMoved | 
NSTrackingMouseEnteredAndExited | NSTrackingActiveInKeyWindow) owner:self 
userInfo:nil];

Shouldn't I get a mouseExited message when I switch windows via command-` if 
the mouse is still within my tracking area? If not, what do I have to do to be 
notified when the window the view is no longer the active window?

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: No mouseExited when switching windows

2013-02-18 Thread Fritz Anderson
On 18 Feb 2013, at 4:34 PM, Steve Mills smi...@makemusic.com wrote:

 what do I have to do to be notified when the window the view is no longer the 
 active window?

Notified is the right word. NSWindow posts NSWindowDidResignKeyNotification 
and NSWindowDidResignMainNotification. There are also delegate methods with 
nearly the same names (which get passed the same notification objects).

— F

-- 
Fritz Anderson
Xcode 4 Unleashed: 4.5 supplement for free!
http://www.informit.com/store/xcode-4-unleashed-9780672333279


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Tracking visibleRect changes using Autolayout

2013-02-18 Thread iain


  On Mon, Feb 18, 2013 at 7:17 PM, Kyle Sluder k...@ksluder.com wrote:

 Right, but you're missing the crucial step of caching this drawing.


You're right, I did miss that, but you'd missed where I'd said I couldn't
cache the whole drawing, because it might be 60,000,000 pixels wide.

However, you did show me -viewWillDraw and it seems like a good place to
check if my visibleRect: has changed size, invalidating the much smaller
cached drawing that I have.

thanks,
iain
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


dragging NSTableColumn to another table

2013-02-18 Thread Chuck Soper
I have a view-based table with a single row. I want to be able to drag
columns to another table and (within the same table for reordering). For
this, I can't use the standard NSTableView column reordering. I've already
subclassed NSTableHeaderCell for custom drawing.

Does anyone know the steps to allow custom dragging of a table column to
another table? Is this possible? If I was dealing with an NSView subclass,
I think this would be straightforward. I want to show the entire column
(header + row) when dragging. I believe that the dragging implementation
could go in my NSTableHeaderCell subclass, but I'm not sure how to get
started.

Thanks,

Chuck


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Custom drawn window like Game Center

2013-02-18 Thread Nick
Hi. I'm wondering what would be the most correct way to create an app
looking like Game Center (with the title drawn with white font, and  custom
background images for the titlebar and the client area, but to make it
behave completely like a normal OS X application). Is it possible to make
such an app for several systems (Snow Leopard, Lion, Mountain Lion),
looking natively? Do Apple programmers have some extra internal
tools/Frameworks (something like ProKit) for making GUIs like that, or do
they paint their windows completely by hands from scratch (from
borderless window), and reimplementing the Cocoa window behavior?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Custom drawn window like Game Center

2013-02-18 Thread Kévin Vavelin
You can take a look on WWDC 2012 video session that talk about custom UIView ;) 
they take find my friends as an example. It's not from scratch, it's all about 
image pattern and good code.



Vavelin Kevin
OS X / iOS Developer
Entrepreneur

On 19 févr. 2013, at 02:16, Nick eveningn...@gmail.com wrote:

 Hi. I'm wondering what would be the most correct way to create an app
 looking like Game Center (with the title drawn with white font, and  custom
 background images for the titlebar and the client area, but to make it
 behave completely like a normal OS X application). Is it possible to make
 such an app for several systems (Snow Leopard, Lion, Mountain Lion),
 looking natively? Do Apple programmers have some extra internal
 tools/Frameworks (something like ProKit) for making GUIs like that, or do
 they paint their windows completely by hands from scratch (from
 borderless window), and reimplementing the Cocoa window behavior?
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please 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:
 https://lists.apple.com/mailman/options/cocoa-dev/vavelinkevin%40icloud.com
 
 This email sent to vavelinke...@icloud.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: No mouseExited when switching windows

2013-02-18 Thread Kyle Sluder
On Feb 18, 2013, at 2:34 PM, Steve Mills smi...@makemusic.com wrote:

 
 Shouldn't I get a mouseExited message when I switch windows via command-` if 
 the mouse is still within my tracking area? If not, what do I have to do to 
 be notified when the window the view is no longer the active window?

I'm not certain of the answer to this question, but what does your 
-updateTrackingAreas look like? If you follow Apple's erroneous example and 
recreate your tracking are every time this method is called, you *will* drop 
-mouseExited: events on the floor.

A correct override of -updateTrackingAreas only creates and installs the 
tracking area if it has not already been created and installed. I don't know 
for certain if this fixes the window-changed situation.

--Kyle Sluder

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: dragging NSTableColumn to another table

2013-02-18 Thread Graham Cox

On 19/02/2013, at 11:09 AM, Chuck Soper chu...@veladg.com wrote:

 Does anyone know the steps to allow custom dragging of a table column to
 another table? Is this possible? If I was dealing with an NSView subclass,
 I think this would be straightforward. I want to show the entire column
 (header + row) when dragging. I believe that the dragging implementation
 could go in my NSTableHeaderCell subclass, but I'm not sure how to get
 started.


It's definitely possible, but you'll have to do a bit of subclassing. I suspect 
you're going to need to subclass the overall NSTableView so that you can 
receive a private drag type and do the necessary graphics work as part of 
NSDraggingDestination.

There are two parts to a drag - the drag source and the drag destination. The 
source can be your custom table header cell, but the destination is probably 
going to have to be a subclass of the table view itself. The two parts can be 
programmed fairly independently, once you've settled on how they are going to 
communicate in terms of the column data you pass from to the other.

Having subclassed your table header cell, kicking off the drag shouldn't be too 
hard - just handle the mouseDown or mouseDragged and capture an image of the 
column as the drag image. NSView's method for capturing part of a view to a 
bitmap rep is invaluable here. Declare a private drag type and use whatever 
data makes sense to pass the column content through the drag pasteboard 
mechanism - you might not need to actually transfer any data, you could just 
store enough info in shared variables (e.g. just make a note of the source 
column somewhere) that your custom table class can access - as it's all private 
there's no need to consider dragging to other apps or supporting standard data 
formats.

The hardest part as I see it is in receiving the drag. Your custom table class 
will register for the private drag type, and implement NSDraggingDestination 
methods to do whatever is needed to provide feedback and validation of the 
drag. You will need for example to highlight the place where the column can be 
dropped, and maybe animate moving other columns apart to make room. You'll 
want to pass anything else up to super's implementation to continue supporting 
all the standard dragging that the table can handle.

On a drop, you just need to remove the column from the source, use the private 
data to recreate it at the destination and insert it into the table view.

--Graham


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please 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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com