Welcome to Soft32 Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

TableView Bindings & Drag-n-Drop

 
   Soft32 Home -> Mac -> Programmer Help RSS
Next:  Mini Display to HDMI  
Author Message
slashlos

External


Since: Dec 02, 2006
Posts: 148



(Msg. 1) Posted: Tue Jun 16, 2009 2:45 pm
Post subject: TableView Bindings & Drag-n-Drop
Archived from groups: comp>sys>mac>programmer>help (more info?)

I have a tableview, whose rows are fed by drag-n-drop from another
table, with its delegate routines for such, but no data source outlet;
the columns are individually bound to their array controller.

All's well until I try and delete. I had been toying with the idea of
dragging rows off to delete, sort of like in Xcode of dragging a
debugger breakpoint off the view, but in the meanwhile deletion is via a
button bound to the remove: method in the table's array controller.

There appears to be a lag between the removal and the tableview's
appearance update. Also my console reports indexing errors (i.e., -1
beyond array bounds 0).

I have a label text field bound to a display pattern which show the
table's count (arranged_objects.@count) which is always accurate, but it
often shows that the display is stale - row visually still there, or
scrolling to move up rows isn't done. If I click outside and then back
into the table, the display gets updated properly.

I take it I'm missing something in keeping the controller in sync with
the drag-n-drop actions but as the text field is always accurate and the
columns are all correct I'm not sure what.

Help!
--
/los "I was a teenage net-random"
Back to top
Login to vote
slashlos

External


Since: Dec 02, 2006
Posts: 148



(Msg. 2) Posted: Wed Jun 17, 2009 3:20 pm
Post subject: Re: TableView Bindings & Drag-n-Drop [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

slashlos wrote:

>
> I take it I'm missing something in keeping the controller in sync with
> the drag-n-drop actions but as the text field is always accurate and the
> columns are all correct I'm not sure what.
>
> Help!

found it! My notification for selection change didn't notice there was
no selected row ([tableView selectedRow]) properly:

row != NSNotFound

should've been

row != (-1)

Surprised
--
/los "I was a teenage net-random"
Back to top
Login to vote
Display posts from previous:   
Related Topics:
drag and drop into an NSMenu? - Hey all-- Is there any clean way to enable a user to drag and drop items into a menu? The menu item in question is..

DataBrowser + Drag&Drop - As near as I can tell, during the dragging of a row, the DataBrowser (List View) creates a default image to drag around...

Drag & Drop in NSTextView - Hello NG If I drag a animated gif from mail.app into my application (NSTextView) the animation stops and also the fon...

Drag and Drop on NSTableView - Hi, I'm reading Hillegass' Cocoa Prog for Mac OS X book (great stuff!) and struggling with Chapter 18's challenge..

Drag & Drop manager question - I am successfully using the tracking and receive handlers with one of my Carbon windows. However there are times when....

How to highlite a window (for Drag&Drop) in Cocoa - No problem for Drag&Drop operation. But I need a way to show that Drag is accepted by the window. How to highlite (...
       Soft32 Home -> Mac -> Programmer Help All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum

Categories:
 Windows
 Linux
  Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]