Re: GTKD2 GValue Type

2014-11-19 Thread Sergey via Digitalmars-d
On Wednesday, 19 November 2014 at 07:34:45 UTC, Kagamin wrote: Try to see what members GValue has, then it should be obvious. How to do it? GValue ggg; writeln(ggg); answer: GValue(INVALID, Data, Data) ?

Re: GTKD2 GValue Type

2014-11-19 Thread Sergey via Digitalmars-d
On Wednesday, 19 November 2014 at 08:25:59 UTC, Kagamin wrote: If they are documented, see docs, otherwise see source. source: /** * A variant of gtk_list_store_set_valist() which * takes the columns and values as two arrays, instead of * varargs. This function is

Re: GTKD2 GValue Type

2014-11-19 Thread Kagamin via Digitalmars-d
Also examples and unittests can show, how to use it.

Re: GTKD2 GValue Type

2014-11-19 Thread Kagamin via Digitalmars-d
If they are documented, see docs, otherwise see source.

Re: GTKD2 GValue Type

2014-11-19 Thread Kagamin via Digitalmars-d
Why would you look for source of setValuesv when you don't know how to create GValue in the first place?

Re: GTKD2 GValue Type

2014-11-19 Thread via Digitalmars-d
On Wednesday, 19 November 2014 at 02:50:40 UTC, Sergey wrote: Hello everyone! I try to use gtkd + d in production, and of course I started with gtk.TreeView and gtk.ListStore objects. But I encounter a problem with GValyue type: GValue[] array_values =

Re: GTKD2 GValue Type

2014-11-19 Thread ketmar via Digitalmars-d
On Wed, 19 Nov 2014 12:33:17 + via Digitalmars-d digitalmars-d@puremagic.com wrote: D doesn't allow construction from a different type with the `Type name = value;` syntax. Try this: har-har... here comes the power of the dark side! struct S { bool filler; // just in case, to avoid

Re: GTKD2 GValue Type

2014-11-19 Thread via Digitalmars-d
On Wednesday, 19 November 2014 at 13:31:16 UTC, ketmar via Digitalmars-d wrote: On Wed, 19 Nov 2014 12:33:17 + via Digitalmars-d digitalmars-d@puremagic.com wrote: D doesn't allow construction from a different type with the `Type name = value;` syntax. Try this: har-har... here comes the

Re: GTKD2 GValue Type

2014-11-19 Thread ketmar via Digitalmars-d
On Wed, 19 Nov 2014 13:44:09 + via Digitalmars-d digitalmars-d@puremagic.com wrote: Ah, right, it _does_ work with explicitly defined constructors. Maybe GValue doesn't have those? that may be true. i'm too lazy to look at the sources, and it seems to me that it's very easy to miss the

Re: GTKD2 GValue Type

2014-11-19 Thread Mike Wey via Digitalmars-d
On 11/19/2014 03:50 AM, Sergey wrote: Hello everyone! I try to use gtkd + d in production, and of course I started with gtk.TreeView and gtk.ListStore objects. But I encounter a problem with GValyue type: GValue[] array_values = cast(GValue[])[str1,str2,str3,str4]; file_1.d(92): Error:

Re: GTKD2 GValue Type

2014-11-19 Thread Sergey via Digitalmars-d
Ok, thanks. I'll just use this command: ListStore1.setValue(itr, 0, some str); ...

Re: GTKD2 GValue Type

2014-11-19 Thread Sergey via Digitalmars-d
auto ggg = GValue(123); file_12.d(27): Error: cannot implicitly convert expression (123) of type string to GType GValue ggg = {ki,}; file_12.d(22): Error: cannot implicitly convert expression (ki) of type string to GType

Re: GTKD2 GValue Type

2014-11-18 Thread Kagamin via Digitalmars-d
Try to see what members GValue has, then it should be obvious.