[fxruby-users] new DND idea
Raj Sahae
rajsahae at gmail.com
Mon Mar 19 05:15:12 EDT 2007
Hi there. Some of you may remember that I was having problems with
DND. I solved that problem using YAML. However, I have run into new
problems because YAML creates a new instance of the object, exactly
equal to the old one, but nonetheless, a new object in a different
memory location. Instead of doing that, I wish to simply pass the
actual reference, the memory location, of the object. How would I do
that? For example, if "card" in this case was a reference to on object
at 0x0000001 (contrived, yes):
imageView.connect(SEL_DND_REQUEST) do |sender, sel, event|
if event.target == @image_drag_type
imageView.setDNDData(FROM_DRAGNDROP, @image_drag_type,
Fox.fxencodeStringData(YAML.dump(card)))
data_sent = true
end
end
Instead of encoding the YAML.dump, I would encode what? And on the
otherside, I would decode and then what?
Thanks,
Raj Sahae
More information about the fxruby-users
mailing list