Thread overview | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
May 02, 2013 [GtkD] How to use Glade? | ||||
---|---|---|---|---|
| ||||
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 Re: [GtkD] How to use Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Alexandr Druzhinin | 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 Re: [GtkD] How to use Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wey | On Thursday, 2 May 2013 at 17:43:28 UTC, Mike Wey wrote: > 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 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/DebianPackages |
May 02, 2013 Re: [GtkD] How to use Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | On 05/02/2013 08:21 PM, Carlos wrote: > On Thursday, 2 May 2013 at 17:43:28 UTC, Mike Wey wrote: >> 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 >> > > 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/DebianPackages Try: dmd testgithub.d $(pkg-config --cflags --libs gtkd-2) -- Mike Wey |
May 02, 2013 Re: [GtkD] How to use Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wey | > >> 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/DebianPackages > > Try: > > dmd testgithub.d $(pkg-config --cflags --libs gtkd-2) 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] ---------------- |
May 02, 2013 Re: [GtkD] How to use Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wey |
>
> 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 Re: [GtkD] How to use Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | On 05/02/2013 11:25 PM, Carlos wrote: > >> >> 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 > * > */ 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 Wey |
May 02, 2013 Re: [GtkD] How to use Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wey | On Thursday, 2 May 2013 at 22:07:46 UTC, Mike Wey wrote:
> On 05/02/2013 11:25 PM, Carlos wrote:
>>
>>>
>>> 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
>> *
>> */
>
> 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 03, 2013 Re: [GtkD] How to use Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | 03.05.2013 6:12, Carlos пишет:
>>
>> 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 ?
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 03, 2013 Re: [GtkD] How to use Glade? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Mike Wey | 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.d
>
>
Oops, didn't see.
|
Copyright © 1999-2021 by the D Language Foundation