The simple solution is to _not_ use getMemento().  It is meant for
internal use only, and its return value has already changed once, so
it's not unrealistic to anticipate that it might change again.  It's
not really safe to be using it in a production app.

It is quite simple to create your own implementation, which I have
done and wrote about on my blog several months ago, so that's what I'd
do if I were presented with this issue.

Happy New Year,
Bob

On Wed, Dec 31, 2008 at 5:14 PM, Jamie Jackson <[email protected]> wrote:
>
> I know Mark probably winces when he sees getMemento() used for
> anything but debugging, but I think I've seen a couple examples at
> least of getMemento() as the basis for Flex communication. For
> instance, IIRC, Kurt's using this in sample appbooster app, and
> tacking on a typed structure key, to provide data to Flex.
>
> However, I just noticed a messy detail, which ties into my recent
> email about values of NULL dates:
>
> Say you have the following use case:
> *The birthday field is optional on the User form, so show a blank date
> field (mx:DateField). If the user leaves it blank, it should write a
> NULL to the DB. In summary, a blank date field should equal NULL in
> the DB, and vice-versa.
>
> Problem with using getMemento() for Flex:
> 1. Transfer stores returns null DB date columns as 1/1/0100 (or
> whatever *date* you define). I don't (yet) understand the rationale
> for this default behavior, but the workaround seems to be to override
> the accessors in the decorators to translate between empty strings and
> "Transfer-nulls"
> 2. With the above strategy, getMemento() bypasses the accessors, and
> returns the "tranfer-null" value. Therefore, your flex app would seem
> to need to know what strange value constitutes a null, so it can
> translate between it and an empty datefield. This seems like a really
> messy problem to reconcile.
>
> So, for those of you who use getMemento() for Flex, how do you deal
> with this? Or what am I missing?
>
> And for Mark: Sorry to be a bother, but have you gotten any feedback
> on (or made any progress on a sample app for) Conduit? I'll take a
> closer look at what you've got so far...
>
> >
>



-- 
Bob Silverberg
www.silverwareconsulting.com

--~--~---------~--~----~------------~-------~--~----~
Before posting questions to the group please read:
http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer

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

Reply via email to