I am trying to have a multi-dimensional array and opIndex has to
have both an arbitrary number of parameters and allow for slicing.
The problem is if I create opIndex for non-slicing, it looks like
ref auto opIndex(T...)(T index)
and this one catches all templates. But slices do not return the
Trying to do multi-dimension array but op-dollar doesn't seem to
support arbitrary dimensions
@property int opDollar(size_t dim : k)() { return dims[k]; }
static if ()
{
enum x;
}
static if (isDefined!x)
{
}
What's the correct way to check if a variable has been defined?
(note x may or may not be defined above. I need to know if it is)
On Friday, 22 September 2017 at 02:57:32 UTC, Joseph wrote:
On Saturday, 16 September 2017 at 14:33:53 UTC, Mike Wey wrote:
On 16-09-17 06:33, Joseph wrote:
I've used null in place of [te]. I'm not sure what target
entry is for and if that is the problem or what. I am trying
to drag files fr
On Saturday, 16 September 2017 at 14:33:53 UTC, Mike Wey wrote:
On 16-09-17 06:33, Joseph wrote:
I've used null in place of [te]. I'm not sure what target
entry is for and if that is the problem or what. I am trying
to drag files from windows explorer to a grid or label(I
duplicated the code
On Saturday, 16 September 2017 at 20:54:21 UTC, Mike Wey wrote:
On 16-09-17 20:58, Joseph wrote:
https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/TestWindow/TestWindow.d
has the code
foreach ( int i, string selection ; fs.getSelections())
{
writeln("File(s) selected [%d] %s"
https://github.com/gtkd-developers/GtkD/blob/master/demos/gtkD/TestWindow/TestWindow.d
has the code
foreach ( int i, string selection ; fs.getSelections())
{
writeln("File(s) selected [%d] %s",i,selection);
}
which is invalid for the demo, but
foreach ( int i, string selection ;
fd.getFile
On Saturday, 16 September 2017 at 17:08:52 UTC, Joseph wrote:
On Saturday, 16 September 2017 at 14:33:53 UTC, Mike Wey wrote:
On 16-09-17 06:33, Joseph wrote:
[...]
You will also need to set an TargetList to tell gtk that you
want to receive text:
```
TargetList lst = new TargetList([]);
l
On Saturday, 16 September 2017 at 14:33:53 UTC, Mike Wey wrote:
On 16-09-17 06:33, Joseph wrote:
I've used null in place of [te]. I'm not sure what target
entry is for and if that is the problem or what. I am trying
to drag files from windows explorer to a grid or label(I
duplicated the code
This is my code:
TargetEntry te = new TargetEntry("test",
GtkTargetFlags.OTHER_APP, 0);
w.dragDestSet(GtkDestDefaults.ALL, [te], GdkDragAction.COPY);
w.addOnDragDataReceived((dragContext, x, y, selectionData, info,
time, widget)
{
writeln("ok1");
});
w.addOnDragDrop((dragContext, x, y, t
Are there any simple direct serialization libraries where I can
mark elements of a class or struct that I want serialized with an
attribute and it will take care of all the rest(including
recursive structures, arrays, etc) then deserialize back in to
the structs?
I want something straight for
On Friday, 15 September 2017 at 02:02:54 UTC, Neia Neutuladh
wrote:
On Friday, 15 September 2017 at 01:42:02 UTC, Joseph wrote:
Is there a cross-platform way in D to check if a path is
writable?
Try to write to it and see if you get an error.
Um, so I have to do this for every platform? I th
Is there a cross-platform way in D to check if a path is writable?
On Tuesday, 12 September 2017 at 10:08:11 UTC, Moritz Maxeiner
wrote:
On Tuesday, 12 September 2017 at 09:11:20 UTC, Joseph wrote:
I have two nearly duplicate files I added a static this() to
initialize some static members of an interface.
On one file when I add an empty static this() it crash
I have two nearly duplicate files I added a static this() to
initialize some static members of an interface.
On one file when I add an empty static this() it crashes while
the other one does not.
The exception that happens is
Cyclic dependency between module A and B.
Why does this occur on a
I have a GTK paned element and when I click to drag the handler,
it does not respond immediately. I have to hold the left mouse
button down for about 1 second and not move it before it
"catches" and lets me drag, else I does not move.
I'm using Glade and the most simple example of a paned widg
16 matches
Mail list logo