FileSelectionBox.st
changeset 1270 8f14ed5cfeb9
parent 849 3f3371dd8222
child 1271 eb55fd7c60bb
equal deleted inserted replaced
1269:a0a6b1bdd69f 1270:8f14ed5cfeb9
   323 
   323 
   324 pattern:aPattern
   324 pattern:aPattern
   325     "set the pattern - this also enables the PatternField
   325     "set the pattern - this also enables the PatternField
   326      (if the pattern is non-nil) or hides it (if nil)."
   326      (if the pattern is non-nil) or hides it (if nil)."
   327 
   327 
   328     |hidePatternField focusSequence|
   328     |focusSequence|
   329 
   329 
   330     patternField initialText:aPattern.
   330     patternField initialText:aPattern.
   331     selectionList pattern:aPattern.
   331     selectionList pattern:aPattern.
   332     aPattern isNil ifTrue:[
   332     aPattern isNil ifTrue:[
   333 	hidePatternField := true.
   333         patternField beInvisible.
   334 	realized ifTrue:[
   334         focusSequence := (Array 
   335 	    patternField hide.
   335                              with:enterField 
   336 	].
   336                              with:selectionList 
   337 	focusSequence := (Array 
   337                              with:okButton 
   338 			     with:enterField 
   338                              with:abortButton)
   339 			     with:selectionList 
       
   340 			     with:okButton 
       
   341 			     with:abortButton)
       
   342     ] ifFalse:[
   339     ] ifFalse:[
   343 	hidePatternField := false.
   340         patternField beVisible.
   344 	realized ifTrue:[
   341         focusSequence := (Array 
   345 	    patternField realize.
   342                              with:patternField 
   346 	].
   343                              with:enterField 
   347 	focusSequence := (Array 
   344                              with:selectionList 
   348 			     with:patternField 
   345                              with:okButton 
   349 			     with:enterField 
   346                              with:abortButton)
   350 			     with:selectionList 
   347     ].
   351 			     with:okButton 
   348 
   352 			     with:abortButton)
       
   353     ].
       
   354 
       
   355     patternField hiddenOnRealize:hidePatternField.
       
   356     windowGroup notNil ifTrue:[
   349     windowGroup notNil ifTrue:[
   357 	windowGroup focusSequence:focusSequence
   350         windowGroup focusSequence:focusSequence
   358     ].
   351     ].
       
   352 
       
   353     "Modified: 24.7.1997 / 15:12:32 / cg"
   359 !
   354 !
   360 
   355 
   361 selectingDirectory:aBoolean
   356 selectingDirectory:aBoolean
   362     "setup the box for directory selection (hides regular files).
   357     "setup the box for directory selection (hides regular files).
   363      Use this, to ask the user for a directories name"
   358      Use this, to ask the user for a directories name"
   600 ! !
   595 ! !
   601 
   596 
   602 !FileSelectionBox class methodsFor:'documentation'!
   597 !FileSelectionBox class methodsFor:'documentation'!
   603 
   598 
   604 version
   599 version
   605     ^ '$Header: /cvs/stx/stx/libwidg/FileSelectionBox.st,v 1.41 1996-10-22 12:25:00 cg Exp $'
   600     ^ '$Header: /cvs/stx/stx/libwidg/FileSelectionBox.st,v 1.42 1997-07-24 13:16:42 cg Exp $'
   606 ! !
   601 ! !