# HG changeset patch # User Claus Gittinger # Date 1086794392 -7200 # Node ID f5738b80c8ca3de090683780150f88e43041b052 # Parent c446689e80215c6cf03042fe744ffc1d08855276 entryCompletionBlockHolder diff -r c446689e8021 -r f5738b80c8ca FilenameEditField.st --- a/FilenameEditField.st Mon Jun 07 19:52:55 2004 +0200 +++ b/FilenameEditField.st Wed Jun 09 17:19:52 2004 +0200 @@ -169,7 +169,7 @@ oldContents := oldContents asString ]. - entryCompletionBlock value:oldContents. + self entryCompletionBlock value:oldContents. newContents := self contents. newContents isNil ifTrue:[ @@ -200,31 +200,32 @@ directoriesOnly := filesOnly := false. directory := Filename currentDirectory. - entryCompletionBlock := [:contents | - |newString isMultiMatch canonContents| + self + entryCompletionBlock:[:contents | + |newString isMultiMatch canonContents| - isMultiMatch := false. - canonContents := Filename canonicalize:contents. - newString := Filename - filenameCompletionFor:canonContents - directory:directory - directoriesOnly:directoriesOnly - filesOnly:filesOnly - ifMultiple:[:dir | -"/ dir asFilename isDirectory ifTrue:[ -"/ self changed:#directory with:dir. -"/ ]. - isMultiMatch := true. - self flash. - ]. - newString asFilename pathName = canonContents ifTrue:[ - self flash. + isMultiMatch := false. + canonContents := Filename canonicalize:contents. + newString := Filename + filenameCompletionFor:canonContents + directory:directory + directoriesOnly:directoriesOnly + filesOnly:filesOnly + ifMultiple:[:dir | +"/ dir asFilename isDirectory ifTrue:[ +"/ self changed:#directory with:dir. +"/ ]. + isMultiMatch := true. + self flash. + ]. + newString asFilename pathName = canonContents ifTrue:[ + self flash. + ]. + + self contents:newString addSeparatorToDirectories:isMultiMatch not. + self cursorToEndOfLine. ]. - self contents:newString addSeparatorToDirectories:isMultiMatch not. - self cursorToEndOfLine. - ]. - "Modified: 7.9.1995 / 10:20:46 / claus" "Modified: 7.9.1997 / 23:51:47 / cg" ! @@ -241,5 +242,5 @@ !FilenameEditField class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg2/FilenameEditField.st,v 1.31 2003-11-19 12:13:56 cg Exp $' + ^ '$Header: /cvs/stx/stx/libwidg2/FilenameEditField.st,v 1.32 2004-06-09 15:19:52 cg Exp $' ! !