On 11 Sep 2007, at 17:36, Damien Pollet wrote:
On 10/09/2007, Lukas Renggli
<renggli(a)iam.unibe.ch> wrote:
> I'd like to describe a field that should
point to a file on the
> server's disk.
[snip]
Yes, in your case you certainly need to create
your own file chooser
dialog. I don't exactly remember the details on how
MAExternalFileModel is implemented, probably you need to subclass the
model as well (unless it supports to freely specify the location).
OK, thanks!
I have a first implementation in Citezen-Seaside at
http://www.squeaksource.com/Citezen.html
I created MAReferenceFileModel (subclass of MAExternalFileModel with
settable location) and MAServerFileChooserComponent to work with it.
I used Rio to manipulate file paths because it seemed easier; should I
remove the dependancy before committing the code to the Magritte
repository ?
It depends if you code is in a separate package or not? I would
prefer to keep Magritte-Core, Magritte-Seaside and Magritte-Tests as
portable as possible. There are ports to VisualWorks and GemStone and
such a dependency would make portability much harder. File access in
general is a bad story anyway.
For extension packages I think it is fine to have dependencies, as
long as it is documented somewhere. Please go ahead an publish it to
one of the Magritte repositories.
Cheers,
Lukas
--
Lukas Renggli
http://www.lukas-renggli.ch