Re: [Pharo-dev] spec ui as morph

2017-04-27 Thread Christophe Demarey
Hi Peter,

Very useful information.
Thanks for it.

Christophe.

> Le 26 avr. 2017 à 12:38, Peter Uhnak  a écrit :
> 
> #buildWithSpec returns the SpecModel's Morph, which is what you want.
> 
> `model spec instance`, which is the same as calling `model widget` returns 
> the model's Adapter; but don't use the former, I will remove it in Pharo 7.
> 
> If you want retrieve the morph from Spec after it was built, then
> 
> yourModel widget "-> Adapter"
> yourModel widget widget "-> Morph"
> 
> Peter
> 
> On Wed, Apr 26, 2017 at 12:23:03PM +0200, Nicolai Hess wrote:
>> 2017-04-26 12:00 GMT+02:00 Christophe Demarey :
>> 
>>> thanks but the result is not a morph.
>>> 
>> 
>> Are you sure ?
>> 
>> (TextModel new text: Morph comment; buildWithSpec) openInHand -> a Morph
>> 
>> 
>>> Should I use yourModel buildWithSpec  spec instance?
>>> 
 Le 26 avr. 2017 à 11:55, Esteban Lorenzano  a
>>> écrit :
 
 yourModel buildWithSpec.
 
 Esteban
 
> On 26 Apr 2017, at 11:51, Christophe Demarey <
>>> christophe.dema...@inria.fr> wrote:
> 
> Hi,
> 
> Does anyone know how to embed a UI component made with Spec into a UI
>>> expecting a morph?
> It looks like the only way to build a spec UI is to open it with
>>> #openWithSpec that will always embed the component in a window.
> 
> Thanks,
> Christophe
 
>>> 
>>> 
>>> 
> 




Re: [Pharo-dev] spec ui as morph

2017-04-27 Thread Christophe Demarey
Hi Nicolai,

Thanks Nicolas, I tested quickly before leaving and I made a stupid mistake.
Indeed, I get a morph.
Maybe it would be a nice idea to put this information (how to integrate a spec 
ui into a morph) in the 0.1 section of the spec book?

Thanks

> Le 26 avr. 2017 à 12:23, Nicolai Hess  a écrit :
> 
> 
> 
> 2017-04-26 12:00 GMT+02:00 Christophe Demarey  >:
> thanks but the result is not a morph.
> 
> Are you sure ?
> 
> (TextModel new text: Morph comment; buildWithSpec) openInHand -> a Morph
>  
> Should I use yourModel buildWithSpec  spec instance?
> 
> > Le 26 avr. 2017 à 11:55, Esteban Lorenzano  > > a écrit :
> >
> > yourModel buildWithSpec.
> >
> > Esteban
> >
> >> On 26 Apr 2017, at 11:51, Christophe Demarey  >> > wrote:
> >>
> >> Hi,
> >>
> >> Does anyone know how to embed a UI component made with Spec into a UI 
> >> expecting a morph?
> >> It looks like the only way to build a spec UI is to open it with 
> >> #openWithSpec that will always embed the component in a window.
> >>
> >> Thanks,
> >> Christophe
> >
> 
> 
> 



Re: [Pharo-dev] spec ui as morph

2017-04-26 Thread Stephane Ducasse
I really hope that we will be able to remove the adapter with brick


On Wed, Apr 26, 2017 at 12:38 PM, Peter Uhnak  wrote:

> #buildWithSpec returns the SpecModel's Morph, which is what you want.
>
> `model spec instance`, which is the same as calling `model widget` returns
> the model's Adapter; but don't use the former, I will remove it in Pharo 7.
>
> If you want retrieve the morph from Spec after it was built, then
>
> yourModel widget "-> Adapter"
> yourModel widget widget "-> Morph"
>
> Peter
>
> On Wed, Apr 26, 2017 at 12:23:03PM +0200, Nicolai Hess wrote:
> > 2017-04-26 12:00 GMT+02:00 Christophe Demarey <
> christophe.dema...@inria.fr>:
> >
> > > thanks but the result is not a morph.
> > >
> >
> > Are you sure ?
> >
> > (TextModel new text: Morph comment; buildWithSpec) openInHand -> a Morph
> >
> >
> > > Should I use yourModel buildWithSpec  spec instance?
> > >
> > > > Le 26 avr. 2017 à 11:55, Esteban Lorenzano  a
> > > écrit :
> > > >
> > > > yourModel buildWithSpec.
> > > >
> > > > Esteban
> > > >
> > > >> On 26 Apr 2017, at 11:51, Christophe Demarey <
> > > christophe.dema...@inria.fr> wrote:
> > > >>
> > > >> Hi,
> > > >>
> > > >> Does anyone know how to embed a UI component made with Spec into a
> UI
> > > expecting a morph?
> > > >> It looks like the only way to build a spec UI is to open it with
> > > #openWithSpec that will always embed the component in a window.
> > > >>
> > > >> Thanks,
> > > >> Christophe
> > > >
> > >
> > >
> > >
>
>


