mooseID

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

mooseID

Alexandre Bergel
Hi!

I am wondering why MooseElement needs a mooseID. By looking at the  
sender of mooseID, I can see methods like:

MooseModel>>includes: anItem
        anItem isNil ifTrue: [^ false].
        ^ self includesID: anItem mooseID

and MooseModel class>>ownerOf: element  that makes use of mooseID. But  
is this really necessary?

Just wondering...

Cheers,
Alexandre

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: mooseID

Tudor Girba
Hi Alex,

Yes, it is necessary because it is very often the case that you need  
access to the model from the entity. This is why we added it by  
default to MooseElement.

Cheers,
Doru


On 3 May 2010, at 00:13, Alexandre Bergel wrote:

> Hi!
>
> I am wondering why MooseElement needs a mooseID. By looking at the  
> sender of mooseID, I can see methods like:
>
> MooseModel>>includes: anItem
> anItem isNil ifTrue: [^ false].
> ^ self includesID: anItem mooseID
>
> and MooseModel class>>ownerOf: element  that makes use of mooseID.  
> But is this really necessary?
>
> Just wondering...
>
> Cheers,
> Alexandre
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Reasonable is what we are accustomed with."

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: mooseID

jannik laval
Hi,
I use it also in Orion.

Jannik
On May 3, 2010, at 00:50 , Tudor Girba wrote:

> Hi Alex,
>
> Yes, it is necessary because it is very often the case that you need access to the model from the entity. This is why we added it by default to MooseElement.
>
> Cheers,
> Doru
>
>
> On 3 May 2010, at 00:13, Alexandre Bergel wrote:
>
>> Hi!
>>
>> I am wondering why MooseElement needs a mooseID. By looking at the sender of mooseID, I can see methods like:
>>
>> MooseModel>>includes: anItem
>> anItem isNil ifTrue: [^ false].
>> ^ self includesID: anItem mooseID
>>
>> and MooseModel class>>ownerOf: element  that makes use of mooseID. But is this really necessary?
>>
>> Just wondering...
>>
>> Cheers,
>> Alexandre
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Reasonable is what we are accustomed with."
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

---
Jannik Laval


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: mooseID

Alexandre Bergel
In reply to this post by Tudor Girba
> Yes, it is necessary because it is very often the case that you need  
> access to the model from the entity. This is why we added it by  
> default to MooseElement.

But if you need to access the model from an entity, why not to have a  
variable mooseModel in MooseElement instead?

One very good reason I see for having mooseID, is to circumvent the  
hash limitation in Pharo. I am looking for another reason.

Alexandre


>
>
> On 3 May 2010, at 00:13, Alexandre Bergel wrote:
>
>> Hi!
>>
>> I am wondering why MooseElement needs a mooseID. By looking at the  
>> sender of mooseID, I can see methods like:
>>
>> MooseModel>>includes: anItem
>> anItem isNil ifTrue: [^ false].
>> ^ self includesID: anItem mooseID
>>
>> and MooseModel class>>ownerOf: element  that makes use of mooseID.  
>> But is this really necessary?
>>
>> Just wondering...
>>
>> Cheers,
>> Alexandre
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> www.tudorgirba.com
>
> "Reasonable is what we are accustomed with."
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.





_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev