Loading...

objectivej@googlegroups.com

[Prev] Thread [Next]  |  [Prev] Date [Next]

Drag and drop : setData forType issue Nicolas Clavier Tue Nov 24 02:00:29 2009

Hi all,

In my approach to drag and drop, I find myself struggling with this method of 
the drag source:

[aPasteboard setData:---- forType:aType]; 

Here is my code:
http://gist.github.com/241760

The small red square is draggable and carries it's background color to the 
green square.
It works when passing a HEX string with setString: ForType: (the code is 
commented in the gist)

But when passing a color object, I get this error:
Objective-J.js:1741             [CPColor string] unrecognized selector sent to 
instance 0x002653

As well, in this case, the dragged view becomes the entire window object 
instead of little red square.
I run this example in a CIB app created with Atlas Beta 0.9.7.

Any idea why CPData is triggering the (SEL)string: on CPColor when it's 
supposed to only push the object to a dictionary using aType as a key ??

Thanks for your time,
Cheers,
Nicolas

--

You received this message because you are subscribed to the Google Groups 
"Cappuccino & Objective-J" group.
To post to this group, send email to [EMAIL PROTECTED]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/objectivej?hl=en.