[Sugar-devel] Object Chooser (was Re:  Etoys mp3 files)
    Bert Freudenberg 
    bert at freudenbergs.de
       
    Mon Jun  4 17:20:21 EDT 2012
    
    
  
On 04.06.2012, at 14:13, Bert Freudenberg wrote:
> On 04.06.2012, at 13:43, Sascha Silbe wrote:
> 
>> It's quite likely that Etoys doesn't implement its side of the
>> essentially undocumented Object Chooser API of Sugar 0.84+ correctly. In
>> particular, the object_id parameter of the ObjectChooserResponse signal
>> will contain a) the data store object id (currently stored as property
>> 'uid') for Journal objects or b) the full path to the file for entries
>> stored on external storage media.
> 
> That is indeed the first time I hear of that. Yes, Etoys expects the chooser's response to be an object_id as per documentation at
> 
> 	http://wiki.sugarlabs.org/go/Development_Team/Low-level_Activity_API#Choosing_Objects
> 
> So you're saying that in the response, the second argument would more properly be named object_id_or_full_path. And to distinguish the two cases, we have to look at its first character: if it is '/' then it's a path, otherwise an object id. 
I now extended that documentation page with the object_id_or_full_path argument discussion.
Also, I committed a fix for Etoys, will be in the next release.
This question remains:
> Are there any other places in the API where instead of an object id we have to expect a full path instead?
- Bert -
    
    
More information about the Sugar-devel
mailing list