[fxruby-users] drag n drop help
lyle.johnson at gmail.com
Mon Mar 5 17:51:50 EST 2007
On 3/5/07, Raj Sahae <rajsahae at gmail.com> wrote:
> I want to be able to drag an object, in it's entirety. Right now, I am
> dragging objects by defining a to_s and card_from_str methods, but there
> are several subclasses of these objects and writing the string
> conversion methods is tedious for each one. Is there another way to
> drag an object?
Well, there's not another way to drag an object, but that doesn't seem
to be the problem in the first place. You're wanting to know if
there's an easier way to specify the data that should be transferred
whenever the user drags an object from one place to another, right?
Have you considered using YAML to serialize (and deserialize) the
objects? If you were to do that, it seems like you wouldn't need to
write class-specific to_str() and from_str() methods.
More information about the fxruby-users