How to access to a model

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

How to access to a model

Stéphane Ducasse
Hi guys

I loaded a model into moose and 

MooseModel root first gives me the model but it is bad. 

Is there a way to access the model?

Then I do not understand why the storage by name is empty.
I cannot do 

MooseModel root entityNamed: #mymodel.

Stef

--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France


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

Re: How to access to a model

Tudor Girba-2
Hi,

Hmm, I just checked and something seems wrong with the name cache of the group when we add MooseModel inside. As a consequence, entityNamed: is not working.

In the meantime, MooseModel root allModels gives you the group and you can iterate explicitly over it:

        MooseModel root allModels detect: [ :each | each name = #mymodel ]

Cheers,
Doru



> On Dec 6, 2017, at 9:44 AM, Stéphane Ducasse <[hidden email]> wrote:
>
> Hi guys
>
> I loaded a model into moose and
>
> MooseModel root first gives me the model but it is bad.
>
> Is there a way to access the model?
>
> Then I do not understand why the storage by name is empty.
> I cannot do
>
> MooseModel root entityNamed: #mymodel.
>
> Stef
>
> --------------------------------------------
> Stéphane Ducasse
> http://stephane.ducasse.free.fr
> http://www.synectique.eu / http://www.pharo.org 
> 03 59 35 87 52
> Assistant: Julie Jonas
> FAX 03 59 57 78 50
> TEL 03 59 35 86 16
> S. Ducasse - Inria
> 40, avenue Halley,
> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
> Villeneuve d'Ascq 59650
> France
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"It's not how it is, it is how we see it."

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

Re: How to access to a model

Stéphane Ducasse

On 6 Dec 2017, at 10:42, Tudor Girba <[hidden email]> wrote:

Hi,

Hmm, I just checked and something seems wrong with the name cache of the group when we add MooseModel inside. As a consequence, entityNamed: is not working.

Thanks because I was also surprised.


In the meantime, MooseModel root allModels gives you the group and you can iterate explicitly over it:

MooseModel root allModels detect: [ :each | each name = #mymodel ]

Yes this is a better way than my stuid way.

Cheers,
Doru



On Dec 6, 2017, at 9:44 AM, Stéphane Ducasse <[hidden email]> wrote:

Hi guys

I loaded a model into moose and

MooseModel root first gives me the model but it is bad.

Is there a way to access the model?

Then I do not understand why the storage by name is empty.
I cannot do

MooseModel root entityNamed: #mymodel.

Stef

--------------------------------------------
Stéphane Ducasse
http://stephane.ducasse.free.fr
http://www.synectique.eu / http://www.pharo.org
03 59 35 87 52
Assistant: Julie Jonas
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley,
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France

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

--
www.tudorgirba.com
www.feenk.com

"It's not how it is, it is how we see it."

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

--------------------------------------------
Stéphane Ducasse
03 59 35 87 52
Assistant: Julie Jonas 
FAX 03 59 57 78 50
TEL 03 59 35 86 16
S. Ducasse - Inria
40, avenue Halley, 
Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
Villeneuve d'Ascq 59650
France


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

Re: How to access to a model

Tudor Girba-2
Hi,

Please note that you can also work with models without adding them to the MooseModel root.

For example, open an inspector on a FileReference of an MSE file, and you will get an icon in the inspector (the black MSE one on the top right). If you click on it, you will get the model to the right.

Cheers,
Doru


> On Dec 6, 2017, at 10:07 PM, Stéphane Ducasse <[hidden email]> wrote:
>
>>
>> On 6 Dec 2017, at 10:42, Tudor Girba <[hidden email]> wrote:
>>
>> Hi,
>>
>> Hmm, I just checked and something seems wrong with the name cache of the group when we add MooseModel inside. As a consequence, entityNamed: is not working.
>
> Thanks because I was also surprised.
>
>>
>> In the meantime, MooseModel root allModels gives you the group and you can iterate explicitly over it:
>>
>> MooseModel root allModels detect: [ :each | each name = #mymodel ]
>
> Yes this is a better way than my stuid way.
>>
>> Cheers,
>> Doru
>>
>>
>>
>>> On Dec 6, 2017, at 9:44 AM, Stéphane Ducasse <[hidden email]> wrote:
>>>
>>> Hi guys
>>>
>>> I loaded a model into moose and
>>>
>>> MooseModel root first gives me the model but it is bad.
>>>
>>> Is there a way to access the model?
>>>
>>> Then I do not understand why the storage by name is empty.
>>> I cannot do
>>>
>>> MooseModel root entityNamed: #mymodel.
>>>
>>> Stef
>>>
>>> --------------------------------------------
>>> Stéphane Ducasse
>>> http://stephane.ducasse.free.fr
>>> http://www.synectique.eu / http://www.pharo.org 
>>> 03 59 35 87 52
>>> Assistant: Julie Jonas
>>> FAX 03 59 57 78 50
>>> TEL 03 59 35 86 16
>>> S. Ducasse - Inria
>>> 40, avenue Halley,
>>> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
>>> Villeneuve d'Ascq 59650
>>> France
>>>
>>> _______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>>
>> --
>> www.tudorgirba.com
>> www.feenk.com
>>
>> "It's not how it is, it is how we see it."
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.list.inf.unibe.ch/listinfo/moose-dev
>
> --------------------------------------------
> Stéphane Ducasse
> http://stephane.ducasse.free.fr
> http://www.synectique.eu / http://www.pharo.org 
> 03 59 35 87 52
> Assistant: Julie Jonas
> FAX 03 59 57 78 50
> TEL 03 59 35 86 16
> S. Ducasse - Inria
> 40, avenue Halley,
> Parc Scientifique de la Haute Borne, Bât.A, Park Plaza
> Villeneuve d'Ascq 59650
> France
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.list.inf.unibe.ch/listinfo/moose-dev

--
www.tudorgirba.com
www.feenk.com

"Obvious things are difficult to teach."




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