# HG changeset patch # User Claus Gittinger # Date 1048244341 -3600 # Node ID e76715148cb3d575fe21563b98e9adabbaf6f8a3 # Parent decfe19a2bb22a8a817196e509b8bd22d8782dc7 +stringWithCRs (replaces CRs BEFORE expanding args, to avoid DOS fileName clobbering) diff -r decfe19a2bb2 -r e76715148cb3 ResourcePack.st --- a/ResourcePack.st Fri Mar 21 00:42:22 2003 +0100 +++ b/ResourcePack.st Fri Mar 21 11:59:01 2003 +0100 @@ -486,6 +486,69 @@ template := self at:s ifAbsent:s. ^ template expandPlaceholdersWith:argArray +! + +stringWithCRs:s with:arg + "translate, replace \'s with CRs and finally expand arg. + CR-replacement is donw before args are inserted + i.e. if any arg contains a backslash (DOS filenames), those are not translated." + + ^ self stringWithCRs:s withArgs:(Array with:arg) + + "Modified: / 21.3.2003 / 14:22:09 / cg" +! + +stringWithCRs:s with:arg1 with:arg2 + "translate, replace \'s with CRs and finally expand args. + CR-replacement is donw before args are inserted + i.e. if any arg contains a backslash (DOS filenames), those are not translated." + + ^ self stringWithCRs:s withArgs:(Array with:arg1 with:arg2) + + "Modified: / 21.3.2003 / 14:22:06 / cg" +! + +stringWithCRs:s with:arg1 with:arg2 with:arg3 + "translate, replace \'s with CRs and finally expand args. + CR-replacement is donw before args are inserted + i.e. if any arg contains a backslash (DOS filenames), those are not translated." + + ^ self stringWithCRs:s withArgs:(Array with:arg1 with:arg2 with:arg3) + + "Created: 9.12.1995 / 19:08:50 / cg" +! + +stringWithCRs:s with:arg1 with:arg2 with:arg3 with:arg4 + "translate, replace \'s with CRs and finally expand args. + CR-replacement is donw before args are inserted + i.e. if any arg contains a backslash (DOS filenames), those are not translated." + + ^ self stringWithCRs:s withArgs:(Array with:arg1 with:arg2 with:arg3 with:arg4) + + "Modified: / 21.3.2003 / 14:21:48 / cg" +! + +stringWithCRs:s with:arg1 with:arg2 with:arg3 with:arg4 with:arg5 + "translate, replace \'s with CRs and finally expand args. + CR-replacement is donw before args are inserted + i.e. if any arg contains a backslash (DOS filenames), those are not translated." + + ^ self stringWithCRs:s withArgs:(Array with:arg1 with:arg2 with:arg3 with:arg4 with:arg5) + + "Modified: / 21.3.2003 / 14:21:55 / cg" +! + +stringWithCRs:s withArgs:argArray + "translate, replace \'s with CRs and finally expand args. + CR-replacement is donw before args are inserted + i.e. if any arg contains a backslash (DOS filenames), those are not translated." + + |template| + + template := self at:s ifAbsent:s. + ^ template withCRs expandPlaceholdersWith:argArray + + "Modified: / 21.3.2003 / 14:21:59 / cg" ! ! !ResourcePack methodsFor:'accessing-internals'! @@ -813,7 +876,7 @@ !ResourcePack class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview/ResourcePack.st,v 1.77 2003-03-02 20:52:37 stefan Exp $' + ^ '$Header: /cvs/stx/stx/libview/ResourcePack.st,v 1.78 2003-03-21 10:59:01 cg Exp $' ! ! ResourcePack initialize!