#DOCUMENTATION by stefan
authorStefan Vogel <sv@exept.de>
Tue, 03 Jan 2017 14:51:45 +0100
changeset 17206 9ecd8e75182f
parent 17205 5f737b63fa71
child 17207 242fef148d28
child 17221 83d1d509d23b
#DOCUMENTATION by stefan class: EditFieldWithCompletion changed: #example_1
EditFieldWithCompletion.st
--- 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