On Tue, 29 Dec 2009 17:44:18 -0500, teo
wrote:
There was a way to define new types within templates and I think that I
have seen that demonstrated here in the newsgroups, but cannot find it
now. Can someone help me please?
I would like to do something like this:
template MyTemplate(T)
{
s
I think it would be best for D to do the same.
Just my 2ยข,
Phil Deets
On Thu, 24 Dec 2009 13:10:14 -0500, Phil Deets wrote:
On Thu, 24 Dec 2009 12:49:42 -0500, Richard Webb
wrote:
Sounds like you might be running into this:
http://d.puremagic.com/issues/show_bug.cgi?id=3342
Thanks for the link. That is probably my problem since I'm running
Windo
On Thu, 24 Dec 2009 10:49:01 -0500, Phil Deets wrote:
I'll work on reproducing it in a smaller scale
Reduced test case:
test.c (compiled with Visual C++ 2008 Express Edition)
// Adapted from sample code at
http://msdn.microsoft.com/en-us/library/ms680582(VS.85).aspx
#include
#in
On Thu, 24 Dec 2009 12:49:42 -0500, Richard Webb
wrote:
Sounds like you might be running into this:
http://d.puremagic.com/issues/show_bug.cgi?id=3342
Thanks for the link. That is probably my problem since I'm running Windows
XP.
Phil
I'm writing a DLL in D which will be loaded (not automatically, but by
LoadLibrary) by a C application (the Lua interpreter). I'm having problems
with globals and static data. Everything is fine if I only access stuff on
the stack, but as soon as I access a global or a static class variable,
On Thu, 17 Dec 2009 08:32:41 -0500, Phil Deets wrote:
On Tue, 15 Dec 2009 00:56:12 -0500, Phil Deets
wrote:
(D 2.033) I'm porting a DLL to D. The DLL depends on a static library,
but when I put the library name on the command-line, dmd does not
output any DLL file. If I remov
On Tue, 15 Dec 2009 00:56:12 -0500, Phil Deets wrote:
(D 2.033) I'm porting a DLL to D. The DLL depends on a static library,
but when I put the library name on the command-line, dmd does not output
any DLL file. If I remove the library name from the command-line, dmd
gives linker e
On Tue, 15 Dec 2009 07:06:49 -0500, Trass3r wrote:
Phil Deets schrieb:
Actually, it depends on another DLL. The static library I need to link
to is an import library for that DLL. I'll work on loading that DLL
without the .lib file using the Windows API while I wait for an answer
On Tue, 15 Dec 2009 00:56:12 -0500, Phil Deets wrote:
(D 2.033) I'm porting a DLL to D. The DLL depends on a static library,
but when I put the library name on the command-line, dmd does not output
any DLL file. If I remove the library name from the command-line, dmd
gives linker e
(D 2.033) I'm porting a DLL to D. The DLL depends on a static library, but
when I put the library name on the command-line, dmd does not output any
DLL file. If I remove the library name from the command-line, dmd gives
linker errors and outputs an invalid DLL. How do I make a DLL with a
st
On Sun, 13 Dec 2009 04:08:19 -0500, Phil Deets wrote:
I found another workaround which doesn't require a bunch of extra
overloads. I'll probably update it to use that template someone wrote in
that thread about static duck-typing.
I looked up this post. It was: "Re: stati
On Sun, 13 Dec 2009 04:16:19 -0500, Frank Benoit
wrote:
casting an array of class references to an array of interface references
(or vice versa) will not work at runtime. Your program will crash.
This is because if the invisible pointer correction that is done if you
cast a single class ref
On Sun, 13 Dec 2009 03:22:31 -0500, Phil Deets wrote:
(D 2.033) I have a need to do something like this code:
interface I {}
class C : I {}
class D : I {}
void f(I[]) {}
void f(bool) {}
void g(T)(T param) {
f(param);
}
int main()
{
bool b;
C[] c;
D[] d
f(param);
}
int main()
{
bool b;
C[] c;
D[] d;
g(b);
g(c);
g(d);
return 0;
}
Is there a better way to deal with this? Is this behavior a design bug?
Phil Deets
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
On Fri, 11 Dec 2009 08:32:21 -0500, Michal Minich
wrote:
Hello Phil,
How can I get the unadorned text of an exception?
e.msg
Thanks, is this documented somewhere?
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
How can I get the unadorned text of an exception? When I run:
import std.stdio;
int main()
{
try {
throw new Exception("text");
}
catch (Exception e) {
writeln(e.toString());
}
return 0;
}
I get the output:
object.Exceptio
On Thu, 19 Nov 2009 09:16:16 -0500, A Bothe
wrote:
Hey guys,
I've found a problem that occurred since DMD 2.034:
When I've created a dynamic array like
string[] a;
and I want to assign something via the index of this array
a[0]="Test";
DMD says the array isn't mutable...even if these are n
On Thu, 12 Nov 2009 07:17:57 -0500, Chris Nicholson-Sauls
wrote:
Phil Deets wrote:
On Wed, 11 Nov 2009 13:45:17 -0500, grauzone wrote:
You can delete your posts to emulate editing...
I didn't know it was possible to delete posts from a newsgroup. How do
you do that?
I don
On Wed, 11 Nov 2009 13:45:17 -0500, grauzone wrote:
You can delete your posts to emulate editing...
I didn't know it was possible to delete posts from a newsgroup. How do you
do that?
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
On Wed, 11 Nov 2009 13:30:17 -0500, Phil Deets wrote:
On Wed, 11 Nov 2009 08:50:48 -0500, bearophile
wrote:
In a C program I have a numeric constant SIZE (that is in [1,32]), that
I can define when I compile the code, like this:
gcc -DSIZE=14 ...
How can I do the same thing in D? The
On Wed, 11 Nov 2009 13:34:32 -0500, Phil Deets wrote:
On Wed, 11 Nov 2009 13:30:17 -0500, Phil Deets
wrote:
On Wed, 11 Nov 2009 08:50:48 -0500, bearophile
wrote:
In a C program I have a numeric constant SIZE (that is in [1,32]),
that I can define when I compile the code, like this
On Wed, 11 Nov 2009 08:50:48 -0500, bearophile
wrote:
In a C program I have a numeric constant SIZE (that is in [1,32]), that
I can define when I compile the code, like this:
gcc -DSIZE=14 ...
How can I do the same thing in D? The solution I have found is to put in
the D code:
version(B
On Fri, 30 Oct 2009 06:38:44 -0500, Ary Borenszweig
wrote:
Phil Deets wrote:
On Thu, 29 Oct 2009 18:28:12 -0500, Ary Borenszweig
wrote:
Ellery Newcomer wrote:
Unfortunately, that's going to be about the best you can do, unless
you're willing to play with string mixins and
On Fri, 30 Oct 2009 00:03:23 -0500, Daniel Keep
wrote:
Phil Deets wrote:
Hi, is there a way to add members to an enum based on conditional
compilation symbols. I tried
enum Tag {
A, B,
version (symbol) {
C, D,
}
E,
}
but it doesn't work. I know I could do
ve
On Thu, 29 Oct 2009 18:28:12 -0500, Ary Borenszweig
wrote:
Ellery Newcomer wrote:
Phil Deets wrote:
Hi, is there a way to add members to an enum based on conditional
compilation symbols. I tried
enum Tag {
A, B,
version (symbol) {
C, D,
}
E,
}
but it doesn't wo
Hi, is there a way to add members to an enum based on conditional
compilation symbols. I tried
enum Tag {
A, B,
version (symbol) {
C, D,
}
E,
}
but it doesn't work. I know I could do
version (symbol) {
enum Tag { A, B, C, D, E }
} else {
enum Tag { A, B, E }
}
but I d
On Thu, 22 Oct 2009 11:50:51 -0500, Luis P. Mendes
wrote:
5) Besides Alexei forthcoming book, is there documentation for the whole
language and not only to part of it as in http://compsci.ca/v3/
viewtopic.php?t=9518 and http://en.wikibooks.org/wiki/A_Beginner%
27s_Guide_to_D ?
I remember wh
On Mon, 19 Oct 2009 02:39:57 -0500, Zarathustra
wrote:
Function is never called but why?
look at: window.Window.wndProc : case WM.LBUTTONDOWN
//__
module window;
private import base;
private import structs;
private static import user32;
private st
On Wed, 30 Sep 2009 15:49:33 -0500, Phil Deets wrote:
On Wed, 30 Sep 2009 09:01:04 -0500, Trass3r wrote:
Phil Deets schrieb:
I tried Descent, but it didn't work well at all with my D2 program. It
also didn't support building. I'll look into Poseidon. Thanks.
D2 support
On Wed, 30 Sep 2009 09:05:37 -0500, A Bothe
wrote:
Hi, I think I've got what you want...
http://www.alexanderbothe.com/?id=27 - the D-IDE
I tried that. It has potential, but here is a list of problems I had:
* Unpinned panels don't collapse until you unpin a second panel.
* When I right-c
On Wed, 30 Sep 2009 09:01:04 -0500, Trass3r wrote:
Phil Deets schrieb:
I tried Descent, but it didn't work well at all with my D2 program. It
also didn't support building. I'll look into Poseidon. Thanks.
D2 support isn't that good in Descent yet.
Building is su
On Wed, 30 Sep 2009 02:46:12 -0500, Saaa wrote:
Phil Deets wrote
I tried Descent, but it didn't work well at all with my D2 program. It
also didn't support building. I'll look into Poseidon. Thanks.
What exactly do you expect from supporting building?
I use descent to buil
On Tue, 29 Sep 2009 20:09:44 -0500, Jeremie Pelletier
wrote:
Phil Deets wrote:
Hi, I'm new to D and am mostly interested in D2. Is there a Windows IDE
with support for D2 debugging, building, and basic code navigation
(such as go to definition)? I've been trying a couple diff
Hi, I'm new to D and am mostly interested in D2. Is there a Windows IDE
with support for D2 debugging, building, and basic code navigation (such
as go to definition)? I've been trying a couple different IDEs, but most
seem to be focused towards D1. Another nice to have "feature" would be
su
35 matches
Mail list logo