Fwd: MAStringReader and nil

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: MAStringReader and nil

otto
I apologise in advance if this cross post bothers you, but I'm not
sure if people are looking at the other list where I posted.

We will appreciate your help if you know something in this area of
Magritte-Seaside.

---------- Forwarded message ----------
From: Otto Behrens <[hidden email]>
Date: Thu, Mar 6, 2014 at 12:38 PM
Subject: MAStringReader and nil
To: "Magritte, Pier and Related Tools ..." <[hidden email]>


Hi,

We'd like some help with how nil / undefined is handled in Magritte,
and specifically a MAStringDescription. The method MAStringReader >>
read:description: overrides the default behaviour to return nil. Is a
nil in Magritte seen as a "unpopulated" token?

Our problem more specifically is this:

We start with an object containing an string in an instance variable.
We use a MAStringDescription for this instance variable. We use the
magritte-seaside binding to edit this field on the UI. If the user
does not capture text in the text input, an empty string is "written".

The method on MAStringReader mentioned above intercepts this and
returns nil, so nil is written back to our domain object, where we
started off with an empty string.

We do not want nils to be written into our domain object where we
initialized it with an empty string.

How do we fix this? Is there a hook where we should be specifying
this? Or is there a fundamental way of working with Magritte-Seaside
where it will write nils and we have to manage that on our domain
object?

Thanks for your help.

Otto
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside