From: Tom C. <ta...@ca...> - 2005-11-22 23:28:08
|
Hello I have a feeling this is a stupid question, but I just can't figure it out. I have created a subclass of an NSOutlineView in order to implement drag to trash. Everything works fine, except that the operation variable passed by Cococa to the method draggedImage_endedAt_operation isn't one of the OSX::NSDragOperation constants: # Method described at http://developer.apple.com/documentation/Cocoa/ Reference/ApplicationKit/ObjC_classic/Protocols/NSDraggingSource.html def draggedImage_endedAt_operation( animage, apoint, operation ) OSX::NSLog "Trying to delete? #{operation.inspect} # {OSX::NSDragOperationDelete}" OSX::NSLog("Is a delete operation") if operation == OSX::NSDragOperationDelete end Whereas the OSX::NSDragOperationDelete constant is always the Fixnum 32, the operation returned is a Bignum with a variety of values. What am I missing? Why can't I compare the returned operation with the constant? Thanks Tom |