On Sun, Feb 21, 2016 at 12:15 AM, Tudor Girba <tu...@tudorgirba.com> wrote:

> Hi,
>
>
> > On Feb 21, 2016, at 12:06 AM, Peter Uhnák <i.uh...@gmail.com> wrote:
> >
> > Hi,
> >
> > is it possible to somehow embed images (Form) inside Playground?
> >
> > The use case is a kind of in-image help or guide where one could also
> execute code, but there would be also example images.
>
> This is not yet possible, but it is intended to move in that direction.
>
> > Or maybe have a container Morph that would contain Playground? Is that
> possible?
>
> Intriguing idea. Could you elaborate on this?
>

Well the idea is rather simple. Imagine that instead of having a website or
a book or a pdf somewhere you would have a more live version directly in
the image that you could interact with.

An extremely crude example:

​

Creating something like that is currently quite awful:

```
window := SystemWindow new.

window addMorph: (RubScrolledTextMorph new beWrapped; yourself) frame: (0@0
corner: 1@0.2).

window addMorph: (SpecWindow allInstances detect: [ :each | each
identityHash = 330624768 ]) frame: (0@0.2 corner: 1@0.4).

window addMorph: (RubScrolledTextMorph new beWrapped;
beForSmalltalkScripting; yourself) frame: (0@0.4 corner: 1@0.6).

'/tmp/pharo.png' asFileReference binaryReadStreamDo: [ :stream |
window addMorph: (PNGReadWriter formFromStream: stream) asMorph frame:
(0@0.6 corner: 1 @0.8)
].

window addMorph: (RubScrolledTextMorph new beWrapped;
beForSmalltalkScripting; yourself) frame: (0@0.8 corner: 1@1).

window submorphs second push.

window openInWorld.
```

Also I've just realized that on ESUG someone (Andrei I think) was showing
something like this running on Bloc… but I have no memory what it was
called.

Peter

Reply via email to