www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - German D tutorial: HTML5 Anwendung mit GTK3 schreiben

reply Andre Pany <andre s-e-a-p.de> writes:
Hi,

Dieses Tutorial zeigt, wie GTK3 zum Erstellen von HTML5 
Anwendungen verwendet werden kann.

http://d-land.sepany.de/tutorials/gui/html5-anwendungen-mit-gtk3-schreiben

Viele Grüße
Andre
Feb 13
next sibling parent Dominikus Dittes Scherkl <dominikus.scherkl continental-corporation.com> writes:
On Thursday, 13 February 2020 at 22:48:32 UTC, Andre Pany wrote:
 Hi,

 Dieses Tutorial zeigt, wie GTK3 zum Erstellen von HTML5 
 Anwendungen verwendet werden kann.

 http://d-land.sepany.de/tutorials/gui/html5-anwendungen-mit-gtk3-schreiben

 Viele Grüße
 Andre
Cool.
Feb 13
prev sibling next sibling parent reply Petar Kirov [ZombineDev] <petar.p.kirov gmail.com> writes:
On Thursday, 13 February 2020 at 22:48:32 UTC, Andre Pany wrote:
 Hi,

 Dieses Tutorial zeigt, wie GTK3 zum Erstellen von HTML5 
 Anwendungen verwendet werden kann.

 http://d-land.sepany.de/tutorials/gui/html5-anwendungen-mit-gtk3-schreiben

 Viele Grüße
 Andre
Hi Andre, I quickly skimmed through your article and I noticed that you're making a copy of the D-style `string[] args`, so you can guarantee that you have null terminated C-style `const char** argv`. You can avoid this by directly accessing the original args that were passed to the C main: void main() { import core.stdc.stdio : printf; import core.runtime : Runtime; const args = Runtime.cArgs; foreach (i; 0 .. args.argc) printf("%s\n", args.argv[i]); }
Feb 14
next sibling parent Petar Kirov [ZombineDev] <petar.p.kirov gmail.com> writes:
On Friday, 14 February 2020 at 08:44:11 UTC, Petar Kirov 
[ZombineDev] wrote:
 On Thursday, 13 February 2020 at 22:48:32 UTC, Andre Pany wrote:
 Hi,

 Dieses Tutorial zeigt, wie GTK3 zum Erstellen von HTML5 
 Anwendungen verwendet werden kann.

 http://d-land.sepany.de/tutorials/gui/html5-anwendungen-mit-gtk3-schreiben

 Viele Grüße
 Andre
Hi Andre, I quickly skimmed through your article and I noticed that you're making a copy of the D-style `string[] args`, so you can guarantee that you have null terminated C-style `const char** argv`. You can avoid this by directly accessing the original args that were passed to the C main: void main() { import core.stdc.stdio : printf; import core.runtime : Runtime; const args = Runtime.cArgs; foreach (i; 0 .. args.argc) printf("%s\n", args.argv[i]); }
P.S. pretty interesting combination of GtkD, Broadway and Docker :)
Feb 14
prev sibling parent Andre Pany <andre s-e-a-p.de> writes:
On Friday, 14 February 2020 at 08:44:11 UTC, Petar Kirov 
[ZombineDev] wrote:
 On Thursday, 13 February 2020 at 22:48:32 UTC, Andre Pany wrote:
 Hi,

 Dieses Tutorial zeigt, wie GTK3 zum Erstellen von HTML5 
 Anwendungen verwendet werden kann.

 http://d-land.sepany.de/tutorials/gui/html5-anwendungen-mit-gtk3-schreiben

 Viele Grüße
 Andre
Hi Andre, I quickly skimmed through your article and I noticed that you're making a copy of the D-style `string[] args`, so you can guarantee that you have null terminated C-style `const char** argv`. You can avoid this by directly accessing the original args that were passed to the C main: void main() { import core.stdc.stdio : printf; import core.runtime : Runtime; const args = Runtime.cArgs; foreach (i; 0 .. args.argc) printf("%s\n", args.argv[i]); }
Thanks a lot. I was searching for such thing while writing the article but was not able to find it in the api documents. I will change it. Kind regards Andre
Feb 14
prev sibling parent reply Adam D. Ruppe <destructionator gmail.com> writes:
is this part of what you're doing with cgi.d this week?!
Feb 14
parent Andre Pany <andre s-e-a-p.de> writes:
On Friday, 14 February 2020 at 12:53:29 UTC, Adam D. Ruppe wrote:
 is this part of what you're doing with cgi.d this week?!
In this tutorial there is no http server component in the D code but it is provided by Gtk3 itself (executable broadwayd). There is already another tutorial using cgi.d (native aws elastic beanstalk apps) and hopefully if I find time, I will write a separate Websocket tutorial using cgi.d and vibe.d as comparison. Kind regards Andre
Feb 14