@walter<br><br>Thanks walter for the clarification.<br>Source file can be viewed directly from pippy and user can add their tools from there.<br>No need of copy-to-jornal now.<br><br>@Benjamin<br><br>Thanks Benjamin for the guidelines.<br>
Will help me alot.<br><br>I''ll try to implement same by both the methods.(pippy one and Benjamin's approach).<br>Now, we need to provide user a simple interface to upload the code.<br><br>Is their any way that in paint activity only, a tab(button) should be inserted which when clicked will take user directly to desenho.py (inside pippy activity)...such that user will simply add his/her tool(code) over their.<br>
<br>Guide me if i am wrong.<br>(I am new to sugar actually,that why clearing my concepts here).<br><br>Thanks a lot for your help.<br>(And waiting for your reply)<br><br>-Deepanshu<br><br><br><div class="gmail_quote">On Thu, Sep 3, 2009 at 10:48 PM, Benjamin M. Schwartz <span dir="ltr"><<a href="mailto:bmschwar@fas.harvard.edu">bmschwar@fas.harvard.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">deepanshu arora wrote:<br>
> yes Benjamin..u are right.<br>
> I am trying to make an interface that would allow users to edit programmable<br>
> tools while inside paint.<br>
<br>
</div>OK. I think that's a great idea, and it should not be too hard to<br>
implement. You will need to provide a GUI for editing, but this is easy<br>
with gtksourceview.<br>
<br>
You also need a way to save and load the user's code. If you are<br>
targeting Sugar 0.84+, then the easiest way to do this is to add the<br>
programmable tools to the datastore object's metadata as a string. See,<br>
for example,<br>
<br>
<a href="http://wiki.laptop.org/go/Sugar.activity.activity#How_do_I_implement_a_write_file_method_for_my_activity_in_order_to_persist_my_activity_in_the_journal.3F" target="_blank">http://wiki.laptop.org/go/Sugar.activity.activity#How_do_I_implement_a_write_file_method_for_my_activity_in_order_to_persist_my_activity_in_the_journal.3F</a><br>
<br>
This method is very easy to use (probably one or two lines of code) and<br>
has the advantages that (1) it only creates a single Journal entry, and<br>
(2) the Journal entry it creates is still a standard PNG file, so it<br>
retains excellent compatibility. However, this method will only work<br>
reliably on Sugar 0.84 and newer.<br>
<br>
--Ben<br>
<br>
</blockquote></div><br>