Re: [Pharo-dev] spec ui as morph

2017-04-26 Thread Peter Uhnak
#buildWithSpec returns the SpecModel's Morph, which is what you want.

`model spec instance`, which is the same as calling `model widget` returns the 
model's Adapter; but don't use the former, I will remove it in Pharo 7.

If you want retrieve the morph from Spec after it was built, then

yourModel widget "-> Adapter"
yourModel widget widget "-> Morph"

Peter

On Wed, Apr 26, 2017 at 12:23:03PM +0200, Nicolai Hess wrote:
> 2017-04-26 12:00 GMT+02:00 Christophe Demarey :
> 
> > thanks but the result is not a morph.
> >
> 
> Are you sure ?
> 
> (TextModel new text: Morph comment; buildWithSpec) openInHand -> a Morph
> 
> 
> > Should I use yourModel buildWithSpec  spec instance?
> >
> > > Le 26 avr. 2017 à 11:55, Esteban Lorenzano  a
> > écrit :
> > >
> > > yourModel buildWithSpec.
> > >
> > > Esteban
> > >
> > >> On 26 Apr 2017, at 11:51, Christophe Demarey <
> > christophe.dema...@inria.fr> wrote:
> > >>
> > >> Hi,
> > >>
> > >> Does anyone know how to embed a UI component made with Spec into a UI
> > expecting a morph?
> > >> It looks like the only way to build a spec UI is to open it with
> > #openWithSpec that will always embed the component in a window.
> > >>
> > >> Thanks,
> > >> Christophe
> > >
> >
> >
> >



Re: [Pharo-dev] spec ui as morph

2017-04-26 Thread Nicolai Hess
2017-04-26 12:00 GMT+02:00 Christophe Demarey :

> thanks but the result is not a morph.
>

Are you sure ?

(TextModel new text: Morph comment; buildWithSpec) openInHand -> a Morph


> Should I use yourModel buildWithSpec  spec instance?
>
> > Le 26 avr. 2017 à 11:55, Esteban Lorenzano  a
> écrit :
> >
> > yourModel buildWithSpec.
> >
> > Esteban
> >
> >> On 26 Apr 2017, at 11:51, Christophe Demarey <
> christophe.dema...@inria.fr> wrote:
> >>
> >> Hi,
> >>
> >> Does anyone know how to embed a UI component made with Spec into a UI
> expecting a morph?
> >> It looks like the only way to build a spec UI is to open it with
> #openWithSpec that will always embed the component in a window.
> >>
> >> Thanks,
> >> Christophe
> >
>
>
>


Re: [Pharo-dev] spec ui as morph

2017-04-26 Thread Christophe Demarey
thanks but the result is not a morph.
Should I use yourModel buildWithSpec  spec instance?

> Le 26 avr. 2017 à 11:55, Esteban Lorenzano  a écrit :
> 
> yourModel buildWithSpec.
> 
> Esteban
> 
>> On 26 Apr 2017, at 11:51, Christophe Demarey  
>> wrote:
>> 
>> Hi,
>> 
>> Does anyone know how to embed a UI component made with Spec into a UI 
>> expecting a morph?
>> It looks like the only way to build a spec UI is to open it with 
>> #openWithSpec that will always embed the component in a window.
>> 
>> Thanks,
>> Christophe
> 




Re: [Pharo-dev] spec ui as morph

2017-04-26 Thread Esteban Lorenzano
yourModel buildWithSpec.

Esteban

> On 26 Apr 2017, at 11:51, Christophe Demarey  
> wrote:
> 
> Hi,
> 
> Does anyone know how to embed a UI component made with Spec into a UI 
> expecting a morph?
> It looks like the only way to build a spec UI is to open it with 
> #openWithSpec that will always embed the component in a window.
> 
> Thanks,
> Christophe



[Pharo-dev] spec ui as morph

2017-04-26 Thread Christophe Demarey
Hi,

Does anyone know how to embed a UI component made with Spec into a UI expecting 
a morph?
It looks like the only way to build a spec UI is to open it with #openWithSpec 
that will always embed the component in a window.

Thanks,
Christophe