ServerDirectory class>>defaultStemUrl

Richard A. O'Keefe ok at atlas.otago.ac.nz
Fri Apr 20 02:28:06 UTC 2001


This is with Squeak 3.0.1 on a PowerMac G3 running MacOS 8.6.

I was playing with BookMorphs.  One thing I tried was including pictures
from a PowerPoint slide.  I was led through a series of folders to locate
a file.  Then I chose identification by page number (of what? I asked to
insert a picture, didn't I?), and then POW "Server name not found".

Poking around in the debugger, I discovered

    ServerDirectory class>>defaultStemUrl
        "For writing on an FTP directory.
         Users should insert their own server url here."
        "ftp://jumbo.rd.wdi.disney.com/raid1/people/dani/Books/Grp/Grp"
        "  ServerDirectory defaultStemUrl  "
        |rand dir|
        rand := String new: 4.
        1 to: rand size do: [:ii |
            rand at: ii put: ('bdfghklmnpqrstvwx' at: 17 atRandom)].
        dir := self serverNamed: 'DaniOnJumbo'.
        ^ 'ftp://', dir server, dir slashDirectory, '/BK', rand

(1) If users should insert their own server url somewhere,
    shouldn't that be explained in the ReadMe or the Welcome to Squeak?
(2) I have no idea which URL to plug in, on two grounds.
    (a) I don't know what Squeak is going to *do* with this URL.
    (b) I have no idea what *directory* to include in it.
(3) "inserting" a URL appears to involve
    (a)	sticking a URI in ServerDirectory class>>servernamed:
	using ServerDirectory class>>addServer:named:
	- but which name should I use?  Is 'DaniOnJumbo' significant?
	- what directory part should it include
    (b)	possibly changing 'DaniOnJumbo' to some other string
	- but which other string?
    (c)	possibly changing 'ftp:' to 'http:' (after all, you can get,
	put, and delete remote files using HTTP)
    (d)	somehow plugging a user name and password in ...

And why the heck is it trying to do some Internet activity when I have
merely tried to load a picture from a local file into my image?
	
Let's just check that this is repeatable.

1. Bring a new BookMorph out of the Supplies flap.
2. Using the menu spot at the top of the BookMorph, bring up a menu.
3. load PPT images from slide #1
   ["Select a file" menu pops up.].
4. Choose image file.
   ["Each page will be a file on the server.
                 vv              vv
     Do you want to page numbers be the names of the files?
                 ^^              ^^
     or name each one yourself?" menu pops up.]
    [Pause in bafflement.  Which server?  I have gigabytes free on my
     hard disc, why not put them THERE?  For want of a better choice:]
5. Choose "Use page numbers".
POW!

If I select "Save in a new place" in step 5, it's still
POW! time

It turns out that BookMorph>>loadImagesIntoBook doesn't want the name
of a PowerPoint (PPT) slide, it wants the name of a directory containing
files named slide1, slide2, ... and it isn't just going to load from
slide1, it's going to load from all of them.

Why did it fail to notice that it had been given a file name, not a
directory name?

If it *does* find slide1, slide2, ... and so on, it writes notes into
Transcript.  Why doesn't it complain if it found no slides?

Why does it delete the first page?

Why does it try to save the BookMorph out, even though I just asked
it to *load* something, not save something?

Will a 'file:...' URL work as the URL for a BookMorph, and if so,
how do I turn a Macintosh file name such as
	Renoir:Backup:Squeaking:2001/04
into a file: URL?





More information about the Squeak-dev mailing list