[Sugar-devel] query

deepanshu arora deepanshuarora1 at gmail.com
Thu Sep 3 14:24:46 EDT 2009


@walter

Thanks walter for the clarification.
Source file can be viewed directly from pippy and user can add their tools
from there.
No need of copy-to-jornal now.

@Benjamin

Thanks Benjamin for the guidelines.
Will help me alot.

I''ll try to implement same by both the methods.(pippy one and Benjamin's
approach).
Now, we need to provide user a simple interface to upload the code.

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.

Guide me if i am wrong.
(I am new to sugar actually,that why clearing my concepts here).

Thanks a lot for your help.
(And waiting for your reply)

-Deepanshu


On Thu, Sep 3, 2009 at 10:48 PM, Benjamin M. Schwartz <
bmschwar at fas.harvard.edu> wrote:

> deepanshu arora wrote:
> > yes Benjamin..u are right.
> > I am trying to make an interface that would allow users to edit
> programmable
> > tools while inside paint.
>
> OK.  I think that's a great idea, and it should not be too hard to
> implement.  You will need to provide a GUI for editing, but this is easy
> with gtksourceview.
>
> You also need a way to save and load the user's code.  If you are
> targeting Sugar 0.84+, then the easiest way to do this is to add the
> programmable tools to the datastore object's metadata as a string.  See,
> for example,
>
>
> 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
>
> This method is very easy to use (probably one or two lines of code) and
> has the advantages that (1) it only creates a single Journal entry, and
> (2) the Journal entry it creates is still a standard PNG file, so it
> retains excellent compatibility.  However, this method will only work
> reliably on Sugar 0.84 and newer.
>
> --Ben
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.sugarlabs.org/archive/sugar-devel/attachments/20090903/7ddafa2e/attachment-0001.htm 


More information about the Sugar-devel mailing list