<div>Thanks for the quick response..The xocom is at <a href="http://github.com/lukec/xocom/tree/master">http://github.com/lukec/xocom/tree/master</a></div>
<div>I will definitely go through the codes you have sent. After studying that, I will try to get back to SocialCalc again..</div>
<div>Regards</div>
<div>Preeti<br><br> </div>
<div><span class="gmail_quote">On 7/24/08, <b class="gmail_sendername">Tomeu Vizoso</b> <<a href="mailto:tomeu@tomeuvizoso.net">tomeu@tomeuvizoso.net</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>where is the xocom source repository?<br><br>I know nothing about xocom, but I recommend you to code a simple<br>
python-only activity first to familiarize with that part of the<br>problem, and only then coming back to the SocialCalc Activity. Take a<br>look to this activity:<br><br><a href="http://dev.laptop.org/~marco/Edit-1.xo">http://dev.laptop.org/~marco/Edit-1.xo</a><br>
<a href="http://dev.laptop.org/git?p=users/marco/edit-activity;a=blob;f=editactivity.py;h=bb2e98e27f236e716fb47faad952ac35fb827ab9;hb=HEAD">http://dev.laptop.org/git?p=users/marco/edit-activity;a=blob;f=editactivity.py;h=bb2e98e27f236e716fb47faad952ac35fb827ab9;hb=HEAD</a><br>
<br>Good luck,<br><br>Tomeu<br><br>2008/7/24 Preeti KS <<a href="mailto:kspreeti.13@gmail.com">kspreeti.13@gmail.com</a>>:<br>> Dear all,<br>><br>>     I have been working on the toolbar of the SocialCalc Activity. In this<br>
> activity, a Spreadsheet was being made. The main programme has been written<br>> in Javascript. whereas the function call has been made from Python. Hence, a<br>> package called xocom was made to felicitate communication between JS and<br>
> Python.<br>>    I made the toolbar in Python, and used xocom to create the webview,etc. I<br>> also managed to interface the toolbar.py file with the socialcalc.py file,<br>> however, as I am not very adept with JS, I am facing problems interfacing<br>
> the toolbar.py file with the Javascript file. I have attached the relevent<br>> files with this email and also at<br>> <a href="http://wiki.laptop.org/go/Image:SocialCalc-toolbar.zip">http://wiki.laptop.org/go/Image:SocialCalc-toolbar.zip</a> .<br>
> My toolbar.py file is as follows, these are some code snippets:<br>><br>> This is the main spreadsheet activity toolbar, It has used xocom to create<br>> the webview..<br>><br>> class SpreadSheetActivityToolbar:<br>
><br>>     def __init__(self, activity, toolbox, self_canvas):<br>><br>>         self._activity = activity<br>>         self.set_canvas( xocom.create_webview() )<br>>         self._activity_toolbar = toolbox.get_activity_toolbar()<br>
>         self._keep_palette = self._activity_toolbar.keep.get_palette()<br>><br>> .........................<br>><br>> Then, I have created another class, for the edit toolbar. Its definition is<br>> as follows:<br>
><br>> class SpreadsheetEditToolbar(EditToolbar):<br>><br>>     def __init__(self, toolbox, self_canvas):<br>><br>>         EditToolbar.__init__(self)<br>>         self.set_canvas( xocom.create_webview() )<br>
> .........<br>><br>> This is followed by the general definition of edit toolbar,<br>> copy,paste,undo,redo, etc. There is also a viewtoolbar class, for viewing it<br>> on hulahoop.<br>><br>> Here are the details of the SocialCalc.py file:<br>
> To interface it with toolbar.py, I have imported the classes from this file<br>> as:<br>><br>> import toolbar<br>> from toolbar import SpreadSheetActivityToolbar, SpreadsheetEditToolbar,<br>> ViewToolbar<br>
><br>> Then, while creating the toolbar, I have called these functions as:<br>><br>>         toolbox = activity.ActivityToolbox(self)<br>>         self.set_toolbox(toolbox)<br>>         toolbox.show()<br>
><br>> Separately calling edit toolbar:<br>><br>>       self._edit_toolbar = SpreadsheetEditToolbar(self, self._edit_toolbar,<br>> set_canvas)<br>>         toolbox.add_toolbar(_('Edit'),self._edit_toolbar)<br>
>         self._edit_toolbar.show()<br>><br>> And similarly calling the Viewtoolbar class:<br>><br>>         view_toolbar = ViewToolbar (self.set_canvas)<br>>         self.set_canvas.show()<br>><br>> Now, my problem is that, the xocom class connects the socialcalc.py file<br>
> with the Javascript file, socialcalc.js and xocom.js. I am unable to make<br>> out, whether I have to make changes in the JS file, and what changes to<br>> make.<br>><br>> I would be obliged if someone who has been designing toolbars, can help me<br>
> out with this interfacing problem.<br>><br>> Thanks and regards<br>> KS Preeti,<br>> Team Member,<br>> SocialCalc Team<br>><br>><br>><br>><br>> _______________________________________________<br>
> Devel mailing list<br>> <a href="mailto:Devel@lists.laptop.org">Devel@lists.laptop.org</a><br>> <a href="http://lists.laptop.org/listinfo/devel">http://lists.laptop.org/listinfo/devel</a><br>><br>><br></blockquote>
</div><br>