Appending Text to SWT Textbox from multiple threads.

2014-03-17 Thread Sharad Gupta
Hi All, I am trying to update a text box from another thread but it has me stumped right now. What I am trying to achieve is that the user can Initiate multiple pipeShell and the output from each of those should go into its own Textbox in parallel. I tried creating the SWT UI Controls insi

Re: setAttributes call error

2014-03-17 Thread Jay Norwood
Sorry, this is my fault. I had an old installation of 2.064 still in the path.

setAttributes call error

2014-03-17 Thread Jay Norwood
I updated to 2.065, and using visualD for the build on Windows. VisualD finds this setAttributes call in file.d, but the build fails to find it in the library. Does this build for someone else? import std.file; void clrReadOnly( in char[] name) { uint oldAtt = getAttributes(name); v

Re: DirEntries range seems impractical with foreach

2014-03-17 Thread anonymous
On Monday, 17 March 2014 at 09:18:36 UTC, Spacen Jasset wrote: While trying to use dirEntries range with foreach I encountered a seemingly unsurmountable problem. The problem is that an execption is thrown while calling .front() on the range that dirEntries returnes, which seems to mean it's im

Re: DirEntries range seems impractical with foreach

2014-03-17 Thread Mike Wey
On 03/17/2014 02:54 PM, Ali Çehreli wrote: On 03/17/2014 02:18 AM, Spacen Jasset wrote: While trying to use dirEntries range with foreach I encountered a seemingly unsurmountable problem. The problem is that an execption is thrown while calling .front() There has been past discussions on this.

Re: SysTime.add!"days" missing

2014-03-17 Thread Ali Çehreli
On 03/17/2014 08:11 AM, Spacen Jasset wrote: > Thanks Adam, is there a good explanation anywhere? Here is another one: http://ddili.org/ders/d.en/ufcs.html Ali

Re: SysTime.add!"days" missing

2014-03-17 Thread Spacen Jasset
On Monday, 17 March 2014 at 16:33:34 UTC, Adam D. Ruppe wrote: On Monday, 17 March 2014 at 16:16:20 UTC, Spacen Jasset wrote: int and days is a random method that happens to belong to Duration. There's a separate function days https://github.com/D-Programming-Language/druntime/blob/master/src

Re: SysTime.add!"days" missing

2014-03-17 Thread Adam D. Ruppe
On Monday, 17 March 2014 at 16:16:20 UTC, Spacen Jasset wrote: int and days is a random method that happens to belong to Duration. There's a separate function days https://github.com/D-Programming-Language/druntime/blob/master/src/core/time.d#L928 that one belongs to Duration https://github.

Re: SysTime.add!"days" missing

2014-03-17 Thread Spacen Jasset
On Monday, 17 March 2014 at 15:24:22 UTC, Ary Borenszweig wrote: On 3/17/14, 12:11 PM, Spacen Jasset wrote: On Monday, 17 March 2014 at 14:39:16 UTC, Adam D. Ruppe wrote: On Monday, 17 March 2014 at 14:31:54 UTC, Spacen Jasset wrote: Thanks. What devilish magic allows for the syntax 60.days? (

Re: SysTime.add!"days" missing

2014-03-17 Thread Ary Borenszweig
On 3/17/14, 12:11 PM, Spacen Jasset wrote: On Monday, 17 March 2014 at 14:39:16 UTC, Adam D. Ruppe wrote: On Monday, 17 March 2014 at 14:31:54 UTC, Spacen Jasset wrote: Thanks. What devilish magic allows for the syntax 60.days? (how does it work) There's a function in core.time: Duration day

Re: SysTime.add!"days" missing

2014-03-17 Thread Spacen Jasset
On Monday, 17 March 2014 at 14:39:16 UTC, Adam D. Ruppe wrote: On Monday, 17 March 2014 at 14:31:54 UTC, Spacen Jasset wrote: Thanks. What devilish magic allows for the syntax 60.days? (how does it work) There's a function in core.time: Duration days(int n); D functions f(x, t...) can also

Re: SysTime.add!"days" missing

2014-03-17 Thread Adam D. Ruppe
On Monday, 17 March 2014 at 14:31:54 UTC, Spacen Jasset wrote: Thanks. What devilish magic allows for the syntax 60.days? (how does it work) There's a function in core.time: Duration days(int n); D functions f(x, t...) can also be called x.f(t) (or x.f without parameters if there's no addit

Re: SysTime.add!"days" missing

2014-03-17 Thread Spacen Jasset
On Monday, 17 March 2014 at 11:52:08 UTC, Vladimir Panteleev wrote: On Monday, 17 March 2014 at 11:11:26 UTC, Spacen Jasset wrote: I would like to subtract 60 days from a SysTime, but find that SysTime.add!"days" is not available, unlike Systime.roll!"days" which is available. You can do this

Re: Get the type that a mixin is mixing into

2014-03-17 Thread anonymous
On Monday, 17 March 2014 at 13:04:36 UTC, Mike wrote: Consider the following silly, but illustrative example: *** mixin template HasValue(ContainingType) { uint value = ContainingType.outerValue; } struct MyStruct { uint outerValue; mixin

Re: Get the type that a mixin is mixing into

2014-03-17 Thread John Colvin
On Monday, 17 March 2014 at 13:04:36 UTC, Mike wrote: Hello, Consider the following silly, but illustrative example: *** mixin template HasValue(ContainingType) { uint value = ContainingType.outerValue; } struct MyStruct { uint outerValue;

Re: DirEntries range seems impractical with foreach

2014-03-17 Thread Ali Çehreli
On 03/17/2014 02:18 AM, Spacen Jasset wrote: While trying to use dirEntries range with foreach I encountered a seemingly unsurmountable problem. The problem is that an execption is thrown while calling .front() There has been past discussions on this. What version of dmd are you using? The fol

Re: Installing D on OSX using .dmg

2014-03-17 Thread Russel Winder
On Sun, 2014-03-16 at 23:10 +, Joel wrote: > Thanks Russel! > > I've gotten past the security problem! > > There's options under Security & Privacy (and what can be > downloaded): > > O-MacApp Store > O-idetinified developers > @-Anywhere. > > Though this (Anywhere) lowers the security of

Get the type that a mixin is mixing into

2014-03-17 Thread Mike
Hello, Consider the following silly, but illustrative example: *** mixin template HasValue(ContainingType) { uint value = ContainingType.outerValue; } struct MyStruct { uint outerValue; mixin HasValue!(typeof(this)); }

Re: SysTime.add!"days" missing

2014-03-17 Thread Vladimir Panteleev
On Monday, 17 March 2014 at 11:11:26 UTC, Spacen Jasset wrote: I would like to subtract 60 days from a SysTime, but find that SysTime.add!"days" is not available, unlike Systime.roll!"days" which is available. You can do this in a simpler way: t -= 60.days; SysTime.add likely specializes on d

SysTime.add!"days" missing

2014-03-17 Thread Spacen Jasset
I would like to subtract 60 days from a SysTime, but find that SysTime.add!"days" is not available, unlike Systime.roll!"days" which is available. main.d(18): Error: template instance add!("days") add!("days") does not match te mplate declaration add(string units)(long value, AllowDayOverflow

DirEntries range seems impractical with foreach

2014-03-17 Thread Spacen Jasset
While trying to use dirEntries range with foreach I encountered a seemingly unsurmountable problem. The problem is that an execption is thrown while calling .front() on the range that dirEntries returnes, which seems to mean it's impossible to use it with a for loop if you exepect any sort of '