app.nit examples: update http_request_example to correctly define the root_window
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 14 Nov 2017 18:08:57 +0000 (13:08 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 14 Nov 2017 18:13:01 +0000 (13:13 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/app/examples/http_request_example.nit

index daa5314..3c61498 100644 (file)
@@ -56,7 +56,7 @@ class MyHttpRequest
        redef fun after do win.button_request.enabled = true
 end
 
-# Simpe window with a label and a button
+# Simple window with a label and a button
 class HttpRequestClientWindow
        super Window
 
@@ -81,11 +81,4 @@ class HttpRequestClientWindow
        end
 end
 
-redef class App
-       redef fun on_create
-       do
-               # Create the main window
-               push_window new HttpRequestClientWindow
-               super
-       end
-end
+redef fun root_window do return new HttpRequestClientWindow