Desired ocaml example code using a glade file,

This is a discussion on Desired ocaml example code using a glade file, within the ml forums in Programming Languages category; Checked on the internet examples using lablgtk2, but there was no example for using a glade file to generate a user interface. (Libglade is included in the liblgtk2 library, so the glade module is available.) Did anyone ever used it. Is there a code example or tutorial for using it available somewhere? Thank you...

Go Back   Application Development Forum > Programming Languages > ml

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 10-26-2007, 07:48 PM
Sandor Lengyel
Guest
 
Default Desired ocaml example code using a glade file,



Checked on the internet examples using lablgtk2, but there was no example

for using a glade file to generate a user interface.

(Libglade is included in the liblgtk2 library, so the glade module is

available.)

Did anyone ever used it. Is there a code example or tutorial for using it

available somewhere?



Thank you




Reply With Quote
  #2  
Old 10-30-2007, 09:00 PM
sebmdt
Guest
 
Default Re: Desired ocaml example code using a glade file,


Hi,

(in my debian) lablgtk comes with 'lablgladecc2'
which parses a glade file and generates ocaml classes (on stdout)
it still uses libglade and the glade file, but it offers a cleaner
interface
(without type-casting)

that's the way I indirectly use libglade in lablgtk.


--
Sebastien MONDET
http://sebmdt.googlepages.com


On Oct 27, 1:48 am, Sandor Lengyel <sleng...@chello.hu> wrote:
> Checked on the internet examples using lablgtk2, but there was no example
>
> for using a glade file to generate a user interface.
>
> (Libglade is included in the liblgtk2 library, so the glade module is
>
> available.)
>
> Did anyone ever used it. Is there a code example or tutorial for using it
>
> available somewhere?
>
> Thank you





Reply With Quote
  #3  
Old 10-30-2007, 09:01 PM
Sandor Lengyel
Guest
 
Default Re: Desired ocaml example code using a glade file,



Just found lablgladecc2.

It will create an ml program but it have a line in it:



method reparent parent =

dialog_vbox1#misc#reparent parent;

toplevel#destroy ()



And top level is not defined, so it will not run.



Sandor Lengyel wrote:



>


>


> Checked on the internet examples using lablgtk2, but there was no example


>


> for using a glade file to generate a user interface.


>


> (Libglade is included in the liblgtk2 library, so the glade module is


>


> available.)


>


> Did anyone ever used it. Is there a code example or tutorial for using it


>


> available somewhere?


>


>


>


> Thank you







Reply With Quote
  #4  
Old 10-30-2007, 09:01 PM
Sandor Lengyel
Guest
 
Default Re: Desired ocaml example code using a glade file,



As I just wrote:

lablgladecc2 should be used to generate an ml file from the glade file.

The missing toplevel (Window) might have to do with the warning messages

when converting some glade files.

For example converting a filechooserdialog I get warning messages:

Warning: Widget filechooserdialog1::GtkFileChooserDialog is not supported

Warning: Widget filechooserdialog1::GtkFileChooserDialog is not supported

Warning: Widget gnomeapp1::GnomeApp is not supported

Warning: Widget gnomeapp1::GnomeApp is not supported

Warning: Widget gnomeapp1-dock1::BonoboDock is not supported

Warning: Widget bonobodockitem1::BonoboDockItem is not supported



and the toplevel window is missing from the code.



However a GtkDialog glade file does not have warning messages and converts

correctly.



>


>


> Checked on the internet examples using lablgtk2, but there was no example


>


> for using a glade file to generate a user interface.


>


> (Libglade is included in the liblgtk2 library, so the glade module is


>


> available.)


>


> Did anyone ever used it. Is there a code example or tutorial for using it


>


> available somewhere?


>


>


>


> Thank you







Reply With Quote
  #5  
Old 10-30-2007, 09:03 PM
Jon Harrop
Guest
 
Default Re: Desired ocaml example code using a glade file,

Sandor Lengyel wrote:
> Checked on the internet examples using lablgtk2, but there was no example
> for using a glade file to generate a user interface.
> (Libglade is included in the liblgtk2 library, so the glade module is
> available.)
> Did anyone ever used it. Is there a code example or tutorial for using it
> available somewhere?


I believe there is even an mlglade but you're probably best off asking on
the caml-list or the lablgtk mailing list.

--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/product.../chapter1.html



Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 02:55 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.