digitalmars.D.learn - [GtkD] How to use Glade?
- Alexandr Druzhinin (7/7) May 02 2013 How to use GtkD with Glade? Is some tutorial available?
- Mike Wey (5/12) May 02 2013 There is an small example distributed with GtkD:
- Carlos (10/24) May 02 2013 I get thhis error when trying to compile it :
- Mike Wey (5/27) May 02 2013 Try:
- Carlos (47/63) May 02 2013 Now I get this error on tha command line :
- Carlos (6/8) May 02 2013 It compiles but doesn't run well. I'm checking this comment on
- Mike Wey (10/19) May 02 2013 Normally the example looks for builderTest.glade in the directory where
- Carlos (3/25) May 02 2013 I can't believe an hour has passed so easy.
- Alexandr Druzhinin (7/20) May 02 2013 if you mean glade file with different name then answer is yes. but if
- Carlos (2/28) May 02 2013 Right now I want to use the glade file form the site.
- Alexandr Druzhinin (6/16) May 02 2013 I was totally wrong - didn't look at code before :(
- Carlos (1/6) May 02 2013 Ok I'll try that.
- Carlos (14/35) May 02 2013 Sorry if this was too wild but this is what I can do at the
- Alexandr Druzhinin (5/18) May 02 2013 first build application:
- Carlos (5/35) May 02 2013 I got it working now. I'm using the sample code and I made
- Carlos (2/38) May 02 2013 SO now next step is to learn the signals part, Right ?
- Alexandr Druzhinin (2/7) May 02 2013 right. and it's very very simpler than in plain C
- Carlos (2/24) May 02 2013 Thanks Mike Wey this was crucial on this workaround.
- Alexandr Druzhinin (2/4) May 02 2013 Oops, didn't see.
- Alexandr Druzhinin (7/17) May 02 2013 won't it be better to have the simple template to hide cast() using
How to use GtkD with Glade? Is some tutorial available? I spent some time trying to use Glade to build non-trivial application, but I do it very inproductive, so I'd like to get some help or I'm afraid it will be lasting for years... For example, if somebody would upload some example of Gtk application, that built with glade and has several typical widgets and signal handlers - it may help very much.
May 02 2013
On 05/02/2013 03:58 PM, Alexandr Druzhinin wrote:How to use GtkD with Glade? Is some tutorial available? I spent some time trying to use Glade to build non-trivial application, but I do it very inproductive, so I'd like to get some help or I'm afraid it will be lasting for years... For example, if somebody would upload some example of Gtk application, that built with glade and has several typical widgets and signal handlers - it may help very much.There is an small example distributed with GtkD: https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.d -- Mike Wey
May 02 2013
On Thursday, 2 May 2013 at 17:43:28 UTC, Mike Wey wrote:On 05/02/2013 03:58 PM, Alexandr Druzhinin wrote:I get thhis error when trying to compile it : testgithub.d(3): Error: module Builder is in file 'gtk/Builder.d' which cannot be read import path[0] = /usr/include/dmd/phobos import path[1] = /usr/include/dmd/druntime/import import path[2] = /usr/local/includes/d -------------------------------------------------------------------------------- I installed from here : link : http://www.dsource.org/projects/gtkd/wiki/DebianPackagesHow to use GtkD with Glade? Is some tutorial available? I spent some time trying to use Glade to build non-trivial application, but I do it very inproductive, so I'd like to get some help or I'm afraid it will be lasting for years... For example, if somebody would upload some example of Gtk application, that built with glade and has several typical widgets and signal handlers - it may help very much.There is an small example distributed with GtkD: https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.d
May 02 2013
On 05/02/2013 08:21 PM, Carlos wrote:On Thursday, 2 May 2013 at 17:43:28 UTC, Mike Wey wrote:Try: dmd testgithub.d $(pkg-config --cflags --libs gtkd-2) -- Mike WeyOn 05/02/2013 03:58 PM, Alexandr Druzhinin wrote:I get thhis error when trying to compile it : testgithub.d(3): Error: module Builder is in file 'gtk/Builder.d' which cannot be read import path[0] = /usr/include/dmd/phobos import path[1] = /usr/include/dmd/druntime/import import path[2] = /usr/local/includes/d -------------------------------------------------------------------------------- I installed from here : link : http://www.dsource.org/projects/gtkd/wiki/DebianPackagesHow to use GtkD with Glade? Is some tutorial available? I spent some time trying to use Glade to build non-trivial application, but I do it very inproductive, so I'd like to get some help or I'm afraid it will be lasting for years... For example, if somebody would upload some example of Gtk application, that built with glade and has several typical widgets and signal handlers - it may help very much.There is an small example distributed with GtkD: https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.d
May 02 2013
Now I get this error on tha command line : No glade file specified, using default "builderTest.glade" glib.GException.GException src/glib/GException.d(75): Failed to open file 'builderTest.glade': No such file or directory ---------------- ./testgithub(_Dmain+0x10f) [0x67a7ff] ./testgithub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runMain()+0x18) [0x843bb4] ./testgithub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x8436f2] ./testgithub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAll()+0x3b) [0x843bfb] ./testgithub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x8436f2] ./testgithub(_d_run_main+0x1a8) [0x8436ac] ./testgithub(main+0x17) [0x8434ff] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f3b7001dea5] ---------------- Downloaded from here : link : https://github.com/SawfishWM/rep-gtk/blob/master/examples/gtk-builder-test.glade And still get errors. No glade file specified, using default "builderTest.glade" glib.GException.GException src/glib/GException.d(75): Failed to open file 'builderTest.glade': No such file or directory ---------------- ./testgithub(_Dmain+0x10f) [0x67a7ff] ./testgithub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runMain()+0x18) [0x843bb4] ./testgithub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x8436f2] ./testgithub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void runAll()+0x3b) [0x843bfb] ./testgithub(extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate())+0x2a) [0x8436f2] ./testgithub(_d_run_main+0x1a8) [0x8436ac] ./testgithub(main+0x17) [0x8434ff] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7f98ed0ceea5] ----------------I get thhis error when trying to compile it : testgithub.d(3): Error: module Builder is in file 'gtk/Builder.d' which cannot be read import path[0] = /usr/include/dmd/phobos import path[1] = /usr/include/dmd/druntime/import import path[2] = /usr/local/includes/d -------------------------------------------------------------------------------- I installed from here : link : http://www.dsource.org/projects/gtkd/wiki/DebianPackagesTry: dmd testgithub.d $(pkg-config --cflags --libs gtkd-2)
May 02 2013
Try: dmd testgithub.d $(pkg-config --cflags --libs gtkd-2)It compiles but doesn't run well. I'm checking this comment on the code. /** * Usage ./gladeText /path/to/your/glade/file.glade * */
May 02 2013
On 05/02/2013 11:25 PM, Carlos wrote:Normally the example looks for builderTest.glade in the directory where the binary is. There one in the GtkD git https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.glade You can also specify a different glade file on the commandline, the example code tries to access a wiget named window1 if it's not pressent in the glade file it will print "No window?" and exit. -- Mike WeyTry: dmd testgithub.d $(pkg-config --cflags --libs gtkd-2)It compiles but doesn't run well. I'm checking this comment on the code. /** * Usage ./gladeText /path/to/your/glade/file.glade * */
May 02 2013
On Thursday, 2 May 2013 at 22:07:46 UTC, Mike Wey wrote:On 05/02/2013 11:25 PM, Carlos wrote:I can't believe an hour has passed so easy. How do I specify the doferent glade ?, During compilation ?Normally the example looks for builderTest.glade in the directory where the binary is. There one in the GtkD git https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.glade You can also specify a different glade file on the commandline, the example code tries to access a wiget named window1 if it's not pressent in the glade file it will print "No window?" and exit.Try: dmd testgithub.d $(pkg-config --cflags --libs gtkd-2)It compiles but doesn't run well. I'm checking this comment on the code. /** * Usage ./gladeText /path/to/your/glade/file.glade * */
May 02 2013
03.05.2013 6:12, Carlos пишет:if you mean glade file with different name then answer is yes. but if you just want to use another glade file with the same name then answer is no. this different glade file should has window widget with name window1 but with the rest no other restrictions exist. with glade you can create more complex application easer and after debugging build glade file into your application.Normally the example looks for builderTest.glade in the directory where the binary is. There one in the GtkD git https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.glade You can also specify a different glade file on the commandline, the example code tries to access a wiget named window1 if it's not pressent in the glade file it will print "No window?" and exit.I can't believe an hour has passed so easy. How do I specify the doferent glade ?, During compilation ?
May 02 2013
On Friday, 3 May 2013 at 00:24:50 UTC, Alexandr Druzhinin wrote:03.05.2013 6:12, Carlos пишет:Right now I want to use the glade file form the site.if you mean glade file with different name then answer is yes. but if you just want to use another glade file with the same name then answer is no. this different glade file should has window widget with name window1 but with the rest no other restrictions exist. with glade you can create more complex application easer and after debugging build glade file into your application.Normally the example looks for builderTest.glade in the directory where the binary is. There one in the GtkD git https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.glade You can also specify a different glade file on the commandline, the example code tries to access a wiget named window1 if it's not pressent in the glade file it will print "No window?" and exit.I can't believe an hour has passed so easy. How do I specify the doferent glade ?, During compilation ?
May 02 2013
03.05.2013 7:24, Alexandr Druzhinin пишет:I was totally wrong - didn't look at code before :( The right answer to your question is you can specify your own glade file into command line as second argument like this: builder /path/to/your/glade/file/your.glade it will be enoughI can't believe an hour has passed so easy. How do I specify the doferent glade ?, During compilation ?if you mean glade file with different name then answer is yes. but if you just want to use another glade file with the same name then answer is no. this different glade file should has window widget with name window1 but with the rest no other restrictions exist. with glade you can create more complex application easer and after debugging build glade file into your application.
May 02 2013
I was totally wrong - didn't look at code before :( The right answer to your question is you can specify your own glade file into command line as second argument like this: builder /path/to/your/glade/file/your.glade it will be enoughOk I'll try that.
May 02 2013
On Friday, 3 May 2013 at 00:30:00 UTC, Alexandr Druzhinin wrote:03.05.2013 7:24, Alexandr Druzhinin пишет:Sorry if this was too wild but this is what I can do at the moment since I don't see a "gladeText" program which I believe is required for this action I did my guess. code: dmd builderTest.d $(pkg-config --cflags --libs gtkd-2) builder ~/Documents/Glade/builderTest.glade gives error : Error: unrecognized file extension glade ----------------------------------------------------------------- gtkD samples give error but I'm not using the same software from developers I'll try to install by purge all gtkD programs installed by no and trying "make install" again. Then check if the samples compile right.I was totally wrong - didn't look at code before :( The right answer to your question is you can specify your own glade file into command line as second argument like this: builder /path/to/your/glade/file/your.glade it will be enoughI can't believe an hour has passed so easy. How do I specify the doferent glade ?, During compilation ?if you mean glade file with different name then answer is yes. but if you just want to use another glade file with the same name then answer is no. this different glade file should has window widget with name window1 but with the rest no other restrictions exist. with glade you can create more complex application easer and after debugging build glade file into your application.
May 02 2013
03.05.2013 7:55, Carlos пишет:Sorry if this was too wild but this is what I can do at the moment since I don't see a "gladeText" program which I believe is required for this action I did my guess. code: dmd builderTest.d $(pkg-config --cflags --libs gtkd-2) builder ~/Documents/Glade/builderTest.glade gives error : Error: unrecognized file extension glade ----------------------------------------------------------------- gtkD samples give error but I'm not using the same software from developers I'll try to install by purge all gtkD programs installed by no and trying "make install" again. Then check if the samples compile right.first build application: dmd builderTest.d $(pkg-config --cflags --libs gtkd-2) then run it: builder ~/Documents/Glade/builderTest.glade
May 02 2013
On Friday, 3 May 2013 at 00:58:36 UTC, Alexandr Druzhinin wrote:03.05.2013 7:55, Carlos пишет:I got it working now. I'm using the sample code and I made another layout with Glade for GTK+3 and saved it with the same name, so when I compile the file is called and I get the UI I wanted.Sorry if this was too wild but this is what I can do at the moment since I don't see a "gladeText" program which I believe is required for this action I did my guess. code: dmd builderTest.d $(pkg-config --cflags --libs gtkd-2) builder ~/Documents/Glade/builderTest.glade gives error : Error: unrecognized file extension glade ----------------------------------------------------------------- gtkD samples give error but I'm not using the same software from developers I'll try to install by purge all gtkD programs installed by no and trying "make install" again. Then check if the samples compile right.first build application: dmd builderTest.d $(pkg-config --cflags --libs gtkd-2) then run it: builder ~/Documents/Glade/builderTest.glade
May 02 2013
On Friday, 3 May 2013 at 01:27:54 UTC, Carlos wrote:On Friday, 3 May 2013 at 00:58:36 UTC, Alexandr Druzhinin wrote:SO now next step is to learn the signals part, Right ?03.05.2013 7:55, Carlos пишет:I got it working now. I'm using the sample code and I made another layout with Glade for GTK+3 and saved it with the same name, so when I compile the file is called and I get the UI I wanted.Sorry if this was too wild but this is what I can do at the moment since I don't see a "gladeText" program which I believe is required for this action I did my guess. code: dmd builderTest.d $(pkg-config --cflags --libs gtkd-2) builder ~/Documents/Glade/builderTest.glade gives error : Error: unrecognized file extension glade ----------------------------------------------------------------- gtkD samples give error but I'm not using the same software from developers I'll try to install by purge all gtkD programs installed by no and trying "make install" again. Then check if the samples compile right.first build application: dmd builderTest.d $(pkg-config --cflags --libs gtkd-2) then run it: builder ~/Documents/Glade/builderTest.glade
May 02 2013
03.05.2013 8:29, Carlos пишет:right. and it's very very simpler than in plain CI got it working now. I'm using the sample code and I made another layout with Glade for GTK+3 and saved it with the same name, so when I compile the file is called and I get the UI I wanted.SO now next step is to learn the signals part, Right ?
May 02 2013
On Thursday, 2 May 2013 at 22:07:46 UTC, Mike Wey wrote:On 05/02/2013 11:25 PM, Carlos wrote:Thanks Mike Wey this was crucial on this workaround.Normally the example looks for builderTest.glade in the directory where the binary is. There one in the GtkD git https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.glade You can also specify a different glade file on the commandline, the example code tries to access a wiget named window1 if it's not pressent in the glade file it will print "No window?" and exit.Try: dmd testgithub.d $(pkg-config --cflags --libs gtkd-2)It compiles but doesn't run well. I'm checking this comment on the code. /** * Usage ./gladeText /path/to/your/glade/file.glade * */
May 02 2013
03.05.2013 0:43, Mike Wey пишет:There is an small example distributed with GtkD: https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.dOops, didn't see.
May 02 2013
03.05.2013 0:43, Mike Wey пишет:On 05/02/2013 03:58 PM, Alexandr Druzhinin wrote:won't it be better to have the simple template to hide cast() using Builder.getObject(): auto getObjectAs(T)(Builder b, string object_name) { return cast(T) b.getObject(object_name); } ?How to use GtkD with Glade? Is some tutorial available? I spent some time trying to use Glade to build non-trivial application, but I do it very inproductive, so I'd like to get some help or I'm afraid it will be lasting for years... For example, if somebody would upload some example of Gtk application, that built with glade and has several typical widgets and signal handlers - it may help very much.There is an small example distributed with GtkD: https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.d
May 02 2013
On Friday, 3 May 2013 at 01:00:48 UTC, Alexandr Druzhinin wrote:03.05.2013 0:43, Mike Wey пишет:Thank you very much for your help! It's being the whole day working on this.On 05/02/2013 03:58 PM, Alexandr Druzhinin wrote:won't it be better to have the simple template to hide cast() using Builder.getObject(): auto getObjectAs(T)(Builder b, string object_name) { return cast(T) b.getObject(object_name); } ?How to use GtkD with Glade? Is some tutorial available? I spent some time trying to use Glade to build non-trivial application, but I do it very inproductive, so I'd like to get some help or I'm afraid it will be lasting for years... For example, if somebody would upload some example of Gtk application, that built with glade and has several typical widgets and signal handlers - it may help very much.There is an small example distributed with GtkD: https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.d
May 02 2013
On 05/03/2013 03:00 AM, Alexandr Druzhinin wrote:03.05.2013 0:43, Mike Wey пишет:Thats a good idea. -- Mike WeyOn 05/02/2013 03:58 PM, Alexandr Druzhinin wrote:won't it be better to have the simple template to hide cast() using Builder.getObject(): auto getObjectAs(T)(Builder b, string object_name) { return cast(T) b.getObject(object_name); } ?How to use GtkD with Glade? Is some tutorial available? I spent some time trying to use Glade to build non-trivial application, but I do it very inproductive, so I'd like to get some help or I'm afraid it will be lasting for years... For example, if somebody would upload some example of Gtk application, that built with glade and has several typical widgets and signal handlers - it may help very much.There is an small example distributed with GtkD: https://github.com/gtkd-developers/GtkD/blob/master/demos/builder/builderTest.d
May 03 2013