[Pharo-users] Spec: Populating a playground with a particular content (was Re: Spec: Binding widgets how to)

Johan Fabry jfabry at dcc.uchile.cl
Sat Jan 16 10:23:30 EST 2016

Ah this is actually a Glamour question: If I have a GTPlayground, how do I set its content programmatically? I have been able to do it with something like the following:

| play |
“play is the GTPlayground instance"
play := (GTPlayground new openOn: GTPlayPage new) model.
play entity saveContent: '42'.
play update.

I don’t know if this is the officially approved way of doing it, maybe the Glamour crew can enlighten us.

> On Jan 14, 2016, at 18:34, Nicolai Hess <nicolaihess at gmail.com> wrote:
> but if I try running the interface with this I get: "MessageNotUnderstood: GlamourPresentationModel>>content:", so I think that something more is needed to create Playgrounds in the Spec-Glamour that are pre-populated with content.
> How can I create a playground inside a Spec-Glamour interface that is already populated with a given content?
> I would expect (content is the GlamourPresentationModel)
> content glmPres codePresentation text: 'new text'.
> but it does not work.

---> Save our in-boxes! http://emailcharter.org <---

Johan Fabry   -   http://pleiad.cl/~jfabry
PLEIAD and RyCh labs  -  Computer Science Department (DCC)  -  University of Chile

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/attachments/20160116/8d8315ee/attachment.html>

More information about the Pharo-users mailing list