loading a GLADE file seems broken. A very minimal file that demonstrates
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--Generated with glade3 3.4.5 on Wed Oct 1 23:37:35 2008 -->
<widget class="GtkWindow" id="window1">
<widget class="GtkVBox" id="vbox1">
Trying to load this gives:
* (glade-xml:load-interface "test2.glade")
There is no applicable method for the generic function
#<STANDARD-GENERIC-FUNCTION SB-MOP:CLASS-FINALIZED-P (1)>
when called with arguments
[Condition of type SIMPLE-ERROR]
0: [RETRY] Retry SLIME REPL evaluation request.
1: [ABORT] Return to SLIME's top level.
2: [ABORT] Exit debugger, returning to top level.
0: ((SB-PCL::FAST-METHOD NO-APPLICABLE-METHOD (T)) #<unavailable argument> #<unavailable argument> #<ST..
1: (GLADE-XML::PARSE-PROPERTIES NIL NIL)
2: (GLADE-XML::BUILD-WIDGET ((:|widget| :|class| "GtkWindow" :|id| "window1") (:|child| (# # #))))
GLADE-XML::AFTER = :<NOT-AVAILABLE>
ATTRIBUTES = NIL
ATTRIBUTES#1 = (:|class| "GtkWindow" :|id| "window1")
GLADE-XML::BODY = (((:|widget| :|class| "GtkVBox" :|id| "vbox1") ..))
GFFI:CALLBACK = :<NOT-AVAILABLE>
CLASS = #<GLIB:GOBJECT-CLASS WINDOW>
GLADE-XML::ELEMENT = :|child|
#:G1 = :<NOT-AVAILABLE>
#:G4 = :<NOT-AVAILABLE>
#:G5 = :<NOT-AVAILABLE>
ID = "window1"
GLADE-XML::INITARGS = :<NOT-AVAILABLE>
GLADE-XML::INITARGS#1 = NIL
#:LOOP-DESETQ-TEMP = :<NOT-AVAILABLE>
#:LOOP-LIST-0 = NIL
NAME = :<NOT-AVAILABLE>
GLADE-XML::OBJECT = :<NOT-AVAILABLE>
GLADE-XML::SPEC = ((:|widget| :|class| "GtkWindow" :|id| "window1") ..)
GLADE-XML::TAG = :|child|
WIDGET = #<WINDOW "window1" at 0x82622E0>
The problem seems to be this part in glade-xml.lisp (line 177):
(let ((initargs (parse-properties (container-child-class class) (rest (second body)))))
(add-child widget (build-widget (first body)) initargs))
CONTAINER-CHILD-CLASS returns NIL when given
#<GLIB:GOBJECT-CLASS WINDOW> and a quick look at
gtk::*container-to-child-class-mappings* confirms that there is no
associated child class for WINDOW.
Does anyone have a clue how to fix this?
Well, take it from an old hand: the only reason it would be easier to
program in C is that you can't easily express complex problems in C,
so you don't. - Erik Naggum (in comp.lang.lisp)
From: Espen S Johnsen <esj@cs...> - 2008-11-13 21:28:13
Julian Stecklina <der_julian@...> writes:
> loading a GLADE file seems broken. A very minimal file that demonstrates
> Does anyone have a clue how to fix this?
I've committed a fix for this. Glade files may still break, as many more
properties probably have to be handled as special cases.