Can DFL/Entice generate code in classes for (common) controls?

2010-12-02 Thread Sam Hu
MFC wizard can generate code in classes for many windows native controls which are not presented in the resource editor panel.I am wondering can DFL or Entice do the same way for us to make use of these controls? Thanks for your help in advance.

Re: C++ istream / ostream equivalent ?

2010-12-02 Thread Jesse Phillips
I'm currently looking at ways to improve std.conv.to. And this might be a good area to improve std.conv.parse. For example parse could be made to look for a method static readFrom!(T)() if(isSomeString!T) and maybe to should take advantage of it. auto foo = to!A(someString); I'd have to requir

Re: Crash in struct opAssign

2010-12-02 Thread Don
Adam Burton wrote: olivier wrote: Hi, This program, compiled with dmd 1.065 under Linux, crashes: void main() { Num a = 1; } struct Num { int[] d; Num opAssign( int v ) { d.length = 1; d[0] = v; return *this; } } It looks like d is not initialized before opAssign() is called. It doesn't cr

Re: boost::ublas or linear algebra lib for D2?

2010-12-02 Thread Trass3r
hmm I remember http://www.dsource.org/projects/lyla There also were some others at dsource

boost::ublas or linear algebra lib for D2?

2010-12-02 Thread fil
Hi All, I was wondering if anyone could point me to a good library for matrix operations and decompositions in D2 as I seem unable to find it in phobos for the moment. Many thanks, Fil

Re: 'in' for plain arrays?

2010-12-02 Thread bearophile
Ali Çehreli: > If 'in' were to search among the values of arrays, then it wouldn't have > the same meaning with AAs. But it's useful and the different semantics is very easy to remember and use. Bye, bearophile

Re: Crash in struct opAssign

2010-12-02 Thread Adam Burton
olivier wrote: > Hi, > > This program, compiled with dmd 1.065 under Linux, crashes: > > void main() { > Num a = 1; > } > > struct Num { > int[] d; > > Num opAssign( int v ) { > d.length = 1; > d[0] = v; > return *this; > } > } > > It looks like d is not initialized before opAssign() is calle

Re: C++ istream / ostream equivalent ?

2010-12-02 Thread Ali Çehreli
vincent picaud wrote: > Matthias Pleh Wrote: >> class A >> { [...] >> string toString() { return someData; } > I have the feeling that the C++ way is more convenient. > > Look in C++ , to define I/O for A, you do not have to modify > your class A and simply have to overload two functions:

Re: 'in' for plain arrays?

2010-12-02 Thread Ali Çehreli
bearophile wrote: > Pelle M.: > >> It doesn't exist for performance reasons, I think. > > It's not a matter of performance. Walter thinks that "in" on > AAs searches on keys. And the "keys" of a dynamic array are its > indices. And searching for indices in a dynamic array is not so > useful. There

Re: C++ istream / ostream equivalent ?

2010-12-02 Thread vincent picaud
Pelle Månsson Wrote: > On 12/02/2010 09:05 AM, vincent picaud wrote: > > Matthias Pleh Wrote: > > > >> > >>> > >>> Thank you for your reply and yes that works :) > >>> > >>> Now i m facing with the following problem, what is the trick for input > >>> stream ? > >>> > >>> ( something like > >>> >

Crash in struct opAssign

2010-12-02 Thread olivier
Hi, This program, compiled with dmd 1.065 under Linux, crashes: void main() { Num a = 1; } struct Num { int[] d; Num opAssign( int v ) { d.length = 1; d[0] = v; return *this; } } It looks like d is not initialized

Re: 'in' for plain arrays?

2010-12-02 Thread bearophile
> It's not a matter of performance. Well, it's also a matter of performance. The "in" done on arrays is a linear search and I think Andrei thinks that "in" must be sublinear instead. Bye, bearophile

Re: 'in' for plain arrays?

2010-12-02 Thread bearophile
Pelle M.: > It doesn't exist for performance reasons, I think. It's not a matter of performance. Walter thinks that "in" on AAs searches on keys. And the "keys" of a dynamic array are its indices. And searching for indices in a dynamic array is not so useful. Therefore no "in" for dynamic/stat

Re: 'in' for plain arrays?

2010-12-02 Thread Pelle Månsson
On 12/02/2010 01:07 PM, spir wrote: Hello, Is there an equivalent of 'in' for (non-associative) arrays? Cannot find any 'contains' function. (Wouldn't it be nice to have in work for all arrays? What is the reason why it only works with AAs?) Denis -- -- -- -- -- -- -- vit esse estrany ☣ spir

'in' for plain arrays?

2010-12-02 Thread spir
Hello, Is there an equivalent of 'in' for (non-associative) arrays? Cannot find any 'contains' function. (Wouldn't it be nice to have in work for all arrays? What is the reason why it only works with AAs?) Denis -- -- -- -- -- -- -- vit esse estrany ☣ spir.wikidot.com

Re: C++ istream / ostream equivalent ?

2010-12-02 Thread Pelle Månsson
On 12/02/2010 09:05 AM, vincent picaud wrote: Matthias Pleh Wrote: Thank you for your reply and yes that works :) Now i m facing with the following problem, what is the trick for input stream ? ( something like std::istream& operator>>(std::istream& in,A& a) { // A.someData<<

Re: C++ istream / ostream equivalent ?

2010-12-02 Thread vincent picaud
Matthias Pleh Wrote: > > > > > Thank you for your reply and yes that works :) > > > > Now i m facing with the following problem, what is the trick for input > > stream ? > > > > ( something like > > > > std::istream& operator>>(std::istream& in,A& a) > > { > >// A.someData<< in; > >