Re: GtkD help

2017-11-19 Thread Ivan Trombley via Digitalmars-d-learn
On Sunday, 19 November 2017 at 13:59:10 UTC, Mike Wey wrote: On 18-11-17 22:57, Ivan Trombley wrote: [...] To change how a cell is rendered you will need to add a CellRenderer to the column, a CellRendererText would be used for rendering text and it has a foreground property to change the

Re: GtkD help

2017-11-19 Thread Ivan Trombley via Digitalmars-d-learn
On Sunday, 19 November 2017 at 09:54:06 UTC, Antonio Corbi wrote: On Saturday, 18 November 2017 at 22:31:15 UTC, Ivan Trombley wrote: Any information about using gio.Settings would be really appreciated too. Hi Ivan, I would recommend you to search for information about Gtk under valadoc

Re: Template Question

2017-11-19 Thread Jiyan via Digitalmars-d-learn
On Sunday, 19 November 2017 at 19:42:02 UTC, Jonathan M Davis wrote: On Sunday, November 19, 2017 19:25:40 Jiyan via Digitalmars-d-learn wrote: [...] Okay. For starters, [...] Ah ok thanks very much, this helped me a lot :)

Re: Template Question

2017-11-19 Thread Adam D. Ruppe via Digitalmars-d-learn
On Sunday, 19 November 2017 at 19:31:53 UTC, Jiyan wrote: Text X; You still need to instantiate it, even with default args. Text!() X; will work

Re: Template Question

2017-11-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, November 19, 2017 19:25:40 Jiyan via Digitalmars-d-learn wrote: > With working i mean that > Text X; > Doesnt compile! Okay. For starters, struct Text(T : char) { size_t _len; T* _ptr; } is a template specialization, which means that it's only going to compile if T is char or

Re: Template Question

2017-11-19 Thread Jiyan via Digitalmars-d-learn
On Sunday, 19 November 2017 at 19:28:37 UTC, Jonathan M Davis wrote: On Sunday, November 19, 2017 19:22:51 Jiyan via Digitalmars-d-learn wrote: Hello, i wanted to ask why this isnt working: struct Text(T : char) { size_t _len; T* _ptr; } Thanks :) What about it isn't working? I think

Re: Template Question

2017-11-19 Thread Jiyan via Digitalmars-d-learn
With working i mean that Text X; Doesnt compile!

Re: Inserting and removing elements from a sorted container

2017-11-19 Thread Dirk via Digitalmars-d-learn
Thank you very much for your thorough answer! /Dirk

Re: Template Question

2017-11-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, November 19, 2017 19:22:51 Jiyan via Digitalmars-d-learn wrote: > Hello, > > i wanted to ask why this isnt working: > > struct Text(T : char) > { > size_t _len; > T* _ptr; > } > > Thanks :) What about it isn't working? I think that you need to explain what you're trying to do and

Template Question

2017-11-19 Thread Jiyan via Digitalmars-d-learn
Hello, i wanted to ask why this isnt working: struct Text(T : char) { size_t _len; T* _ptr; } Thanks :)

Re: Inserting and removing elements from a sorted container

2017-11-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, November 19, 2017 16:48:00 Dirk via Digitalmars-d-learn wrote: > On Sunday, 19 November 2017 at 16:05:53 UTC, Jonathan M Davis > > wrote: > > I'd suggest that you use std.container.rbtree..RedBlackTree. A > > red-black tree exactly the sort of data structure that is > > typically used

Re: Inserting and removing elements from a sorted container

2017-11-19 Thread Dirk via Digitalmars-d-learn
On Sunday, 19 November 2017 at 16:05:53 UTC, Jonathan M Davis wrote: I'd suggest that you use std.container.rbtree..RedBlackTree. A red-black tree exactly the sort of data structure that is typically used in a sorted set. - Jonathan M Davis Thank you, i will look into it. I have a

Re: Inserting and removing elements from a sorted container

2017-11-19 Thread Jonathan M Davis via Digitalmars-d-learn
On Sunday, November 19, 2017 13:41:51 Dirk via Digitalmars-d-learn wrote: > Hi! > > I want to add an uint into a container, but avoid duplicate > uints, similar to a set<> from C++ STL. > > To find out if an uint is already present in the container, it > would make sense if the container is

Re: How to define variadic delegate with a ref/out argument?

2017-11-19 Thread pham via Digitalmars-d-learn
On Friday, 17 November 2017 at 06:21:50 UTC, Jerry A. wrote: On Friday, 17 November 2017 at 05:08:23 UTC, pham wrote: struct DelegateList(Args...) { public: alias DelegateHandler = void delegate(Args args) nothrow; DelegateHandler[] items; void opCall(Args args) nothrow {

Re: GtkD help

2017-11-19 Thread Mike Wey via Digitalmars-d-learn
On 18-11-17 22:57, Ivan Trombley wrote: I have this small application for viewing select log data from a certain game that I originally wrote in C++/Qt. For various reasons, I decided to rewrite this app in D using gtk-d. First, I have to say that the documentation for gtk-d is atrocious!

Inserting and removing elements from a sorted container

2017-11-19 Thread Dirk via Digitalmars-d-learn
Hi! I want to add an uint into a container, but avoid duplicate uints, similar to a set<> from C++ STL. To find out if an uint is already present in the container, it would make sense if the container is sorted. This is some pseudo-D-code that should make clear what i want to do: auto

Re: Json

2017-11-19 Thread bauss via Digitalmars-d-learn
On Sunday, 19 November 2017 at 10:50:58 UTC, Mafi wrote: On Saturday, 18 November 2017 at 14:25:58 UTC, kerdemdemir wrote: I am using vibe.d's json(http://vibed.org/api/vibe.data.json/) module without a problem and really happy with it. There are also some

Re: Json

2017-11-19 Thread Mafi via Digitalmars-d-learn
On Saturday, 18 November 2017 at 14:25:58 UTC, kerdemdemir wrote: I am using vibe.d's json(http://vibed.org/api/vibe.data.json/) module without a problem and really happy with it. There are also some examples(https://github.com/vibe-d/vibe.d/tree/master/examples/json). If you are using "dub"

Re: GtkD help

2017-11-19 Thread Antonio Corbi via Digitalmars-d-learn
On Saturday, 18 November 2017 at 22:31:15 UTC, Ivan Trombley wrote: Any information about using gio.Settings would be really appreciated too. Hi Ivan, I would recommend you to search for information about Gtk under valadoc pages [1]. You'll get Vala syntax but doing the mental-mapping to