From: Eloy D. <elo...@gm...> - 2007-10-28 20:48:04
|
Ok.... :) the others would be: def tableView_validateDrop_proposedRow_proposedDropOperation(tv, info, row, op) # Add code here to validate the drop puts 'validate drop' OSX::NSDragOperationEvery end def tableView_acceptDrop_row_dropOperation(tv, info, row, op) # Add code here to accept the drop puts 'acceptDrop' true end Eloy On 28 okt 2007, at 21:23, Alistair Holt wrote: > Thanks Eloy. > > I've been told that part one of http://www.corbinstreehouse.com/blog/?p=21 > would translate into: > > MyPrivateTableViewDataType = "MyPrivateTableViewDataType" > > def awakeFromNib > myTableView.registerForDraggedTypes([MyPrivateTableViewDataType]) > end > > ..which would make sense to me. Although I'm still not sure what the > fist line actually does. I also have no idea how to implement the > rest of the code in that example. I'm new to Objective-C and Cocoa > and have found it fairly easy to translate code so far but this has > really got me. > > Cheers > > On 28/10/2007, Eloy Duran <elo...@gm... > wrote: > Hi Alistair, > > > Is there a specific part that you don't understand about the > translation? > Or could you mail some code of what you thought it would be, so we > can see what it is that you can't figure out? > > > Cheers, > Eloy > > On 28 okt 2007, at 17:22, Alistair Holt wrote: > >> Hello, >> >> >> I'm trying to implement a NSTableView with Drag and Drop >> capabilities in RubyCocoa. >> >> >> I have been trying to follow http://developer.apple.com/documentation/Cocoa/Conceptual/TableView/Tasks/UsingDragAndDrop.html >> and http://www.corbinstreehouse.com/blog/?p=21 but I just can not >> figure out how to translate the Objective-C code into RubyCocoa. >> >> >> Can anyone help me out? >> >> Thanks >> >> -- >> Alistair Holt >> ali...@gm... >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Splunk Inc. >> Still grepping through log files to find problems? Stop. >> Now Search log events and configuration files using AJAX and a >> browser. >> Download your FREE copy of Splunk now >> http://get.splunk.com/_______________________________________________ >> Rubycocoa-talk mailing list >> Rub...@li... >> https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk > > > > > -- > Alistair Holt > ali...@gm... > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a > browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/_______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |