[Sugar-devel] ObjectChooser() Issue?
Sascha Silbe
sascha-ml-reply-to-2010-3 at silbe.org
Tue Nov 9 15:50:03 EST 2010
Excerpts from James Simmons's message of Tue Nov 09 19:37:01 +0100 2010:
> > One thing I noted when I tried to read paths from Journal entries is
> > that they don't stay valid forever. I think they are symbolic links
> > to the actual file.
Almost right: we are using hard links. In general, activities shouldn't
need to worry about the difference. However, in the context of Rainbow
(in combination with Sugar 0.82) it can get important: if the creating
activity used too restrictive permissions (umask), other activities
might not be able to update or even just read the file.
> > If you read through a list of Journal objects
> > only the current one will have a valid path, and the others get
> > disconnected.
As Aleksey explained, what matters is that you keep a reference to the
DSObject.
> > jobject.get_file_path()
> >
> > instead of jobject.file_path.
Both are exactly the same. Accessing file_path will simply invoke
get_file_path():
sugar.datastore.datastore.py, class DSObject:
> file_path = property(get_file_path, set_file_path)
--
http://sascha.silbe.org/
http://www.infra-silbe.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101109/2f499168/attachment.pgp>
More information about the Sugar-devel
mailing list