On Dec 10, 2007 8:14 PM, Tomaso Tosolini <[EMAIL PROTECTED]> wrote:
> Hi John, hi List!
>
> In the last days i noticed some troubles
> when saving  in workitem's fields objects derived from classes created by
> me.
>
> It seems that the fulldup mechanism encounters diffculties with such objects
> because he
> don't know exactly how to threat them...
>
> I solved to issue delegating to these client objects the responsibility to
> fulldup themselves
>
> Index: utils.rb
> ===================================================================
> --- utils.rb    (revision 1343)
> +++ utils.rb    (working copy)
> @@ -88,6 +88,9 @@
>      def OpenWFE.fulldup (object)
>
>          return nil if object == nil
> +
> +        return object.fulldup if object.respond_to? ("fulldup")
> +            # let's try to give respnsibility to clien objects involved to
> implements their dup mechanisms
>
>          return object if object.kind_of?(Float)
>          return object if object.kind_of?(Fixnum)
>
>
> Is it a good idea?

I think it's a good idea, I doesn't cost much to add it.

For now, I don't think it's necessary to have a Mixin / Module [ /
Interface] for gathering payload objects methods, respond_to? is easy
enough (maybe I'll be proven wrong soon).

If there is no objection, I'll soon commit your patch. (I'm working on
the storage classes currently and on the restful Kisha). (Maybe you
want to commit by yourself).


Best regards, nice idea,

-- 
John Mettraux   -///-   http://jmettraux.openwfe.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenWFEru dev" 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/openwferu-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to