Listener output
    Barry Denton 
    basse42 at yahoo.com
       
    Sat Apr 19 13:43:29 PDT 2008
    
    
  
Barry Denton Wrote:
> I have a Listener added to a button as so :-
> 
> button.addListener(DWT.Selection, new class Listener {
>         void handleEvent(Event event) {
>             itemWords [5] = "item has changed " ;//~ System.currentTimeMillis();
>             minitable.clear(5);  }  }); 
> 
> When pressed the button outputs this:-
> 
> Event {missing or misplaced '}'}Event {type=13 Button {Change item} time=1679601378 data={null} x=0 y=0 width=0 height=0 detail=0}
> .
> Now all is as it should be except for the  {missing or misplaced '}'}
> 
> 1/ Can anybody see why I get this message? 
> 
> Also "System.currentTimeMillis()"is a C style request .
> 
> 2/  is there a similar request in D for a Linux machine?
Ended up using Tango book solution for current date display -Time too complex
import tango.time.WallClock;
import tango.text.locale.Locale;
auto layout = new Locale;
Stdout.print(layout ("{:ddd, dd MMMM yyyy HH':'mm':'ss z}", WallClock.now)).newline;
    
    
More information about the Digitalmars-d-learn
mailing list