Thread overview
Interface
Mar 13, 2008
Barry Denton
Mar 13, 2008
Frank Benoit
Mar 13, 2008
Robert Fraser
Mar 14, 2008
Barry Denton
March 13, 2008
void main (char [] [] args) {
	Display display = new Display ();
	Shell shell = new Shell (display);
	shell.setSize (100 , 100);
  Listener listen = new class Listener{ void handleEvent(Event e){Stdout ("ENTER");}};
  Listener listen1 = new class Listener{ void handleEvent(Event e){Stdout ("EXIT");}};
  Listener listen2 = new class Listener{ void handleEvent(Event e){Stdout ("HOVER");}};

  shell.addListener (DWT.MouseEnter,listen);
	shell.addListener (DWT.MouseExit,listen1);
  shell.addListener (DWT.MouseHover,listen2);

	shell.open ();
	while (!shell.isDisposed()) {
		if (!display.readAndDispatch ()) display.sleep ();
}
	display.dispose ();
}
}

gives errors on compile what is wrong?
March 13, 2008
Barry Denton schrieb:
> gives errors on compile what is wrong?

Which error do you get in which line?
March 13, 2008
Barry Denton wrote:
> [snip]
> 
> gives errors on compile what is wrong?

Hi Barry,

It's probably best to put a bit more information in your posts so people can more quickly & easily help you out. For example:

1. What OS is this?
2. What compiler are you using?
3. What version are you using? Anything in the 2.x series won't compile this code correctly, or indeed work with Tango.
4. What tool are you using to build it (rebuild? just the compiler?) What does your command look like?
5. What standard library are you using? You probably already know this, but you need to be using Tango for DWT to work properly. WAlso, what version of Tango?
6. What are the exact error messages you're getting (copy-paste them here)?

For future reference, note that this is digitalmars.D, the place for technical discussions about the language. This type of question would fit better in either the digitalmars.D.learn or digitalmars.D.ide newsgroup. Also, sentences and a spot of politeness never hurt anyone :-).

Sorry, that probably came off as pretty harsh, but it's 5:08 AM and I just had 3 pieces of pizza for breakfast. No offense meant.
March 14, 2008
Barry Denton Wrote:

> 
> void main (char [] [] args) {
> 	Display display = new Display ();
> 	Shell shell = new Shell (display);
> 	shell.setSize (100 , 100);
>   Listener listen = new class Listener{ void handleEvent(Event e){Stdout ("ENTER");}};
>   Listener listen1 = new class Listener{ void handleEvent(Event e){Stdout ("EXIT");}};
>   Listener listen2 = new class Listener{ void handleEvent(Event e){Stdout ("HOVER");}};
> 
>   shell.addListener (DWT.MouseEnter,listen);
> 	shell.addListener (DWT.MouseExit,listen1);
>   shell.addListener (DWT.MouseHover,listen2);
> 
> 	shell.open ();
> 	while (!shell.isDisposed()) {
> 		if (!display.readAndDispatch ()) display.sleep ();
> }
> 	display.dispose ();
> }
> }
> 
> gives errors on compile what is wrong?
Thanks so ,   got there OK