class: WindowBuilder
authorClaus Gittinger <cg@exept.de>
Sat, 09 May 2015 09:50:41 +0200
changeset 3470 02a03a835c4f
parent 3468 d0a6fa0e6b5f
child 3471 fa2a226e3022
class: WindowBuilder class definition added: #windowTitle: comment/format in: #openAt:withExtent:andType:
WindowBuilder.st
--- a/WindowBuilder.st	Thu May 07 22:42:35 2015 +0200
+++ b/WindowBuilder.st	Sat May 09 09:50:41 2015 +0200
@@ -11,10 +11,12 @@
 "
 "{ Package: 'stx:libview2' }"
 
+"{ NameSpace: Smalltalk }"
+
 Object subclass:#WindowBuilder
 	instanceVariableNames:'window application bindings visuals labels namedComponents
 		helpKeys componentCreationHook applicationClass keyboardProcessor
-		subCanvasSpecs componentToSpecMapping'
+		subCanvasSpecs componentToSpecMapping windowTitle'
 	classVariableNames:'StopOnError Verbose'
 	poolDictionaries:''
 	category:'Interface-Framework'
@@ -675,6 +677,16 @@
     ^ window windowGroup
 
     "Modified: 17.6.1997 / 18:04:01 / cg"
+!
+
+windowTitle:aString
+    "if the window is already created, change its title.
+     Otherwise, remember the title to be set when the window is created later"
+
+    windowTitle := aString.
+    window notNil ifTrue:[
+        window label:aString
+    ].
 ! !
 
 !WindowBuilder methodsFor:'aspect access support'!
@@ -1570,7 +1582,7 @@
 
 "/ the following automatism is probably too cryptic and has too much of a side effect.
 "/ I prefer to leave things as they are: i.e. enforce the programmer to
-"/ do thinks explicit.
+"/ do things explicit.
 
 "/        type = #slave ifTrue:[
 "/            window windowGroup topViews first beMaster
@@ -1607,10 +1619,10 @@
 !WindowBuilder class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.155 2014-12-03 09:44:28 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.156 2015-05-09 07:50:41 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.155 2014-12-03 09:44:28 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.156 2015-05-09 07:50:41 cg Exp $'
 ! !