Hi everybody,<br><br>I have been trying to use the WebView widget from hulahop to display documentation in an Activity. <br><br>I don't have enough experience to know where to start looking  to fix the problem I'm having:<br>
<br>The following test program shows the different widget behavior comparing gtk.Textview with hulahop.Webview:<br><br>#!/usr/bin/env python<br>#test program to show the different widget behaviors webview vs textview<br>import os<br>
import hulahop<br><br>from sugar import env<br>hulahop.startup(os.path.join(env.get_profile_path(), 'gecko'))<br><br>from hulahop.webview import WebView<br><br>import gtk<br>tvon=True<br>wvon=True<br>def clicked_cb(widget):<br>
    global tvon<br>    if tvon :<br>        tvwidget.hide()<br>    else:<br>        tvwidget.show()<br>    tvon = not tvon<br>    <br>def wv_clicked_cb(widget):<br>    global wvon<br>    if wvon :<br>        wvwidget.hide()<br>
    else:<br>        wvwidget.show()<br>    wvon = not wvon<br>    <br>win = gtk.Window(gtk.WINDOW_TOPLEVEL)<br>#nb = gtk.Notebook()<br>vb = gtk.VBox()<br>vb.show()<br><br>#two buttons to toggle the widgets' visibility<br>
tvbutton = gtk.Button('togle textview')<br>tvbutton.show()<br>tvbutton.connect('clicked',clicked_cb)<br>vb.pack_start(tvbutton)<br>wvbutton = gtk.Button('togle Webview')<br>wvbutton.show()<br>wvbutton.connect('clicked',wv_clicked_cb)<br>
vb.pack_start(wvbutton)<br><br>wvwidget = WebView()<br>tvwidget = gtk.TextView()<br>wvwidget.load_uri('<a href="http://wiki.laptop.org/go/Guido_van_Robot">http://wiki.laptop.org/go/Guido_van_Robot</a>')<br>wvwidget.show()<br>
tvwidget.show()<br>vb.pack_start(tvwidget)<br>vb.pack_start(wvwidget)<br><br>win.add(vb)<br><br>win.show()<br>gtk.main()<br><br><br>The observed behavior, first observed in a notebook container, is that when the button that toggles textview visibility is clicked, the expected repacking of the vbox occurs. But when the webview toggle button is clicked, the mainwindow closes, but the mainloop does not return (I need to do <clt>C to get back a terminal prompt).<br>
<br>Does anyone know if there is a property of widgets that would control this behavior? What's the best way to start attack this problem? Where in the hulahop source should I start looking?<br><br>Thanks<br>George<br>