EditFieldWithCompletion.st
changeset 17206 9ecd8e75182f
parent 16982 4a80412feb9a
child 17221 83d1d509d23b
child 17280 021d529b0397
--- a/EditFieldWithCompletion.st	Tue Jan 03 14:50:11 2017 +0100
+++ b/EditFieldWithCompletion.st	Tue Jan 03 14:51:45 2017 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2006 by eXept Software AG
 	      All Rights Reserved
@@ -56,7 +54,6 @@
 !
 
 example_1
-
     |top field label value|
 
     top := StandardSystemView new.
@@ -64,17 +61,17 @@
         extent:300 @ 300;
         label:'Live class completion field'.
     value := '' asValue.
-    field := (EditFieldWithCompletion new)
+    field := self new
                 origin:10 @ 135 corner:280 @ 165;
                 entryCompletionBlock:[:content | Smalltalk classnameCompletion:content ];
                 model:value.
-    label := (Label new)
+    label := Label new
                 origin:10 @ 95 corner:280 @ 115;
                 labelChannel:value.
     top
         add:field;
-        add:label.
-    top open
+        add:label;
+        open
 !
 
 examples