Please lets move this conversation to the design thread. I just posted there the latest patches that complies with everyone's suggestions.<br><br><div class="gmail_quote">On Tue, Aug 21, 2012 at 3:00 PM, Gonzalo Odiard <span dir="ltr"><<a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Maybe the ObjectChooser can look by default at a fixed directory (as "examples")<div>but have a optional parameter to solve this particular cases.</div>
<div><br></div><div>It's true etoys (or scratch) have his own particular directories,</div>
<div>but also use his particular methods to access it.</div><span class="HOEnZb"><font color="#888888"><div><br></div></font></span><div><span class="HOEnZb"><font color="#888888">Gonzalo</font></span><div><div class="h5">
<br><br><div class="gmail_quote">On Tue, Aug 21, 2012 at 3:53 PM, Martin Abente <span dir="ltr"><<a href="mailto:martin.abente.lahaye@gmail.com" target="_blank">martin.abente.lahaye@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello Bert!<br><br>Thanks for taking your time looking at this.<br><br>What I tried, or I am trying, to do is to make this feature available as easy as we can, so even deployments could add their own examples with very little technical knowledge requirements. That why I try this convention (magical) idea.<br>


<br>I would really appreciate if you could bring you ideas to the design thread. :) Because the design of this feature seems to be changing there.<div><div><br><br><div class="gmail_quote">On Tue, Aug 21, 2012 at 2:36 PM, Bert Freudenberg <span dir="ltr"><<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><br>
On <a href="tel:2012-08-21" value="+59820120821" target="_blank">2012-08-21</a>, at 15:38, Sascha Silbe wrote:<br>
<br>
> Martin Abente Lahaye <<a href="mailto:martin.abente.lahaye@gmail.com" target="_blank">martin.abente.lahaye@gmail.com</a>> writes:<br>
><br>
</div><div>>> +    def _add_activity_example(self, home_activity):<br>
>> +        examples_path = os.path.join(home_activity.get_bundle_path(),<br>
>> +                                    'examples')<br>
>> +<br>
>> +        if not os.path.exists(examples_path):<br>
>> +            return<br>
><br>
> If you add a guard against home_activity.get_bundle_path() returning<br>
> None, you can drop the special-casing for the Journal activity.<br>
<br>
<br>
</div>I like the general idea very much. However, instead of a magic directory name, couldn't the <a href="http://activity.info" target="_blank">activity.info</a> file have a new entry giving the examples path?<br>
<br>
This could be encapsulated in a function home_activity.get_examples_path().<br>
<br>
The advantage of this would be that activities could specify a directory (relative to the bundle directory) that fits their structure better than having to put the examples into a fixed location in the bundle. In very special cases they could even give an absolute path, e.g. Etoys examples are in /usr/share/etoys/ExampleEtoys ...<br>



<br>
- Bert -<br>
<br>
_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
</blockquote></div><br>
</div></div><br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org" target="_blank">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br></div></div></div>
</blockquote></div><br>