Re: Drag with NSTableview
Re: Drag with NSTableview
- Subject: Re: Drag with NSTableview
- From: Andrew Merenbach <email@hidden>
- Date: Sun, 5 Aug 2007 16:40:26 -0700
The code in WithBindings, however, does not support multiple items in
a drag, whereas the Bookmarks code does. Although it might be
trivial for a more experienced programmer to implement that
functionality, for a beginner the Bookmarks example would likely
still be useful.
Cheers,
Andrew
On Aug 5, 2007, at 3:40 PM, mmalc crawford wrote:
On Aug 5, 2007, at 2:17 PM, Andrew Merenbach wrote:
Does it completely supersede it? The WithAndWithoutBindings
example doesn't appear to include an NSArrayController especially
dedicated to drag-and-drop, something which I had found very useful.
Is there a reason not to implement drag-and-drop in the array
controller, which one would then use as the actual data source of
the table view?
The drag and drop code is implemented in two ways:
(a) In WithoutBindings, as a category of MyDocument;
(b) In WithBindings, as a subclass of NSArrayController (this is
what was in "Bookmarks").
In both projects, the source is in TableViewDataSource.{h,m} to
make it easier to directly compare the projects using File Merge.
In particular:
(a) You can "see" what code disappears in the bindings-based
implementation;
(b) You can compare the data source implementations for MyDocument
and MyArrayController. This is (hopefully) useful to show how
similar most of the code is, and where there are minor changes.
mmalc
01_WithoutBindings:
File: TableViewDataSource.m
Abstract: Contains the implementation of the data source methods
for NSTableView.
Note that this implementation is as a category of MyDocument.
02_WithBindings:
File: TableViewDataSource.m
Abstract: Contains the implementation of the data source methods
for NSTableView.
Note that this implementation is as a subclass of NSArrayController.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden