<div dir="ltr">Hi Diego,<div><br></div><div>Thanks for the advice, I think I can replicate the WAObject methods in my own classes, and avoid subclassing it.</div><div><br></div><div>Regarding the Memento error, it has to do with the fact the objects come from the database (GLORP).</div>

<div>Maybe because GLORP uses proxies. Looking for this, I found a mail from several years ago about redefining #= as:<br></div><div><div>= anObject </div><div>    ^self == anObject yourSelf</div></div><div><br></div><div>

<br></div><div>The QCMagritte name sounds familiar to me, but I really don&#39;t know what it is. Is there a blog post, presentation, website or something before looking into the code? :) The SmalltalkHub summary seems interesting.</div>

<div><br></div><div>Regards,</div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div>Esteban A. Maringolo</div>
<br><br><div class="gmail_quote">2013/10/1 Diego Lont <span dir="ltr">&lt;<a href="mailto:diego.lont@delware.nl" target="_blank">diego.lont@delware.nl</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Hi Esteban,<br>
<br>
I have a similar solution in QC Magritte, that allows the session to be acquired from the objects as well. I use it for my rights, as my user is in my session. As you can see in the seaside implementation WAObject already implements request-context, session and application. I do recommend that you use an indirection, that you put in your description &quot;self allStores&quot; and implement the allStores as &quot;self session allStores&quot;. But other than that I think the solution is sound.<br>


<br>
As for the validation error. From what you have written here I have no clue what the problem is. In Magritte the memento stores an original value. If the original value is not exactly the same as the value of the model, it gives a validation error. Maybe you can put a halt here and find out what the difference is. Maybe you recreate a certain object (return a copy) that causes the difference?<br>


<br>
If you need a more dynamic solution (with updating values), please take a look at QCMagritte. It can be found at smalltalkhub, and loaded by:<br>
<br>
Gofer new<br>
        url: &#39;<a href="http://smalltalkhub.com/mc/DiegoLont/QCMagritte/main" target="_blank">http://smalltalkhub.com/mc/DiegoLont/QCMagritte/main</a>&#39;;<br>
        package: &#39;ConfigurationOfQCMagritte&#39;;<br>
        load.<br>
<br>
((Smalltalk at: #ConfigurationOfQCMagritte) project version: &#39;0.1&#39;) load: &#39;Demo&#39;.<br>
<br>
(Smalltalk at: #ZnZincServerAdaptor) startOn: 8080. &quot;only if seaside is not started yet&quot;<br>
<br>
<br>
Cheers,<br>
Diego<br>
<div><div class="h5"><br>
On Oct 1, 2013, at 4:51 AM, Esteban A. Maringolo wrote:<br>
<br>
&gt; I don&#39;t know whether it has to do with my previous solution. But now I&#39;m getting a &#39;Input is conflicting with concurrent modification&#39;  validation error, when there is no concurrent use (it is just me using the app).<br>


&gt;<br>
&gt; The model I&#39;m editing has only two attributes: #time and #store, and I&#39;m not changing #store, even if I don&#39;t change anything I get the same error.<br>
&gt;<br>
&gt; Any clues?<br>
&gt;<br>
&gt; Esteban A. Maringolo<br>
&gt;<br>
&gt;<br>
&gt; 2013/9/30 Esteban A. Maringolo &lt;<a href="mailto:emaringolo@gmail.com">emaringolo@gmail.com</a>&gt;<br>
&gt; Answering myself...<br>
&gt;<br>
&gt; Maybe not an elegant solution (nor a scalable one) but I found I can use the dynamic variable scoping to access the current session.<br>
&gt;<br>
&gt; I changed my description to use:<br>
&gt;<br>
&gt; descriptionStore<br>
&gt;       &lt;magritteDescription&gt;<br>
&gt;<br>
&gt;       ^MASingleOptionDescription new<br>
&gt;               label: &#39;Store&#39;;<br>
&gt;               accessor: #store;<br>
&gt;               beRequired;<br>
&gt;               options: self currentSession allStores;<br>
&gt;               yourself<br>
&gt;<br>
&gt;<br>
&gt; #currentSession<br>
&gt;     ^WACurrentRequestContext value session<br>
&gt;<br>
&gt;<br>
&gt; It still smells bad, for some reason DynamicVariable&#39;s seems &quot;hacky&quot; to me.<br>
&gt;<br>
&gt; Maybe they&#39;re more clever than what I&#39;m used to.<br>
&gt;<br>
&gt; Regards,<br>
&gt;<br>
&gt;<br>
&gt; Esteban.<br>
&gt;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; seaside mailing list<br>
&gt; <a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
<br>
_______________________________________________<br>
seaside mailing list<br>
<a href="mailto:seaside@lists.squeakfoundation.org">seaside@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside" target="_blank">http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside</a><br>
</blockquote></div><br></div>