Thread overview
wxD 0.12 released
Mar 03, 2008
sn
Mar 03, 2008
sn
Mar 03, 2008
sn
Mar 04, 2008
sn
March 02, 2008
0.12 (afb)

Added new TaskBarIcon class, by Mike Wey
Preliminary invariant string (D2) support
Tango "toString()" support, for 0.99.4+
Updated projects for Code::Blocks release

http://wxd.sourceforge.net/

Tested with wxWidgets 2.8.7 (use 2.6.4 up)
and with GDC r199 / DMD 1.022 (also DMD 2)
This release was written with D1 / Phobos,
but should compile under D2 / Tango too...

--anders
March 03, 2008
Thanks for the good work!

I tried it with D 2.011, and run into this 'hidden method' problem

$ ./GLCube
Error: hidden method called for GLCube.MyFrame

It's better to compile with the dmd flag '-w', and fix all the missing 'override'.

see: http://www.digitalmars.com/d/archives/digitalmars/D/what_this_Error_hidden_method_called_for_..._66524.html http://www.digitalmars.com/d/archives/digitalmars/D/Re_what_this_Error_hidden_method_called_for_..._66576.html
March 03, 2008
sn wrote:

> I tried it with D 2.011, and run into this 'hidden method' problem
> 
> $ ./GLCube
> Error: hidden method called for GLCube.MyFrame

Thank you for reporting this, I don't really have D2 installed here
so am relying on user input to try and make it somewhat compatible...

> It's better to compile with the dmd flag '-w', and fix all the missing 'override'.

I can't really ship it with "warnings as errors" enabled, since it
won't always compile with those, but you can set DFLAGS if you want.

---anders
March 03, 2008
== Quote from Anders_F_Björklund (afb@algonet.se)'s article
> > It's better to compile with the dmd flag '-w', and fix all the missing 'override'.
> I can't really ship it with "warnings as errors" enabled,

Oh, I'm only saying flag '-w' will help you to identify which method is 'hidden'.
March 03, 2008
sn wrote:

>>> It's better to compile with the dmd flag '-w', and fix all the missing 'override'.
>> I can't really ship it with "warnings as errors" enabled,
> 
> Oh, I'm only saying flag '-w' will help you to identify which method is 'hidden'.

Yeah, but it doesn't give any warnings in D1 :-)

Trying it again with DMD 2.011 now, on Fedora...

--anders
March 03, 2008
>> Oh, I'm only saying flag '-w' will help you to identify which method is 'hidden'.
> 
> Yeah, but it doesn't give any warnings in D1 :-)
> Trying it again with DMD 2.011 now, on Fedora...

See what you mean now, except that it isn't a compiler
error but one of those secret runtime-only messages.

I did add the "override" for toString() back into
wxString (doesn't compile for D1 with it in there),
and that got rid of the compiler warnings but that
is not enough to make it work with D 2.011 anyway...

So it seems that it will take a while longer to make
the code override-ok, but lib* might be const-correct.

--anders

* the only wxD sample currently working for D2 or Tango
  is the "Minimal" sample, the rest are D1+Phobos only.
  (same thing applies to using something other than Make,
  but that is mostly since I didn't bother with it yet)
March 03, 2008
Can you upload (or check-in) the wxd-0.12.tgz with 'override' toString() fixed.

I'll give it try to see if I can fix the other problem.


== Quote from Anders_F_Björklund (afb@algonet.se)'s article
> >> Oh, I'm only saying flag '-w' will help you to identify which method is 'hidden'.
> >
> > Yeah, but it doesn't give any warnings in D1 :-)
> > Trying it again with DMD 2.011 now, on Fedora...
> See what you mean now, except that it isn't a compiler
> error but one of those secret runtime-only messages.
> I did add the "override" for toString() back into
> wxString (doesn't compile for D1 with it in there),
> and that got rid of the compiler warnings but that
> is not enough to make it work with D 2.011 anyway...
> So it seems that it will take a while longer to make
> the code override-ok, but lib* might be const-correct.
> --anders
March 03, 2008
sn wrote:

> Can you upload (or check-in) the wxd-0.12.tgz with 'override' toString() fixed.

"override" is in wxString, but you need to uncomment it for DMD 2 use...
public /*override*/ string toString()

Will try to make it into a version-specific thing some day, but I'm not
sure if you can do it without breaking the default D 1 language syntax ?

> I'll give it try to see if I can fix the other problem.

I have fixed the "hidden method", and several more samples, in the CVS.
http://sourceforge.net/cvs/?group_id=133831

Turned out that there was a static method with same name as a class one.
Renaming the unrelated static method fixed it, no more hijack warnings.

--anders
March 04, 2008
Just checked, the GLCube example of the CVS version works!


== Quote from Anders_F_Björklund (afb@algonet.se)'s article
> sn wrote:
> > Can you upload (or check-in) the wxd-0.12.tgz with 'override' toString() fixed.
> "override" is in wxString, but you need to uncomment it for DMD 2 use...
> public /*override*/ string toString()
> Will try to make it into a version-specific thing some day, but I'm not
> sure if you can do it without breaking the default D 1 language syntax ?

you can do:

version(D_Version2) {

 // the whole func, not just the keyword 'override', or func header;
 // but copy & paste also the whole body

} else {

  // orig func without 'override'.

}

Not beautiful, but works.
March 04, 2008
sn wrote:

> Just checked, the GLCube example of the CVS version works!

SDLPanel should also work, had to add few "in" modifiers to
the char* parameters so that you could pass string literals.

And add some predefs for Linux, in addition to Win and Mac.

> version(D_Version2) {
> 
>  // the whole func, not just the keyword 'override', or func header;
>  // but copy & paste also the whole body
> 
> } else {
> 
>   // orig func without 'override'.
> 
> }
> 
> Not beautiful, but works.

Think I tried that, but could always make another attempt
at it. Also need to build my D2 version of GDC one day...

Thank you for testing, guess the Tango version is up next.

--anders