[Sugar-devel] determine origin of file selected from an object chooser?
Erik Blankinship
erikb at mediamods.com
Thu Feb 10 15:30:12 EST 2011
My suggestion appears to work. What would the community suggest as a better solution using the existing object chooser?
On Feb 10, 2011, at 1:07 PM, Gonzalo Odiard <gonzalo at laptop.org> wrote:
> Please, don't do it. :(
>
> Gonzalo
>
> How does this idea look to the community? Seems hackish to me, but might work?
>
> errything = datastore.find( {} )[0]
>
> ...
>
> dsobject = chooser.get_selected_object( )
>
> from_journal = False
> for errything_ds in errything:
> if errything_ds.object_id == dsobject.object_id:
> from_journal = True
> break
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20110210/01ecd40d/attachment-0001.html>
More information about the Sugar-devel
mailing list