RE: how to use TextFile

"Goldsack, Patrick" <[email protected]>
Newsgroups gmane.comp.java.smartfrog.user
Message-ID <[email protected]>
 
Andreas,

The openoffice documentation for this is in the CVS (under
core/smartfrog/docs/componentsfilesystem.sxw). It was not included as
part of the release package for some reason.

The attribute you should set for the directory is "dir" and not
"absolutePath". This is set dynamically for you by the component.

Patrick

-----Original Message-----
From: smartfrog-support-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:smartfrog-support-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of
Andreas Unterkircher
Sent: 07 September 2005 14:14
To: smartfrog-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [Smartfrog-support] how to use TextFile


Hello,

I'd like to create a simple textfile with SF. Therefore I use the
TextFile
component:

#include "org/smartfrog/services/filesystem/components.sf"

file1 extends TextFile {
 text "test";
 absolutePath "/tmp";
 filename "test.txt";
}
sfConfig extends Compound {
 test extends file1;
}

But this only works when I start sfDaemon in /tmp. E.g. when I start
sfDaemon in /usr I get:

      * Exception: 'SmartFrogLifecycleException:: [sfDeploy] HOST
oplabox03.cern.ch:rootProcess:file:test
         cause: SmartFrogException:: When trying to write to
/usr/test.txt
            cause: java.io.FileNotFoundException: /usr/test.txt: 
Permission denied


What is the correct way to use the TextFile component ?

Thanks,
Andreas

-- 
http://cern.ch/openlab


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Smartfrog-support mailing list
Smartfrog-support-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/smartfrog-support


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.