Re: using the browser as an activity platform : pyxpcom / hulahop / Gears

2008-02-28 Thread Edward Cherlin
On Sat, Feb 16, 2008 at 10:21 AM, Samuel Klein [EMAIL PROTECTED] wrote:
 The core use here is being able to use the browser as activity
  platform -- letting web developers good at JS code and test on most
  any platform, and develop something that can be a first-class activity
  within Sugar.  One example is Dan's javascript spreadsheet, anothe ris
  a dynamic library (see for instance
  http://wiki.laptop.org/go/Dynamic_library), another is an existing web
  service online that one might want to run locally.

  In addition to pyxpcom, let me add Google Gears as a useful piece of
  this platform, especially when offering local use of popular online
  tools.  Off the top of my head, MediaWiki, MindMeister, I copy Ben
  Lisbakken, a gears maintainer, who reports that there is a Gears patch
  to make it work without extension support...  Ben, I'll also introduce
  you to marcopg separately.

At the Google Web Toolkit conference in December 2007, many of the
developers, along with conference sponsor Pearson Education, expressed
interest in working on XO projects in several computer languages. One
of us could guest blog on the subject, or take it up on their mailing
list.

http://code.google.com/webtoolkit/
Java to platform-independent JavaScript compiler.

http://googlewebtoolkit.blogspot.com/
Current post: Spreading the word about pollution in the US: MapEcos,
built with GWT

This relates to the recent Engineers Without Borders query.

http://groups.google.com/group/Google-Web-Toolkit
This is the official discussion forum for GWT. 
-- 
Edward Cherlin
End Poverty at a Profit by teaching children business
http://www.EarthTreasury.org/
The best way to predict the future is to invent it.--Alan Kay
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: using the browser as an activity platform : pyxpcom / hulahop / Gears

2008-02-27 Thread Samuel Klein
Thanks; and hello, Brad.  I'm creating a related wikireader group to address
offline reader development; only one of the uses of gears on the XO.  Please
list yourself at [[Wikireader]] if you want to join.

SJ

On Wed, Feb 20, 2008 at 2:37 PM, Ben Lisbakken [EMAIL PROTECTED] wrote:

 I'm going to add Brad Neuberg to this conversation.  He is a colleague
 of mine on the Google Gears project and he has been looking for a
 contact at OLPC.

 -Ben

 On Sun, Feb 17, 2008 at 12:12 PM, ffm [EMAIL PROTECTED] wrote:
  On Feb 16, 2008 6:21 PM, Samuel Klein [EMAIL PROTECTED] wrote:
 
   The core use here is being able to use the browser as activity
   platform -- letting web developers good at JS code and test on most
   any platform, and develop something that can be a first-class activity
   within Sugar.  One example is Dan's javascript spreadsheet, anothe ris
   a dynamic library (see for instance
   http://wiki.laptop.org/go/Dynamic_library), another is an existing web
   service online that one might want to run locally.
  
   In addition to pyxpcom, let me add Google Gears as a useful piece of
   this platform, especially when offering local use of popular online
   tools.  Off the top of my head, MediaWiki, MindMeister, I copy Ben
   Lisbakken, a gears maintainer, who reports that there is a Gears patch
   to make it work without extension support...
 
  Is there any way that one could get involved with the
 google-gears-on-the-xo
  spec drafting/implementation process? This is something I might be
  interested in contributing to, but I cannot find anything about it on
 the
  wiki.
 
 
  -FFM

___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: using the browser as an activity platform : pyxpcom / hulahop / Gears

2008-02-17 Thread ffm
On Feb 16, 2008 6:21 PM, Samuel Klein [EMAIL PROTECTED] wrote:

 The core use here is being able to use the browser as activity
 platform -- letting web developers good at JS code and test on most
 any platform, and develop something that can be a first-class activity
 within Sugar.  One example is Dan's javascript spreadsheet, anothe ris
 a dynamic library (see for instance
 http://wiki.laptop.org/go/Dynamic_library), another is an existing web
 service online that one might want to run locally.

 In addition to pyxpcom, let me add Google Gears as a useful piece of
 this platform, especially when offering local use of popular online
 tools.  Off the top of my head, MediaWiki, MindMeister, I copy Ben
 Lisbakken, a gears maintainer, who reports that there is a Gears patch
 to make it work without extension support...


Is there any way that one could get involved with the google-gears-on-the-xo
spec drafting/implementation process? This is something I might be
interested in contributing to, but I cannot find anything about it on the
wiki.


-FFM
___
Devel mailing list
Devel@lists.laptop.org
http://lists.laptop.org/listinfo/devel


Re: using the browser as an activity platform : pyxpcom / hulahop / Gears

2008-02-16 Thread Samuel Klein
The core use here is being able to use the browser as activity
platform -- letting web developers good at JS code and test on most
any platform, and develop something that can be a first-class activity
within Sugar.  One example is Dan's javascript spreadsheet, anothe ris
a dynamic library (see for instance
http://wiki.laptop.org/go/Dynamic_library), another is an existing web
service online that one might want to run locally.

In addition to pyxpcom, let me add Google Gears as a useful piece of
this platform, especially when offering local use of popular online
tools.  Off the top of my head, MediaWiki, MindMeister, I copy Ben
Lisbakken, a gears maintainer, who reports that there is a Gears patch
to make it work without extension support...  Ben, I'll also introduce
you to marcopg separately.

SJ

On Feb 16, 2008 12:36 PM, Samuel Klein [EMAIL PROTECTED] wrote:
 Moving this thread to devel.   SJ


Marco wrote:
 Hello,

 I'm really excited about this work. Hulahop is one of the things which
 I'd really to develop further but I never get time for it. So it's
 awesome you guys are looking into it.

 I agree with Tomeu, though. Please move the discussion on the public
 mailing list. Can someone take care to post a summary of the discussions
 and the work which has been done so far?

 Thanks!

 On Feb 16, 2008 11:54 AM, edward baafi [EMAIL PROTECTED] wrote:
  Hi Luke,
 
  It appears from your code snippet that you have a browse activity build
  which has pyxpcom enabled..  Is this built by default on Joyride?  If not,
  how can you best get me access to your pyxpcom enabled environment?
 
  What I've discussed with SJ and Manu is a somewhat different approach than
  what you seem to be pursuing..  We're looking at wrapping core functionality
  we want access to from javascript (ex: launching journal to browse for or
  save a file) in xpcom interfaces..  Then one could simply write javascript
  code to manipulate the DOM with hooks into sugar stuff like journal,
  presence, sharing, etc..  I'm not sure how Mozilla's privileged code model
  will relate to bitfrost, but I think this route is worth pursuing..
 
  Alternatively, if you are interested in using python to manipulate the DOM,
  this is also possible directly
  (http://developer.mozilla.org/en/docs/PyDOM)..  This should be possible in
  your build or it is a simple config (--enable-extensions=python,default)
  change..
 
  Looking forward,
 
  Ed
 
 
 
  On Feb 14, 2008 5:47 PM, Manusheel Gupta [EMAIL PROTECTED] wrote:
   Luke,
   Thanks for the update.
  
   I wish to introduce you to Edward Baafi, who has been working with PyXPCOM
  for a long time. Me, SJ, and Edward had a detailed discussion about
  JavaScript-Sugar integration yesterday. Komodo, a project from the
  ActiveState Community is an interesting use-case that can be very useful to
  the Spreadsheet project.
  
   Edward directed us to the following links:
  
   http://www.mail-archive.com/[EMAIL PROTECTED]/msg02285.html
  
   http://aspn.activestate.com/ASPN/Mail/Message/pyxpcom/3476506
  
  
  
   Edward,
   Thanks a lot for your pointers.
  
   Regards,
   Manu
  
  
   Manusheel Gupta
   Technical Consultant and Adviser
   One Laptop Per Child Inc.
   http://laptop.org
  
  
   On Thu, Feb 14, 2008 at 3:25 PM, Luke Closs [EMAIL PROTECTED]
  wrote:
  
Hello guys,
   
So tonight I made some progress on the python - js communication,
and I also better understand how activity load/saving should work.
   
In my python code, when I set up the WebView object, I can
addEventListener for the 'click' event.  Then I create a python class
that is called when I click on the HTML page.  In the event listener,
I can check for event targets with a certain id.
   
I set this up for a certain span in a simple HTML page, and my python
code could grab the content from inside the span, and change it!  The
code looks like this:
   
class EventListener:
_com_interfaces_ = components.interfaces.nsIDOMEventListener
   
def handleEvent(self, event):
t = event.target
if t.id != 'count': return
elem = t.queryInterface(components.interfaces.nsIDOM3Node);
print elem.textContent
elem.textContent = '42'
   
web_view.window_root.addEventListener('click', EventListener(), False)
   
   
With this bit of understanding, I need to start thinking about exactly
how we'll integrate with the spreadsheet.  I'll start thinking of the
2 main actions:
   
save:
* python fires event to say start saving
* js runs code to create the content to be saved, sticks it into an
element
* js fires event to say ready to save on the element
* python reads textContent from event target
* python saves to disk
   
load:
* python reads from disk
* python writes content into dom
* python fires event to say ready to load
   
   
I need to extend my simple test program