"Stephen J. Turnbull" <turnbull(a)sk.tsukuba.ac.jp> writes:
More gtk-xemacs fun. Only a native Pervect would try this, so
I'm not
surprised it failed:
****
bash-2.04$ src/xemacs -batch -l /coda/Projects/XEmacs/gtk-xemacs/tests/gtk/gtk-test.el
-eval '(gtk-test)' &
[3] 17852
bash-2.04$ Loading /coda/Projects/XEmacs/gtk-xemacs/tests/gtk/gnome-test.el...
GLib-CRITICAL **: file ghash.c: line 138 (g_hash_table_lookup): assertion `hash_table !=
NULL' failed.
/** error msg repeated 13 times, alternating between l 138 ..._lookup
and l 152 ..._insert **/
Just fixed this... gtk-init is now exposed to lisp (and is a noop if it is
called more than once). So you can create a gtk app in batch or TTY mode.
The only oddity is that you cannot use XEmacs glyphs as GdkPixmap or
GdkBitmap types (TTY/batch mode has no glyph converters).
I will check this code in when I get home late tonight.
****
bash-2.04$ src/xemacs -l /coda/Projects/XEmacs/gtk-xemacs/tests/gtk/gtk-test.el -funcall
gtk-test
****
apparently ignores the -funcall (on second check, there are two messages
indicating successful load of gnome-test.el followed by one about
`Unknown argument type: "GtkAdjustment"' in *Message-Log*), but happily
runs the test interactively from the gtk-xemacs frame.
Strange... I think this is fixed with the changes I have here. There is a
chicken & egg problem with creating a scrolled window and expect it to have
default adjustments. Because gtk_adjustment_new has not been called, the
type is not registered with the object system, so it screams when I try to
convert 'nil' to an unknown type. *sigh* I work around this by just
creating & destroying a GtkAdjustment before I call anything else in the
test code.
-Bill P.