[Q] about ProjectViewMorph

Bob Arning arning at charm.net
Tue Sep 9 23:28:10 UTC 2003


On Tue, 9 Sep 2003 15:19:54 -0700 (PDT) David Faught <dave_faught at yahoo.com> wrote:
>1. How do I make a ProjectViewMorph that refers to a project stored on
>a server?  I see examples of this all over the place on Bobs
>SuperSwiki, but I don't see how it is done.  The class methods for
>ProjectViewMorph and Project look to me like they mostly expect a local
>project name, not a URL.  Even the Project method fromUrl: looks like
>it only picks the name out of the URL string, it doesn't actually use
>the URL.

Basically by publishing the project. The project will remember where it was published and the PVM will communicate with the project to get it loaded when needed. Here is a short sequence that may help visualize...

- create a project A
- publish it somewhere and it will remember where that is
- create a project B
- in B open a ProjectViewMorph for A
- publish B
- in the process of publishing B, the PVM for A is included, but the actual project A is replaced by something more compact that says "a project named this and stored there". (see Project>>objectForDataStream:).  
- when someone loads B and then clicks on the PVM for A, the PVM will notice that the project isn't really there yet and will load it

>2. And for that matter(out of curiosity), if the project is on the
>server, how does the ProjectViewMorph get the thumbnail of it (without
>loading it)?

The PVM was created while the project was still in the same squeak image and captured the thumbnail then.

Cheers,
Bob



More information about the Squeak-dev mailing list