On Mon, 2010-02-01 at 07:25 +0100, Lukas Renggli wrote:
I also
don't know which of the classes is intended for display, or how
to display them.
MAFileModel represents a file in Smalltalk. It knows the filename,
mimetype, size, contents, etc. MAExternalFileModel is no different,
other than it stores the file contents externally to the image (see
class comment). The location and naming of this file is managed
automatically, you cannot change it.
Initially, I just want to use these to display
links to files that are
on the disk. Presumably that will use MAExternalFileModel somehow.
AFAIK other people have written MAFileModel subclasses that refer to a
specific external file.
I hadn't realized that MAExternalFileModel was for an uploaded file,
stored on disk. Making a new subclass to handle files originating on
the server, in "random" directories, sounds straightforward.
I remain puzzled by how to hook these up to output, as well as what the
responsibility of PRFile is. I've been using a custom component to
display the files, but since PRFile is a model it doesn't seem to belong
there.
I think a natural procedure would be to make a PRPage and then use
addChild: to stick PRFile's into it. However, the list of files is
dynamic (depending on what's in the directory). How can I handle that?
Thanks.
Ross