Error processing request

Parameters

CONTENT_LENGTH0
REQUEST_METHODGET
REQUEST_URI/revision/Loading+Glade+UI+Confgiuration+Files+into+Tcl%2FGnocl+Applications?V=22
QUERY_STRINGV=22
CONTENT_TYPE
DOCUMENT_URI/revision/Loading+Glade+UI+Confgiuration+Files+into+Tcl/Gnocl+Applications
DOCUMENT_ROOT/var/www/nikit/nikit/nginx/../docroot
SCGI1
SERVER_PROTOCOLHTTP/1.1
HTTPSon
REMOTE_ADDR172.69.58.56
REMOTE_PORT38854
SERVER_PORT4443
SERVER_NAMEwiki.tcl-lang.org
HTTP_HOSTwiki.tcl-lang.org
HTTP_CONNECTIONKeep-Alive
HTTP_ACCEPT_ENCODINGgzip, br
HTTP_X_FORWARDED_FOR18.222.125.171
HTTP_CF_RAY87a4f3e95f47123d-ORD
HTTP_X_FORWARDED_PROTOhttps
HTTP_CF_VISITOR{"scheme":"https"}
HTTP_ACCEPT*/*
HTTP_USER_AGENTMozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; [email protected])
HTTP_CF_CONNECTING_IP18.222.125.171
HTTP_CDN_LOOPcloudflare
HTTP_CF_IPCOUNTRYUS

Body


Error

Unknow state transition: LINE -> END

-code

1

-level

0

-errorstack

INNER {returnImm {Unknow state transition: LINE -> END} {}} CALL {my render_wikit {Loading Glade UI Confgiuration Files into Tcl/Gnocl Applications} \[WJG\]\ (26-Mar-09)\ One\ of\ the\ features\ added\ into\ Gnocl\ 0.9.94\ is\ the\ import\ of\ Glade\ files\ and\ there\ are\ some\ expiremental\ scripts\ in\ the\ present\ release\ to\ illustrate\ the\ power\ of\ using\ Glade\ files.\n\nGlade\ is\ a\ Gnome\ developer\ application\ which\ allows\ for\ the\ visual\ creation\ of\ detailed\ UIs\ drawing\ upon\ the\ wide\ range\ of\ Gtk/Gnome\ widgets.\ The\ latest\ release\ of\ Glade\ \[http://glade.gnome.org/\]\ may\ even\ have\ support\ for\ other\ popular\ third\ party\ widgets.\ The\ resulting\ layout\ is\ saved\ as\ an\ XML\ file\ and\ be\ easily\ loaded\ into\ a\ tcl\ script\ using\ the\ gnocl::gladeXML\ command.\ At\ the\ moment\ this\ feature\ is\ still\ under\ development\ and\ much\ work\ needs\ to\ be\ done\ on\ settling\ upon\ a\ strategy\ on\ how\ to\ bind\ the\ UI\ signal\ callbacks\ to\ scripts\ on\ the\ Tcl\ side\ of\ the\ interpreter.\n\nWhilst\ I\ personally\ have\ steered\ away\ from\ using\ visual\ UI\ builders\ and\ prefer\ the\ direct\ approach\ of\ scripting,\ for\ the\ vast\ majority\ of\ Gtk\ developers\ Glade\ is\ a\ 'wonder-tool'.\ Incorporating\ full\ support\ for\ both\ Glade\ and\ GtkBuilder\ would\ place\ Tcl\ in\ a\ good\ position\ in\ the\ Gtk\ bindings\ stakes\ as\ Gnocl\ would\ really\ come\ into\ its\ own,\ not\ merely\ as\ a\ UI\ builder,\ but\ enabling\ the\ runtime\ reconfiguration\ of\ widget\ which\ is\ complex\ using\ C.\n\n----\n\[tb\]\ 2009-03-26\ -\ Me\ Too!\ I\ was\ thinking\ about\ just\ traversing\ the\ glade\ file\ using\ \[tdom\]\ and\ then\ returning\ some\ code,\ containing\ a\ window\ creation\ procedure\ and\ some\ callback\ handler\ stubs.\n\nPackage\ example:\n\n\ namespace\ eval\ ::sysdlg::file\ \{\n\ \ \ eval\ \[::gnocl::tclFromGlade\ \"filedlg.glade\"\]\n\ \}\n\ package\ provide\ filedialog\ 0.1\n\n\nNow,\ one\ could\ load\ the\ package,\ lookup\ the\ callback\ handlers\ like...\ \n\n\ \ info\ proc\ ::sysdlg::file::handle*\n\n...and\ start\ overwriting\ the\ stubs.\ Ready!\n\n\[WJG\]\ (26-Mar-09)\ Yes,\ I've\ looked\ at\ tdom\ and,\ found\ it\ more\ reliable.\ You\ see,\ if\ Tcl\ has\ conflicting\ object\ orientation\ extensions,\ then\ Gtk\ has\ conflicting\ UI\ xml\ files.\ There's\ glade\ and\ builder.\ Both\ types\ can\ be\ valid\ XML\ (according\ to\ tdom)\ but\ not\ necessarily\ loadable\ (although\ matters\ might\ have\ eased\ since\ the\ near\ simultaneous\ release\ of\ new\ versions\ by\ both\ the\ Glade\ and\ Gtk\ development\ teams).\ But,\ for\ Gnocl\ to\ work\ well,\ we\ need\ access\ to\ widgets\ from\ their\ Tcl\ names\ and\ the\ ability\ to\ script\ the\ callback\ signals\ which\ libglade\ and\ GtkBuilder\ would\ not\ do\ for\ us.\ So,\ step\ in\ tdom.\ As\ you\ suggest,\ parsing\ the\ XML\ file\ and\ making\ assignments\ is\ quite\ straight\ forward.\ Here's\ a\ Glade\ snippet\ which\ relates\ to\ the\ addition\ of\ a\ button\ to\ an\ existing\ button\ bar:\n\n\n\ <widget\ class=\"GtkToolButton\"\ id=\"add\">\n\ \ \ \ <property\ name=\"visible\">True</property>\n\ \ \ \ <property\ name=\"sensitive\">False</property>\n\ \ \ \ <property\ name=\"label\">Add\ Event</property>\n\ \ \ \ <property\ name=\"stock_id\">gtk-add</property>\n\ \ \ \ <signal\ name=\"clicked\"\ handler=\"on_add_clicked\"/>\n\ </widget>\n\nThis\ would\ correspond\ the\ following\ line\ of\ Gnocl\ script:\n\n\ \$toolBar\ add\ item\ \\\n\ \ \ -visible\ 1\ \\\n\ \ \ -sensitive\ 1\ \\\n\ \ \ -text\ \{Add\ Event\}\ \\\n\ \ \ -icon\ \"%#Add\"\ \\\n\ \ \ -onClicked\ on_add_clicked\n\nStraightforward,\ eh?\ As\ can\ be\ seen\ there\ are\ some\ option\ names\ which\ are\ more\ inspired\ by\ Tk\ than\ the\ GtkWidget\ properties\ to\ which\ they\ map.\ In\ fact,\ when\ they\ are\ at\ variance\ there\ can\ be\ a\ lot\ more\ hidden\ than\ meets\ the\ eye.\ The\ %#\ prefix\ for\ the\ icon,\ for\ instance,\ tell\ us\ that\ it\ is\ a\ stock\ item\ from\ the\ current\ Gnome\ theme.\ This\ could\ equally\ be\ an\ image\ file\ stored\ on\ disc\ as\ supported\ by\ the\ GtkImage\ libraries.\ Some\ widgets,\ like\ the\ gnocl::text,\ gnocl::tree\ and\ gnocl::list\ widgets\ are\ in\ fact\ pretty\ well\ mature\ megawidgets\ which\ would\ produce\ some\ unsual\ effects\ if\ used\ in\ the\ way\ listed\ above.\ But,\ adding\ support\ in\ terms\ of\ new\ Gnocl\ library\ functionality\ for\ the\ instancing\ new\ widgets,\ assigning\ properties\ and\ registering\ them\ with\ the\ interpreter\ should\ not\ be\ too\ problematic.\ Its\ the\ error\ checking\ that\ is\ the\ nightmare\ but\ would\ be\ usually\ handled\ by\ Glade\ itself\ as\ any\ compiled\ C\ code\ application\ loading\ a\ glade\ file\ would\ not\ check\ the\ validity\ of\ the\ XML\ file\ either.\n\nMaybe\ you're\ interested\ in\ taking\ this\ project\ further?\ XML\ gives\ me\ a\ headache\ but\ I'd\ be\ only\ too\ delighted\ to\ co-operate\ with\ anyone\ who\ enjoys\ it.\n\ \n\[tb\]\ -\ Hi,\ I\ did\ some\ investigation\ over\ the\ weekend.\ To\ me\ it\ seems\ a\ job\ of\ translating\ Gtk\ widget\ class\ names\ to\ Gnocl,\ while\ traversing\ the\ \"child\"\ tree\ of\ the\ glade\ file.\ There\ are\ lots\ of\ implications,\ like\ for\ example\ most\ properties\ with\ an\ underline\ character\ in\ their\ names\ don't\ exist\ in\ Gnocl.\ Though\ using\ rules\ and\ translation\ tables\ isn't\ the\ best\ way,\ because\ things\ might\ change\ over\ time,\ I\ don't\ see\ a\ real\ robust\ solution\ at\ the\ moment.\n\n\[WJG\]\ (20-Mar-09)\ Thanks\ for\ taking\ a\ look\ at\ the\ issue.\ Its\ not\ as\ problematic\ as\ it\ would\ seem.\ Each\ one\ of\ the\ GtkProperties\ has\ a\ Gnocl\ C\ library\ routine\ associated\ with\ it\ order\ complete\ the\ wrapping\ process.\ A\ Tcl\ side\ solution,\ of\ course,\ is\ always\ on\ the\ cards\ and\ once\ the\ initial\ framework\ is\ in\ place\ most\ of\ the\ work\ would\ be\ quite\ straightforward,\ albeit\ laborious!\n\n\[WJG\]\ (21-Nov-09)\ Returning\ to\ the\ comments\ made\ by\ \[tb\]\ above.\ Rather\ than\ parsing\ the\ glade\ file\ an\ building\ a\ gnocl\ script\ equivalent,\ I've\ followed\ the\ route\ of\ loading\ the\ glade\ file\ and\ registering\ the\ new\ widgets\ with\ the\ Tcl\ interpreter\ using\ existing\ gnocl\ library\ calls.\ To\ do\ this\ I've\ worked\ through\ the\ glade\ gui\ widget\ trees\ obtaining\ pointers,\ names\ and\ widget\ types.\ During\ the\ registration\ process,\ the\ new\ widgets\ are\ supplied\ handlers,\ again\ from\ the\ existing\ libraries.\ This\ means,\ that\ once\ loaded,\ the\ various\ parameters\ can\ be\ set\ and\ modified\ using\ the\ established\ scripting\ method.\n\n----\n\[WJG\]\ (23-Nov-09)\ Put\ a\ little\ more\ time\ into\ the\ glade\ routines\ for\ gnocl\ this\ weekend.\ Previously,\ the\ gnocl\ libglade\ stubs\ just\ permitted\ the\ loading\ of\ the\ glade\ description\ file,\ now\ the\ the\ widgets\ are\ registered\ with\ the\ interpreter\ itself.\ All\ that\ remains\ is\ completing\ the\ job\ of\ assigning\ handler\ functions\ to\ the\ widgets\ created\ libglade.\ After\ that,\ the\ widgets\ can\ be\ directly\ configured\ using\ Tcl\ scripting.\ And,\ of\ course,\ widgets\ appended\ or\ removed.\ Here's\ the\ test\ script...\n\n\n======\n#---------------\n#\ gladeXMLTest.tcl\n#---------------\n#\ William\ J\ Giddings\n#\ 21-Nov-2009\n#---------------\n\n#!/bin/sh\n#\ the\ next\ line\ restarts\ using\ tclsh\ \\\nexec\ tclsh\ \"\$0\"\ \"\$@\"\n\npackage\ require\ Gnocl\n\nset\ win1\ \[gnocl::glade\ glade\ calculator.glade\]\n\$win1\ configure\ -title\ \"Calculator\ Renamed!\"\ -onDestroy\ \{puts\ \"Done!\"\ \;\ exit\}\n\ngnocl::mainLoop\n======\n\nAnd\ the\ sample\ screengrab..\n\n\[http://lh4.ggpht.com/_yaFgKvuZ36o/SwqGbOXRLyI/AAAAAAAAAKw/brqGSzFCucw/s800/Screenshot-Calculator%20Renamed%21.png\]\n\nKeep\ watching\ this\ space...\ more\ to\ follow!\n\n\[RLH\]\ That\ is\ most\ awesome!\n\n\[WJG\]\ Thanks.\ I'm\ quite\ pleased\ with\ this\ one.\ Although\ I\ personally\ prefer\ scripting\ GUIs\ directly,\ I\ know\ that\ a\ lot\ of\ potential\ Gnocl\ users\ are\ waiting\ for\ a\ bridge\ between\ Tcl\ and\ Glade/Guibuilder.\ Looking\ at\ the\ library\ functions\ it\ might\ also\ be\ possible\ to\ 'dump'\ GUIs\ out\ to\ a\ glade\ file.\ This\ would\ be\ a\ useful\ development\ as\ it\ would\ enable\ GUIs\ built\ or\ protyped\ in\ Gnocl\ to\ be\ reused\ in\ other\ applications.\ One\ feature\ that\ might\ also\ be\ useful\ is\ that\ selected\ 'parts'\ of\ a\ Glade\ based\ GUI,\ eg\ a\ particular\ toolbar\ layout,\ can\ be\ picked\ out\ and\ selectively\ reused.\ \n\n\[tb\]\ Amazing!!!\ -\ A\ big\ step\ towards\ rapid\ prototyping\ of\ Gnome\ apps.\ I'll\ definitely\ stay\ tuned\ :)\n\n----\n\n\n\[WJG\]\ (30/Nov/09)\ Well,\ the\ major\ structure\ for\ implementing\ glade\ files\ is\ in\ place\ and\ now,\ all\ that\ remains\ is\ the\ lengthy\ task\ of\ sewing\ glade\ into\ gnocl.\ Here's\ the\ current\ test\ script\ to\ show\ how\ progress\ is\ moving\ along.\n\n======\n#---------------\n#\ gladeXMLTest1.tcl\n#---------------\n#\ William\ J\ Giddings\n#\ 30-Nov-2009\n#---------------\n\n#!/bin/sh\n#\ the\ next\ line\ restarts\ using\ tclsh\ \\\nexec\ tclsh\ \"\$0\"\ \"\$@\"\n\npackage\ require\ Gnocl\n\n#\ load\ a\ simple\ glade\ file,\ containing\ three\ buttons\ in\ a\ horizontal\ row\n#\ the\ variable\ glade1_widgets\ contains\ a\ list\ of\ all\ widgets\ created\n#\ by\ loading\ this\ file,\ they\ will\ include\ the\ names\ given\ in\ the\ glade\ file\n#\ itself\ along\ with\ the\ names\ assigned\ when\ registering\ these\ with\ Tcl\n\nset\ glade1\ button1.glade\nset\ glade1_widgets\ \[gnocl::glade\ new\ \$glade1\]\n\n#\ create\ a\ list\ of\ aliases\ for\ these\ new\ widgets\ \n#\ we\ can\ use\ the\ glade\ widget\ names\ to\ do\ this,\ to\ make\ things\ manageable\n#\ when\ switching\ between\ Tcl\ and\ Glade\n\nforeach\ item\ \$glade1_widgets\ \{\n\ \ \ \ foreach\ \{gnocl\ glade\}\ \$item\ \{\}\n\ \ \ \ set\ \$glade\ \$gnocl\n\}\n\n#\ in\ the\ glade\ file\ the\ toplevel\ window\ is\ named\ window1\n#\ lets\ resize,\ rename\ and\ centre\ it\ on\ screen\n\n\$window1\ configure\ -title\ \"Glade\ Test\"\ -width\ 320\ -height\ 200\n\$window1\ centre\ \;#\ or\ 'center'\ if\ you\ wish\n\n#\ we\ can\ now\ access\ the\ widget\ attributes\ as\ these\ are\ registered\ with\ gnocl!\n\$button1\ configure\ -icon\ \"%#New\"\ -onClicked\ \{\ puts\ \"NEW!\ from\ %w\"\ \}\n\$button2\ configure\ -icon\ \"%#Open\"\ -onClicked\ \{\ puts\ \"Open!\ from\ %w\"\ \}\n\$button3\ configure\ -icon\ \"%#Save\"\ -onClicked\ \{\ puts\ \"Save!\ from\ %w\"\ \}\n\n#\ as\ there\ needs\ to\ be\ a\ container\ for\ these\ widgets\ we\ can\ get\ its\ name\ with\nset\ box\ \[\$window1\ cget\ -child\]\n\n#\ and,\ of\ course,\ add\ new\ widgets\ too!\n\$box\ add\ \[gnocl::toggleButton\ -text\ \"CLICK\ ME!\"\]\n\ngnocl::mainLoop\n======\n\nAfter\ all\ this,\ our\ simple\ layout...\n\n\[http://lh3.ggpht.com/_yaFgKvuZ36o/SxPzjxDI5EI/AAAAAAAAAK0/flz-pTuBTbU/s144/Screenshot-gladeXMLTest1.tcl_1.png\]\n\nBecomes\ this...\n\n\[http://lh3.ggpht.com/_yaFgKvuZ36o/SxPzj-NIPaI/AAAAAAAAAK4/5nj_Vr91BAM/s800/Screenshot-Glade%20Test.png\]\n\n======\n\n----\n!!!!!!\n%|\ \[Category\ GUI\]\ |%\n!!!!!! regexp2} CALL {my render {Loading Glade UI Confgiuration Files into Tcl/Gnocl Applications} \[WJG\]\ (26-Mar-09)\ One\ of\ the\ features\ added\ into\ Gnocl\ 0.9.94\ is\ the\ import\ of\ Glade\ files\ and\ there\ are\ some\ expiremental\ scripts\ in\ the\ present\ release\ to\ illustrate\ the\ power\ of\ using\ Glade\ files.\n\nGlade\ is\ a\ Gnome\ developer\ application\ which\ allows\ for\ the\ visual\ creation\ of\ detailed\ UIs\ drawing\ upon\ the\ wide\ range\ of\ Gtk/Gnome\ widgets.\ The\ latest\ release\ of\ Glade\ \[http://glade.gnome.org/\]\ may\ even\ have\ support\ for\ other\ popular\ third\ party\ widgets.\ The\ resulting\ layout\ is\ saved\ as\ an\ XML\ file\ and\ be\ easily\ loaded\ into\ a\ tcl\ script\ using\ the\ gnocl::gladeXML\ command.\ At\ the\ moment\ this\ feature\ is\ still\ under\ development\ and\ much\ work\ needs\ to\ be\ done\ on\ settling\ upon\ a\ strategy\ on\ how\ to\ bind\ the\ UI\ signal\ callbacks\ to\ scripts\ on\ the\ Tcl\ side\ of\ the\ interpreter.\n\nWhilst\ I\ personally\ have\ steered\ away\ from\ using\ visual\ UI\ builders\ and\ prefer\ the\ direct\ approach\ of\ scripting,\ for\ the\ vast\ majority\ of\ Gtk\ developers\ Glade\ is\ a\ 'wonder-tool'.\ Incorporating\ full\ support\ for\ both\ Glade\ and\ GtkBuilder\ would\ place\ Tcl\ in\ a\ good\ position\ in\ the\ Gtk\ bindings\ stakes\ as\ Gnocl\ would\ really\ come\ into\ its\ own,\ not\ merely\ as\ a\ UI\ builder,\ but\ enabling\ the\ runtime\ reconfiguration\ of\ widget\ which\ is\ complex\ using\ C.\n\n----\n\[tb\]\ 2009-03-26\ -\ Me\ Too!\ I\ was\ thinking\ about\ just\ traversing\ the\ glade\ file\ using\ \[tdom\]\ and\ then\ returning\ some\ code,\ containing\ a\ window\ creation\ procedure\ and\ some\ callback\ handler\ stubs.\n\nPackage\ example:\n\n\ namespace\ eval\ ::sysdlg::file\ \{\n\ \ \ eval\ \[::gnocl::tclFromGlade\ \"filedlg.glade\"\]\n\ \}\n\ package\ provide\ filedialog\ 0.1\n\n\nNow,\ one\ could\ load\ the\ package,\ lookup\ the\ callback\ handlers\ like...\ \n\n\ \ info\ proc\ ::sysdlg::file::handle*\n\n...and\ start\ overwriting\ the\ stubs.\ Ready!\n\n\[WJG\]\ (26-Mar-09)\ Yes,\ I've\ looked\ at\ tdom\ and,\ found\ it\ more\ reliable.\ You\ see,\ if\ Tcl\ has\ conflicting\ object\ orientation\ extensions,\ then\ Gtk\ has\ conflicting\ UI\ xml\ files.\ There's\ glade\ and\ builder.\ Both\ types\ can\ be\ valid\ XML\ (according\ to\ tdom)\ but\ not\ necessarily\ loadable\ (although\ matters\ might\ have\ eased\ since\ the\ near\ simultaneous\ release\ of\ new\ versions\ by\ both\ the\ Glade\ and\ Gtk\ development\ teams).\ But,\ for\ Gnocl\ to\ work\ well,\ we\ need\ access\ to\ widgets\ from\ their\ Tcl\ names\ and\ the\ ability\ to\ script\ the\ callback\ signals\ which\ libglade\ and\ GtkBuilder\ would\ not\ do\ for\ us.\ So,\ step\ in\ tdom.\ As\ you\ suggest,\ parsing\ the\ XML\ file\ and\ making\ assignments\ is\ quite\ straight\ forward.\ Here's\ a\ Glade\ snippet\ which\ relates\ to\ the\ addition\ of\ a\ button\ to\ an\ existing\ button\ bar:\n\n\n\ <widget\ class=\"GtkToolButton\"\ id=\"add\">\n\ \ \ \ <property\ name=\"visible\">True</property>\n\ \ \ \ <property\ name=\"sensitive\">False</property>\n\ \ \ \ <property\ name=\"label\">Add\ Event</property>\n\ \ \ \ <property\ name=\"stock_id\">gtk-add</property>\n\ \ \ \ <signal\ name=\"clicked\"\ handler=\"on_add_clicked\"/>\n\ </widget>\n\nThis\ would\ correspond\ the\ following\ line\ of\ Gnocl\ script:\n\n\ \$toolBar\ add\ item\ \\\n\ \ \ -visible\ 1\ \\\n\ \ \ -sensitive\ 1\ \\\n\ \ \ -text\ \{Add\ Event\}\ \\\n\ \ \ -icon\ \"%#Add\"\ \\\n\ \ \ -onClicked\ on_add_clicked\n\nStraightforward,\ eh?\ As\ can\ be\ seen\ there\ are\ some\ option\ names\ which\ are\ more\ inspired\ by\ Tk\ than\ the\ GtkWidget\ properties\ to\ which\ they\ map.\ In\ fact,\ when\ they\ are\ at\ variance\ there\ can\ be\ a\ lot\ more\ hidden\ than\ meets\ the\ eye.\ The\ %#\ prefix\ for\ the\ icon,\ for\ instance,\ tell\ us\ that\ it\ is\ a\ stock\ item\ from\ the\ current\ Gnome\ theme.\ This\ could\ equally\ be\ an\ image\ file\ stored\ on\ disc\ as\ supported\ by\ the\ GtkImage\ libraries.\ Some\ widgets,\ like\ the\ gnocl::text,\ gnocl::tree\ and\ gnocl::list\ widgets\ are\ in\ fact\ pretty\ well\ mature\ megawidgets\ which\ would\ produce\ some\ unsual\ effects\ if\ used\ in\ the\ way\ listed\ above.\ But,\ adding\ support\ in\ terms\ of\ new\ Gnocl\ library\ functionality\ for\ the\ instancing\ new\ widgets,\ assigning\ properties\ and\ registering\ them\ with\ the\ interpreter\ should\ not\ be\ too\ problematic.\ Its\ the\ error\ checking\ that\ is\ the\ nightmare\ but\ would\ be\ usually\ handled\ by\ Glade\ itself\ as\ any\ compiled\ C\ code\ application\ loading\ a\ glade\ file\ would\ not\ check\ the\ validity\ of\ the\ XML\ file\ either.\n\nMaybe\ you're\ interested\ in\ taking\ this\ project\ further?\ XML\ gives\ me\ a\ headache\ but\ I'd\ be\ only\ too\ delighted\ to\ co-operate\ with\ anyone\ who\ enjoys\ it.\n\ \n\[tb\]\ -\ Hi,\ I\ did\ some\ investigation\ over\ the\ weekend.\ To\ me\ it\ seems\ a\ job\ of\ translating\ Gtk\ widget\ class\ names\ to\ Gnocl,\ while\ traversing\ the\ \"child\"\ tree\ of\ the\ glade\ file.\ There\ are\ lots\ of\ implications,\ like\ for\ example\ most\ properties\ with\ an\ underline\ character\ in\ their\ names\ don't\ exist\ in\ Gnocl.\ Though\ using\ rules\ and\ translation\ tables\ isn't\ the\ best\ way,\ because\ things\ might\ change\ over\ time,\ I\ don't\ see\ a\ real\ robust\ solution\ at\ the\ moment.\n\n\[WJG\]\ (20-Mar-09)\ Thanks\ for\ taking\ a\ look\ at\ the\ issue.\ Its\ not\ as\ problematic\ as\ it\ would\ seem.\ Each\ one\ of\ the\ GtkProperties\ has\ a\ Gnocl\ C\ library\ routine\ associated\ with\ it\ order\ complete\ the\ wrapping\ process.\ A\ Tcl\ side\ solution,\ of\ course,\ is\ always\ on\ the\ cards\ and\ once\ the\ initial\ framework\ is\ in\ place\ most\ of\ the\ work\ would\ be\ quite\ straightforward,\ albeit\ laborious!\n\n\[WJG\]\ (21-Nov-09)\ Returning\ to\ the\ comments\ made\ by\ \[tb\]\ above.\ Rather\ than\ parsing\ the\ glade\ file\ an\ building\ a\ gnocl\ script\ equivalent,\ I've\ followed\ the\ route\ of\ loading\ the\ glade\ file\ and\ registering\ the\ new\ widgets\ with\ the\ Tcl\ interpreter\ using\ existing\ gnocl\ library\ calls.\ To\ do\ this\ I've\ worked\ through\ the\ glade\ gui\ widget\ trees\ obtaining\ pointers,\ names\ and\ widget\ types.\ During\ the\ registration\ process,\ the\ new\ widgets\ are\ supplied\ handlers,\ again\ from\ the\ existing\ libraries.\ This\ means,\ that\ once\ loaded,\ the\ various\ parameters\ can\ be\ set\ and\ modified\ using\ the\ established\ scripting\ method.\n\n----\n\[WJG\]\ (23-Nov-09)\ Put\ a\ little\ more\ time\ into\ the\ glade\ routines\ for\ gnocl\ this\ weekend.\ Previously,\ the\ gnocl\ libglade\ stubs\ just\ permitted\ the\ loading\ of\ the\ glade\ description\ file,\ now\ the\ the\ widgets\ are\ registered\ with\ the\ interpreter\ itself.\ All\ that\ remains\ is\ completing\ the\ job\ of\ assigning\ handler\ functions\ to\ the\ widgets\ created\ libglade.\ After\ that,\ the\ widgets\ can\ be\ directly\ configured\ using\ Tcl\ scripting.\ And,\ of\ course,\ widgets\ appended\ or\ removed.\ Here's\ the\ test\ script...\n\n\n======\n#---------------\n#\ gladeXMLTest.tcl\n#---------------\n#\ William\ J\ Giddings\n#\ 21-Nov-2009\n#---------------\n\n#!/bin/sh\n#\ the\ next\ line\ restarts\ using\ tclsh\ \\\nexec\ tclsh\ \"\$0\"\ \"\$@\"\n\npackage\ require\ Gnocl\n\nset\ win1\ \[gnocl::glade\ glade\ calculator.glade\]\n\$win1\ configure\ -title\ \"Calculator\ Renamed!\"\ -onDestroy\ \{puts\ \"Done!\"\ \;\ exit\}\n\ngnocl::mainLoop\n======\n\nAnd\ the\ sample\ screengrab..\n\n\[http://lh4.ggpht.com/_yaFgKvuZ36o/SwqGbOXRLyI/AAAAAAAAAKw/brqGSzFCucw/s800/Screenshot-Calculator%20Renamed%21.png\]\n\nKeep\ watching\ this\ space...\ more\ to\ follow!\n\n\[RLH\]\ That\ is\ most\ awesome!\n\n\[WJG\]\ Thanks.\ I'm\ quite\ pleased\ with\ this\ one.\ Although\ I\ personally\ prefer\ scripting\ GUIs\ directly,\ I\ know\ that\ a\ lot\ of\ potential\ Gnocl\ users\ are\ waiting\ for\ a\ bridge\ between\ Tcl\ and\ Glade/Guibuilder.\ Looking\ at\ the\ library\ functions\ it\ might\ also\ be\ possible\ to\ 'dump'\ GUIs\ out\ to\ a\ glade\ file.\ This\ would\ be\ a\ useful\ development\ as\ it\ would\ enable\ GUIs\ built\ or\ protyped\ in\ Gnocl\ to\ be\ reused\ in\ other\ applications.\ One\ feature\ that\ might\ also\ be\ useful\ is\ that\ selected\ 'parts'\ of\ a\ Glade\ based\ GUI,\ eg\ a\ particular\ toolbar\ layout,\ can\ be\ picked\ out\ and\ selectively\ reused.\ \n\n\[tb\]\ Amazing!!!\ -\ A\ big\ step\ towards\ rapid\ prototyping\ of\ Gnome\ apps.\ I'll\ definitely\ stay\ tuned\ :)\n\n----\n\n\n\[WJG\]\ (30/Nov/09)\ Well,\ the\ major\ structure\ for\ implementing\ glade\ files\ is\ in\ place\ and\ now,\ all\ that\ remains\ is\ the\ lengthy\ task\ of\ sewing\ glade\ into\ gnocl.\ Here's\ the\ current\ test\ script\ to\ show\ how\ progress\ is\ moving\ along.\n\n======\n#---------------\n#\ gladeXMLTest1.tcl\n#---------------\n#\ William\ J\ Giddings\n#\ 30-Nov-2009\n#---------------\n\n#!/bin/sh\n#\ the\ next\ line\ restarts\ using\ tclsh\ \\\nexec\ tclsh\ \"\$0\"\ \"\$@\"\n\npackage\ require\ Gnocl\n\n#\ load\ a\ simple\ glade\ file,\ containing\ three\ buttons\ in\ a\ horizontal\ row\n#\ the\ variable\ glade1_widgets\ contains\ a\ list\ of\ all\ widgets\ created\n#\ by\ loading\ this\ file,\ they\ will\ include\ the\ names\ given\ in\ the\ glade\ file\n#\ itself\ along\ with\ the\ names\ assigned\ when\ registering\ these\ with\ Tcl\n\nset\ glade1\ button1.glade\nset\ glade1_widgets\ \[gnocl::glade\ new\ \$glade1\]\n\n#\ create\ a\ list\ of\ aliases\ for\ these\ new\ widgets\ \n#\ we\ can\ use\ the\ glade\ widget\ names\ to\ do\ this,\ to\ make\ things\ manageable\n#\ when\ switching\ between\ Tcl\ and\ Glade\n\nforeach\ item\ \$glade1_widgets\ \{\n\ \ \ \ foreach\ \{gnocl\ glade\}\ \$item\ \{\}\n\ \ \ \ set\ \$glade\ \$gnocl\n\}\n\n#\ in\ the\ glade\ file\ the\ toplevel\ window\ is\ named\ window1\n#\ lets\ resize,\ rename\ and\ centre\ it\ on\ screen\n\n\$window1\ configure\ -title\ \"Glade\ Test\"\ -width\ 320\ -height\ 200\n\$window1\ centre\ \;#\ or\ 'center'\ if\ you\ wish\n\n#\ we\ can\ now\ access\ the\ widget\ attributes\ as\ these\ are\ registered\ with\ gnocl!\n\$button1\ configure\ -icon\ \"%#New\"\ -onClicked\ \{\ puts\ \"NEW!\ from\ %w\"\ \}\n\$button2\ configure\ -icon\ \"%#Open\"\ -onClicked\ \{\ puts\ \"Open!\ from\ %w\"\ \}\n\$button3\ configure\ -icon\ \"%#Save\"\ -onClicked\ \{\ puts\ \"Save!\ from\ %w\"\ \}\n\n#\ as\ there\ needs\ to\ be\ a\ container\ for\ these\ widgets\ we\ can\ get\ its\ name\ with\nset\ box\ \[\$window1\ cget\ -child\]\n\n#\ and,\ of\ course,\ add\ new\ widgets\ too!\n\$box\ add\ \[gnocl::toggleButton\ -text\ \"CLICK\ ME!\"\]\n\ngnocl::mainLoop\n======\n\nAfter\ all\ this,\ our\ simple\ layout...\n\n\[http://lh3.ggpht.com/_yaFgKvuZ36o/SxPzjxDI5EI/AAAAAAAAAK0/flz-pTuBTbU/s144/Screenshot-gladeXMLTest1.tcl_1.png\]\n\nBecomes\ this...\n\n\[http://lh3.ggpht.com/_yaFgKvuZ36o/SxPzj-NIPaI/AAAAAAAAAK4/5nj_Vr91BAM/s800/Screenshot-Glade%20Test.png\]\n\n======\n\n----\n!!!!!!\n%|\ \[Category\ GUI\]\ |%\n!!!!!!} CALL {my revision {Loading Glade UI Confgiuration Files into Tcl/Gnocl Applications}} CALL {::oo::Obj1470000 process revision/Loading+Glade+UI+Confgiuration+Files+into+Tcl%2FGnocl+Applications} CALL {::oo::Obj1469998 process}

-errorcode

NONE

-errorinfo

Unknow state transition: LINE -> END
    while executing
"error $msg"
    (class "::Wiki" method "render_wikit" line 6)
    invoked from within
"my render_$default_markup $N $C $mkup_rendering_engine"
    (class "::Wiki" method "render" line 8)
    invoked from within
"my render $name $C"
    (class "::Wiki" method "revision" line 31)
    invoked from within
"my revision $page"
    (class "::Wiki" method "process" line 56)
    invoked from within
"$server process [string trim $uri /]"

-errorline

4