Re: Re: How to interface to SWT and other beginner questions

Arjan Boeijink <[email protected]> Fri, 24 Sep 2004 02:01:51 +0200
Newsgroups gmane.comp.lang.nice.general
Message-ID <[email protected]>
>> This retyping is not needed I think.
>
>Hmmm, I've looked into the sources of  nice.swt
>and that's the way its done there. 

Superfluous retypings should be avoided, they are tedious and error prone to write and make the compiler slower.
I think the author didn't knew the details or the compiler wasn't smart enough about the types of java methods at that time.
Retypings are only needed now for methods with parametric types, methods that possibly return null, and methods that don't accept null as argument. The last category isn't really needed for making java libraries useable, but it's safer.

>> But the error is caused by either the MainWindow 
>> class that cannot be found or it doesn't have a 
>> constructor with zero arguments.
>
>Well - shame on me !!! - the constructor was declaired
>to be private cause it  has been called from the included
>main function only. Sorry, probably information overflow  ;-)
Right that's another possible cause, I need to make these error messages more informative sometime.

Arjan



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php