

Task

Display the string       Goodbye, World!       on a GUI object   (alert box, plain window, text area, etc.).



Related task

   Hello world/Text


 
import org.eclipse.edt.rui.widgets.*;
import dojo.widgets.*;
 
handler HelloWorld type RUIhandler{initialUI =[ui]}
 
    ui Box {columns=1, children=[nameField, helloLabel, goButton]};
 
    nameField DojoTextField {placeHolder = "What's your name?", text = "World"};
    helloLabel TextLabel {};
    goButton DojoButton {text = "Say Goodbye", onClick ::= onClick_goButton};
 
    function onClick_goButton(e Event in) 
        helloLabel.text = "Goodbye, " + nameField.text + "!";
    end
 
end
 