MAExternalFileModel class >> baseDirectory update responsibility

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MAExternalFileModel class >> baseDirectory update responsibility

Reza Razavi
Hi,

MAExternalFileModel does not belong to the Smalltalk start-up list,
and the cached *baseDirectory* value is not updated by program.
Consequently, when a Pier image is moved from directory A to B,
PRFiles keep referencing 'A/files' instead of 'B/files'.

Has this been designed this way by purpose?

Regards,
Reza






_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: MAExternalFileModel class >> baseDirectory update responsibility

Lukas Renggli
> MAExternalFileModel does not belong to the Smalltalk start-up list, and the
> cached *baseDirectory* value is not updated by program. Consequently, when a
> Pier image is moved from directory A to B, PRFiles keep referencing
> 'A/files' instead of 'B/files'.
>
> Has this been designed this way by purpose?

Yeah, FileDirectory always represents an absolute path.

Maybe using FileDirectory wasn't such a good idea in the first place.
Maybe we should change it to a string to do a relative/absolute lookup
from the image directory? Or, oh well, we could use the Filesystem
framework

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
Reply | Threaded
Open this post in threaded view
|

Re: MAExternalFileModel class >> baseDirectory update responsibility

Reza Razavi
At 08:59 26/02/2010, you wrote:
>Maybe using FileDirectory wasn't such a good idea in the first place.
>Maybe we should change it to a string to do a relative/absolute lookup
>from the image directory? Or, oh well, we could use the Filesystem
>framework

Thank you for your prompt response!

The current implementation works just fine. It looks like that we
just need to separate the *default base directory*, from another
*application-specific base directory*. I'd *simply* do the followings:
- Add MAExternalFileModel to the Smalltalk start-up list to ensure
that the default value gets automatically updated.
- Add an alternative class instance variable, for those applications
that would need to reference a specific directory (without automated update).

Does this make sense?

Otherwise, the issue appeared since I'm used to copy my image from a
*dev* directory to a *prod* directory, before executing my
distribution generation script (sort of "PRDistribution new
register"). I addressed the issue by simply adding to that script
*MAExternalFileModel initialize*.

Regards,
Reza

_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki