Pete Collins wrote:
> Nope, you can't gain access to the UI form xpcshell.
> 
> --pete

  Why ?
> 
> 
> David Olivari wrote:
> 
>> I'd like to open a window from xpcshell under Linux :
>>
>> var AppShellClass = 
>> Components.classes['@mozilla.org/appshell/appShellService;1'];
>>
>> var AppShellObj = 
>> AppShellClass.getService(Components.interfaces.nsIAppShellService);
>>
>> var CmdLineClass = 
>> Components.classesByID['{e34783f5-ac08-11d2-8d19-00805fc2500c}'];
>>
>> var CmdLineObj = 
>> CmdLineClass.getService(Components.interfaces.nsICmdLineService);
>>
>> var URLClass = Components.classes['@mozilla.org/network/standard-url;1'];
>>
>> var URLObj =
>> URLClass.createInstance(Components.interfaces.nsIURL);
>>
>> URLObj.scheme="file";
>> URLObj.path="/tmp/test.xul";
>>
>> var test = Components.interfaces.nsIXULWindow;
>>
>> AppShellObj.CreateTopLevelWindow(null,
>>            URLObj,
>>     true,
>>     false,
>>     Components.interfaces.nsIWebBrowserChrome.CHROME_ALL,
>>     640,480,
>>     test);
>>
>> And then I get this :
>>
>> GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): 
>> assertion `hash_table != NULL' failed.
>>
>> Gtk-WARNING **: gtk_type_create(): unknown parent type `21'.
>>
>> GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): 
>> assertion `hash_table != NULL' failed.
>>
>> GLib-CRITICAL **: file ghash.c: line 152 (g_hash_table_insert): 
>> assertion `hash_table != NULL' failed.
>>
>> Gtk-WARNING **: invalid class type `GtkInvisible' in cast to `(unknown)'
>>
>> GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): 
>> assertion `hash_table != NULL' failed.
>>
>> Gtk-WARNING **: gtk_type_create(): unknown parent type `21'.
>>
>> Gtk-CRITICAL **: file gtkwidget.c: line 4864 (gtk_widget_ref): 
>> assertion `GTK_IS_WIDGET (widget)' failed.
>>
>> Gtk-WARNING **: invalid class type `GtkInvisible' in cast to `(unknown)'
>>
>> Gtk-CRITICAL **: file gtkobject.c: line 457 (gtk_object_sink): 
>> assertion `GTK_IS_OBJECT (object)' failed.
>>
>> GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): 
>> assertion `hash_table != NULL' failed.
>>
>> Gtk-WARNING **: gtk_type_create(): unknown parent type `21'.
>>
>> Gtk-CRITICAL **: file gtkwidget.c: line 1638 (gtk_widget_realize): 
>> assertion `GTK_IS_WIDGET (widget)' failed.
>>
>> Gtk-WARNING **: invalid class type `GtkInvisible' in cast to `(unknown)'
>>
>> Gtk-CRITICAL **: file gtksignal.c: line 725 (gtk_signal_connect): 
>> assertion `GTK_IS_OBJECT (object)' failed.
>>
>> Gtk-WARNING **: invalid class type `GtkInvisible' in cast to `(unknown)'
>>
>> Gtk-CRITICAL **: file gtksignal.c: line 725 (gtk_signal_connect): 
>> assertion `GTK_IS_OBJECT (object)' failed.
>> Segmentation fault
>>
>> Any Idea
>>
>>
> 
> 



Reply via email to