Re: NSTableView: which delegate after a drag operation?

2011-03-10 Thread Ulf Dunkel

Hi Scott and Corbin.


Here are my two questions:

1) Which delegate can I use to inform table view B to update and reload
its data when I have dragged an item inside table view A?



2) How can I prevent drag operations from table view A to table view B
(and vice versa)? List members shall only be dragged inside their own list.


Thank you all for your suggestions and hints. I could now solve these 
problems.


---Ulf Dunkel
___

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

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


Re: NSTableView: which delegate after a drag operation?

2011-03-07 Thread Corbin Dunn

On Mar 5, 2011, at 2:03 AM, Ulf Dunkel wrote:

> Hi Scott.
> 
> 1) Which delegate can I use to inform table view B to update and reload 
> its data when I have dragged an item inside table view A?
 
 If you’re adding it to the object array, you can easily do the update 
 notification then.
>>> 
>>> [..] what do you mean here with "the object array”?
>> 
>> If you’re adding the dragged data to your target table, that’s a good time 
>> to provide some notification that it needs to be updated.
> 
> I only allow rows in NSTableView A to be moved inside A, or rows in 
> NSTableView B to be moved inside B. But when a row in A has been moved, I 
> want B to load and show updated data.
> 
> I really don't know which notification or delegate to use for this.
> 
> Can you give me a notification example, please?
> 

You have to send your own notification, and respond to it.

corbin


___

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

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


Re: NSTableView: which delegate after a drag operation?

2011-03-05 Thread Ulf Dunkel

Hi Scott.


1) Which delegate can I use to inform table view B to update and reload its 
data when I have dragged an item inside table view A?


If you’re adding it to the object array, you can easily do the update 
notification then.


[..] what do you mean here with "the object array”?


If you’re adding the dragged data to your target table, that’s a good time to 
provide some notification that it needs to be updated.


I only allow rows in NSTableView A to be moved inside A, or rows in 
NSTableView B to be moved inside B. But when a row in A has been moved, 
I want B to load and show updated data.


I really don't know which notification or delegate to use for this.

Can you give me a notification example, please?

---Ulf Dunkel

___

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

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


Re: NSTableView: which delegate after a drag operation?

2011-03-04 Thread Scott Anguish

On Mar 4, 2011, at 9:00 AM, Ulf Dunkel wrote:

> Hi Scott.
> 
>>> Here are my two questions:
>>> 
>>> 1) Which delegate can I use to inform table view B to update and reload its 
>>> data when I have dragged an item inside table view A?
>> 
>> If you’re adding it to the object array, you can easily do the update 
>> notification then.
> 
> Thank you for your suggestion. Maybe this is just a stupid question, but what 
> do you mean here with "the object array”?

No stupid questions, just incomplete answers. :-)

If you’re adding the dragged data to your target table, that’s a good time to 
provide some notification that it needs to be updated.


___

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

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


Re: NSTableView: which delegate after a drag operation?

2011-03-04 Thread Ulf Dunkel

Hi Scott.


Here are my two questions:

1) Which delegate can I use to inform table view B to update and reload its 
data when I have dragged an item inside table view A?


If you’re adding it to the object array, you can easily do the update 
notification then.


Thank you for your suggestion. Maybe this is just a stupid question, but 
what do you mean here with "the object array"?


---Ulf Dunkel

___

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

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


Re: NSTableView: which delegate after a drag operation?

2011-03-03 Thread Scott Anguish

On Mar 3, 2011, at 10:24 PM, Ulf Dunkel wrote:

> In a tiny document-based Cocoa app for Snow Leopard, I have a document window 
> with two NSTableView objects, which get properly feeded by 
> NSTableViewDataSource according to the documentation. Both table views show 
> simple arrays of one column each.
> 
> I can fill both table views with random content as I like to and even drag 
> and drop inside a list, with perfect refresh of the relevant table view. But 
> I would like to sync both table views somehow.
> 
> Here are my two questions:
> 
> 1) Which delegate can I use to inform table view B to update and reload its 
> data when I have dragged an item inside table view A?
> 
> The NSTableViewDelegate methods don't seem to really help me here; I tried 
> them all.
> 
> I could of course add any "Refresh" button or stuff, but I would like to 
> refresh NSTableView B as soon as a row item of NSTableView A has been 
> successfully dragged into a new position.

If you’re adding it to the object array, you can easily do the update 
notification then.

> 
> 2) How can I prevent drag operations from table view A to table view B (and 
> vice versa)? List members shall only be dragged inside their own list.

You can pass NSDragOperationNone if the target is the originating table.


___

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

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