• 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: A Drag that Never Starts...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A Drag that Never Starts...


  • Subject: Re: A Drag that Never Starts...
  • From: "I. Savant" <email@hidden>
  • Date: Sat, 3 Feb 2007 01:23:30 -0500


The best thing for you to do would be to post your code. The only question I can think of at this state (after a bottle of wine at 1:17 AM local, of course) is did you follow the steps as outlined in the Table View Programming Guide (the Using Drag and Drop in Tables section)?


Under "Beginning a Drag Operation", the documentation states, "When a drag operation begins, the table sends a tableView:writeRowsWithIndexes:toPasteboard: message to the data source."

  Have you implemented this? Is it called?

--
I.S.


On Feb 3, 2007, at 12:17 AM, Steve Cronin wrote:

Folks;


I know this one must be simple but I’m just not seeing it.

I have 2 tableViews on the same window. I want the user to drag rows from one to the other (all ’isLocal‘ activity).
The application is using CoreData and Bindings pretty heavily (e.g. no normal use of the old school ‘DataSource’...)


The Source TableView is a subclass of NSTableView and this subclass is in IB.
(I know this because the awakeFromNib for the subclass leaves a message in the log)


The SourceView’s single TableColum has it’s Value Bindings set to an ArrayController/ArrangedObects/Key. This loads and displays fine.
The ArrayController has a CoreData Entity declared (and prepared automatically) and it’s ManagedObejctContext is set by bindings.


The problem is that the subclassed TableView‘s draggingSourceOperationMaskForLocal is never called.
I can select lines in the subclassed TableView but they won’t budge and no call is made...
Whereas in mmalc’s ”Bookmark" as soon as you move any selected lines this method is called...


I’ve tried setting up Either/Or/and Both Delegates and DataSource connections (back to the ArrayController).
I don’t really understand why I should have to set these up but all the examples I have seen so far do so.


If i have subclassed a TableView and ArrayController correctly and have supplied all the drag protocol methods do I have to set up DataSource or Delegate or Both?
Can you point me to a clear explanation of why?


Does the fact that I am using CoreData entities in the ArrayController make any of this behave differently? If so where is this explained?

Whack me on the head! - what am I missing here?
Many Thanks!
Steve


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
40gmail.com


This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


References: 
 >A Drag that Never Starts... (From: Steve Cronin <email@hidden>)

  • Prev by Date: A Drag that Never Starts...
  • Next by Date: Re: A Drag that Never Starts...
  • Previous by thread: A Drag that Never Starts...
  • Next by thread: Re: A Drag that Never Starts...
  • Index(es):
    • Date
    • Thread