What does this mean?

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

What does this mean?

Rick Flower
I saw some references to it in another older thread from last year..

User: Input is conflicting with concurrent modification

In my case, my object being edited through Magritte was read in by Glorp..
I'm using Keith's RealMemento (on VW).. I believe it thinks that the objects 
are different even though I made no changes.  I guess its safe to assume I need
to see why the comparison is failing?  Any other suggestions would be appreciated!

-- Rick



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What does this mean?

keith1y
Richard E. Flower wrote:

> I saw some references to it in another older thread from last year..
>
> User: Input is conflicting with concurrent modification
>
> In my case, my object being edited through Magritte was read in by Glorp..
> I'm using Keith's RealMemento (on VW).. I believe it thinks that the
> objects
> are different even though I made no changes.  I guess its safe to
> assume I need
> to see why the comparison is failing?  Any other suggestions would be
> appreciated!
>
> -- Rick
It takes a copy of the original, then compares the model to the copy to
make sure that no one else has changed it in the mean time, before
applying the new one.

If your real memento copy is not a completely independent copy then it
may be modifying the model by accident. On commit it finds the model has
changed.

Keith


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What does this mean?

Rick Flower
On Thu, August 21, 2008 10:46 am, Keith Hodges wrote:
> It takes a copy of the original, then compares the model to the copy to
> make sure that no one else has changed it in the mean time, before
> applying the new one.
>
> If your real memento copy is not a completely independent copy then it
> may be modifying the model by accident. On commit it finds the model has
> changed.

How does it determine (I guess I can pilfer thru the code tonight) if the
model has changed?  It's not like C++ comparing pointers -- is it doing a
bit-wise compare of each field (In a general sense)...?

Hmm.. In this case the model should not have changed -- it was rendered
and then I pressed the 'save' button w/o any changes.. I guess I'll have to
dig into the bowels of the RealMemento code (assuming that's where the
compare is being done)..

BTW -- what's the difference between MARealMemento and
MARealCheckedMemento?  I'm currently using MARealCheckedMemento --
not sure if that matters or not.. I only used that version because the
default Magritte one was MACheckedMemento IIRC.

-- Rick


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What does this mean?

Lukas Renggli-2
In reply to this post by Rick Flower
> User: Input is conflicting with concurrent modification
>
> In my case, my object being edited through Magritte was read in by  
> Glorp..
> I'm using Keith's RealMemento (on VW).. I believe it thinks that the  
> objects
> are different even though I made no changes.  I guess its safe to  
> assume I need
> to see why the comparison is failing?  Any other suggestions would  
> be appreciated!

Magritte probably things that there is a conflict because GLORP  
doesn't keep the identity of objects and you don't properly implement  
#= in all the involved objects.

If the DB handles commit conflicts for you, there is no need for  
Magritte to do these checks for you. I remember doing some special  
memento class for OmniBase that used the mechanisms of the OODB to  
check for conflicts and to mark the changed parts as dirty.

If you don't want to check for conflicts you can simply replace the  
method Object>>#mementoClass to return MACachedMemento.

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What does this mean?

Rick Flower
On Thu, August 21, 2008 1:24 pm, Lukas Renggli wrote:
> If the DB handles commit conflicts for you, there is no need for
Magritte to do these checks for you. I remember doing some special
memento class for OmniBase that used the mechanisms of the OODB to check
for conflicts and to mark the changed parts as dirty.
>
> If you don't want to check for conflicts you can simply replace the
method Object>>#mementoClass to return MACachedMemento.

I guess I'd like to have Magritte figure out if I need to issue a
'commit' or a roll-back and go from there..

I guess I'd like to know what the difference is between the following
(perhaps a good FAQ entry?):

1) MACachedMemento
2) MARealMemento
3) MACheckedMemento
4) MARealCheckedMemento
5) MAStraitMemento

Also -- is there a good place to read up on the object comparison operators
such as #=, #<, #>?  I've got a single ST book (in pdf form -- Smalltalk
by example) and didn't find any references to #= when doing a search and
little talk on comparisons..

Thx!



_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What does this mean?

Lukas Renggli-2
> I guess I'd like to know what the difference is between the following
> (perhaps a good FAQ entry?):

Check out the class comments ;-)

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What does this mean?

Rick Flower
On Thu, August 21, 2008 2:24 pm, Lukas Renggli wrote:
>> I guess I'd like to know what the difference is between the following
>> (perhaps a good FAQ entry?):
>
> Check out the class comments ;-)

Sorry Lukas.. One of these days I need to figure out how to see the class
comments while working in Squeak.. I know how in VW but not Squeak.. Anyway,
I'll check them out either way.. Thx!


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What does this mean?

Rick Flower

Ok -- solved my problem.. I put an address object as part of my  
Descriptions
but they are effectively 'sub' objects and I suspect I actually had  
two separate
objects.. I need to follow what others where talking about in the  
"Using One Magritte
form for two model objects" thread.. Thx!

-- Rick


On Aug 21, 2008, at 5:43 PM, Rick Flower wrote:

> On Thu, August 21, 2008 2:24 pm, Lukas Renggli wrote:
>>> I guess I'd like to know what the difference is between the  
>>> following
>>> (perhaps a good FAQ entry?):
>>
>> Check out the class comments ;-)
>
> Sorry Lukas.. One of these days I need to figure out how to see the  
> class
> comments while working in Squeak.. I know how in VW but not Squeak..  
> Anyway,
> I'll check them out either way.. Thx!
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What does this mean?

keith1y
Richard E. Flower wrote:

> Ok -- solved my problem.. I put an address object as part of my  
> Descriptions
> but they are effectively 'sub' objects and I suspect I actually had  
> two separate
> objects.. I need to follow what others where talking about in the  
> "Using One Magritte
> form for two model objects" thread.. Thx!
>
> -- Rick
>  
With the realMemento sub-objects probably need to use a StraitMemento,
so that there is only one whole data-structure used as a memento.

Keith


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: What does this mean?

Rick Flower
Thanks Keith!

On Aug 22, 2008, at 1:32 AM, Keith Hodges wrote:

> Richard E. Flower wrote:
>> Ok -- solved my problem.. I put an address object as part of my
>> Descriptions
>> but they are effectively 'sub' objects and I suspect I actually had
>> two separate
>> objects.. I need to follow what others where talking about in the
>> "Using One Magritte
>> form for two model objects" thread.. Thx!
>>
>> -- Rick
>>
> With the realMemento sub-objects probably need to use a StraitMemento,
> so that there is only one whole data-structure used as a memento.
>
> Keith
>
>
> _______________________________________________
> SmallWiki, Magritte, Pier and Related Tools ...
> https://www.iam.unibe.ch/mailman/listinfo/smallwiki
>


_______________________________________________
SmallWiki, Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki