Re: GTKD - Application crashes - or not? [Coedit]

2016-06-17 Thread TheDGuy via Digitalmars-d-learn
On Friday, 17 June 2016 at 06:18:59 UTC, Basile B. wrote: On Thursday, 16 June 2016 at 09:18:54 UTC, TheDGuy wrote: On Thursday, 16 June 2016 at 08:20:00 UTC, Basile B. wrote: Yes it's "WorkingDirectory" (and not current...). But otherwise you can use args[0]. Actually using the cwd in a

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-17 Thread Basile B. via Digitalmars-d-learn
On Thursday, 16 June 2016 at 09:18:54 UTC, TheDGuy wrote: On Thursday, 16 June 2016 at 08:20:00 UTC, Basile B. wrote: Yes it's "WorkingDirectory" (and not current...). But otherwise you can use args[0]. Actually using the cwd in a program is often an error because there is no guarantee that

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-16 Thread TheDGuy via Digitalmars-d-learn
On Thursday, 16 June 2016 at 17:44:08 UTC, Basile B. wrote: Please Stop your comedy. Thanks a lot for your help! This is my solution: import gtk.Main; import gtk.MainWindow; import gtk.CssProvider; import gtk.Button; import gdk.Display; import gdk.Screen; import gtk.StyleContext; import

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-16 Thread Basile B. via Digitalmars-d-learn
On Thursday, 16 June 2016 at 15:57:36 UTC, TheDGuy wrote: On Thursday, 16 June 2016 at 10:14:47 UTC, Basile B. wrote: from args[0] you can get the base bath and since your css is relative to the base path: string cssPath = "test.css"; CssProvider provider = new CssProvider();

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-16 Thread TheDGuy via Digitalmars-d-learn
On Thursday, 16 June 2016 at 10:14:47 UTC, Basile B. wrote: from args[0] you can get the base bath and since your css is relative to the base path: string cssPath = "test.css"; CssProvider provider = new CssProvider(); provider.loadFromPath(cssPath); add something like

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-16 Thread Basile B. via Digitalmars-d-learn
On Thursday, 16 June 2016 at 10:02:01 UTC, TheDGuy wrote: On Thursday, 16 June 2016 at 09:27:38 UTC, Basile B. wrote: FOrget any previous comment and in your program use the first argument of the command line to detect your resources, this will solve your problem. For the execution click

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-16 Thread TheDGuy via Digitalmars-d-learn
On Thursday, 16 June 2016 at 09:27:38 UTC, Basile B. wrote: FOrget any previous comment and in your program use the first argument of the command line to detect your resources, this will solve your problem. For the execution click compile and run or just run. Okay: void main(string[] args){

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-16 Thread Basile B. via Digitalmars-d-learn
On Thursday, 16 June 2016 at 09:18:54 UTC, TheDGuy wrote: On Thursday, 16 June 2016 at 08:20:00 UTC, Basile B. wrote: Yes it's "WorkingDirectory" (and not current...). But otherwise you can use args[0]. Actually using the cwd in a program is often an error because there is no guarantee that

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-16 Thread TheDGuy via Digitalmars-d-learn
On Thursday, 16 June 2016 at 08:20:00 UTC, Basile B. wrote: Yes it's "WorkingDirectory" (and not current...). But otherwise you can use args[0]. Actually using the cwd in a program is often an error because there is no guarantee that the cwd is the path to the application ;) People often

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-16 Thread Basile B. via Digitalmars-d-learn
On Thursday, 16 June 2016 at 07:51:14 UTC, TheDGuy wrote: On Thursday, 16 June 2016 at 07:50:13 UTC, TheDGuy wrote: I get 'Failed to execute: 267'. Probably because a symbolic string is used in the run options? https://picload.org/upload,8e3f683557a8cd3401f002304f387932.html That is the

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-16 Thread TheDGuy via Digitalmars-d-learn
On Thursday, 16 June 2016 at 00:46:44 UTC, Basile B. wrote: On Wednesday, 15 June 2016 at 23:41:51 UTC, Basile B. wrote: - You can create a launcher in the custom tools, excluding the double quote: - as executable type "" - as CurrentDirectory type "" - as alias put something

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-16 Thread TheDGuy via Digitalmars-d-learn
On Thursday, 16 June 2016 at 07:50:13 UTC, TheDGuy wrote: I get 'Failed to execute: 267'. Probably because a symbolic string is used in the run options? https://picload.org/upload,8e3f683557a8cd3401f002304f387932.html That is the correct image link:

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-15 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 15 June 2016 at 23:41:51 UTC, Basile B. wrote: On Wednesday, 15 June 2016 at 17:35:32 UTC, TheDGuy wrote: I'm gonna check on Windows today but in the meantime you can try I've checked on windows and here is what I can say about the problem. - Symbolic strings won't work on

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-15 Thread Basile B. via Digitalmars-d-learn
On Wednesday, 15 June 2016 at 17:35:32 UTC, TheDGuy wrote: On Wednesday, 15 June 2016 at 13:15:56 UTC, Rene Zwanenburg wrote: I'm not familiar with Coedit, but the run options seem to contain a field for setting it: https://github.com/BBasile/Coedit/wiki#run-options You may be able to use the

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-15 Thread TheDGuy via Digitalmars-d-learn
On Wednesday, 15 June 2016 at 13:15:56 UTC, Rene Zwanenburg wrote: I'm not familiar with Coedit, but the run options seem to contain a field for setting it: https://github.com/BBasile/Coedit/wiki#run-options You may be able to use the symbolic strings there:

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-15 Thread Rene Zwanenburg via Digitalmars-d-learn
On Wednesday, 15 June 2016 at 10:31:18 UTC, TheDGuy wrote: Thanks a lot for your answer, getcwd() returns the path where coedit is located on my harddrive: C:\Program Files (x86)\Coedit_32\coedit.2update6.win32 How can i change that? I'm not familiar with Coedit, but the run options seem to

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-15 Thread TheDGuy via Digitalmars-d-learn
On Wednesday, 15 June 2016 at 10:21:20 UTC, Rene Zwanenburg wrote: On Wednesday, 15 June 2016 at 09:48:19 UTC, TheDGuy wrote: But if i execute the app my hand (in the windows command window or my double click) it works as expected (so no error)? Why is that? My first guess would be that

Re: GTKD - Application crashes - or not? [Coedit]

2016-06-15 Thread Rene Zwanenburg via Digitalmars-d-learn
On Wednesday, 15 June 2016 at 09:48:19 UTC, TheDGuy wrote: But if i execute the app my hand (in the windows command window or my double click) it works as expected (so no error)? Why is that? My first guess would be that Coedit does not use the directory where the executable is located as

GTKD - Application crashes - or not? [Coedit]

2016-06-15 Thread TheDGuy via Digitalmars-d-learn
Hi, this is my app: import gtk.Main; import gtk.MainWindow; import gtk.CssProvider; import gdk.Display; import gdk.Screen; import gtk.StyleContext; import glib.GException; class Window : MainWindow{ this(int width, int height, string title){ super(title);