Dario,
If I understand, you were able to fix your problem?
I did notice that the #fileModel method on the class-side of PRFile does
a detect on a SortedCollection ... so the first description matching the
#descriptionFile is taken ... presumably there is a priority field in
the description that can force a description to be considered first?
Dale
dtrussardi(a)tiscali.it wrote:
Ok,
i work around this problem.
The error is about the descriptionFile method define in the PRFileOnDisk subclass.
When the system create a description it consider the PRfile descriptionFile in all
case.
I think when in the class hierarchy the system found the same descriptionName... it
consider the last definition.
But i wrong ?
Any considerations ?
Thanks,
Dario
Hi,
i work with the Gemstone version of Pier 2.0.
I use PRFile to save data into OODB but
i'm interested to save some Files directly into directory on the server.
For this i create a subclass of PRFile named PRFileOnDisk.
In this class i define the method:
isAbstract ^false
label: ^ 'FIle on disk'.
The fileModel class method return:
^ ISTMAExternalFileModel
and the descriptionFile is set to:
^ MAFileDescription new
kind: ISTMAExternalFileModel;
accessor: #file;
priority: 300;
label: 'File on Disk';
beEditable;
yourself
The ISTMAExternalFileModel is a subclass of MAExternalFileModel
and it work fine ( create directory and save data on the server disk ) for other
Magritte description based on MAFileDescription ( with kind set to ISTMAExternalFileModel
).
Now when in Pier i define a link with Type: 'File on disk' ( based on
PRFileOnDisk )
the system create the subdirectory on the server disk but don't save the file on it
.
The file is managed how MAMemoryFileModel.
Any idea about it ?
Thanks,
Dario
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki
_______________________________________________
Magritte, Pier and Related Tools ...
https://www.iam.unibe.ch/mailman/listinfo/smallwiki