www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Interface

reply Barry Denton <basse42 yahoo.com> writes:
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?
Mar 12 2008
next sibling parent Frank Benoit <keinfarbton googlemail.com> writes:
Barry Denton schrieb:
 gives errors on compile what is wrong?
Which error do you get in which line?
Mar 13 2008
prev sibling next sibling parent Robert Fraser <fraserofthenight gmail.com> writes:
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.
Mar 13 2008
prev sibling parent Barry Denton <basse42 yahoo.com> writes:
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
Mar 14 2008