comment/format in: #getResourceFileName:forClass:
changed:
#getResourceFileName:
#getResourceFileName:forPackage:
--- a/Smalltalk.st Tue Nov 17 00:14:12 2009 +0100
+++ b/Smalltalk.st Tue Nov 17 11:03:04 2009 +0100
@@ -6132,10 +6132,14 @@
!
getResourceFileName:aFileName
+ <resource: #obsolete>
+
"search aFileName in some standard places
(subdirectories named 'resources' in SystemPath);
- return the absolute filename or nil if none is found."
-
+ return the absolute filename or nil if none is found.
+ Obsolete: you must now provide a package argument."
+
+ self obsoleteMethodWarning:'use getResourceFileName:forPackage:'.
^ self getResourceFileName:aFileName forPackage:nil
"
@@ -6159,7 +6163,7 @@
^ self getResourceFileName:aFileName forPackage:pkgOrNil.
"
- Smalltalk getResourceFileName:'SystemBrowser.rs' forClass:SystemBrowser
+ Smalltalk getResourceFileName:'de.rs' forClass:SystemBrowser
"
!
@@ -6188,19 +6192,19 @@
pF notNil ifTrue:[
^ pF.
].
- pF := self searchPath:(self realSystemPath) for:aFileName in:('resources/styles').
- pF notNil ifTrue:[
- ^ pF.
- ].
+"/ pF := self searchPath:(self realSystemPath) for:aFileName in:('resources/styles').
+"/ pF notNil ifTrue:[
+"/ ^ pF.
+"/ ].
f ~= aFileName ifTrue:[
pF := self searchPath:(self realSystemPath) for:f in:('resources').
pF notNil ifTrue:[
^ pF.
].
- pF := self searchPath:(self realSystemPath) for:f in:('resources/styles').
- pF notNil ifTrue:[
- ^ pF.
- ].
+"/ pF := self searchPath:(self realSystemPath) for:f in:('resources/styles').
+"/ pF notNil ifTrue:[
+"/ ^ pF.
+"/ ].
].
^ nil
].
@@ -6212,12 +6216,13 @@
^ pF.
].
+ "/ the following code finds the file within the IDE's own hierarchy
dir := self projectDirectoryForPackage:aPackageIDOrNil.
dir notNil ifTrue:[
dir := dir asFilename.
(pF := dir / 'resources' / f) exists ifTrue:[ ^ pF name ].
- (pF := dir / 'styles' / f) exists ifTrue:[ ^ pF name ].
+"/ (pF := dir / 'styles' / f) exists ifTrue:[ ^ pF name ].
"resolve something like: 'ASN/definition.asn1'"
(pF := dir / f) exists ifTrue:[ ^ pF name ].
@@ -6228,7 +6233,8 @@
"
Smalltalk getResourceFileName:'SystemBrowser.rs' forPackage:'stx:libtool'
Smalltalk getResourceFileName:'normal.style' forPackage:'stx:libview'
- Smalltalk getResourceFileName:'mswindowsXP.style' forPackage:'stx:libview'
+ Smalltalk getResourceFileName:'styles/normal.style' forPackage:'stx:libview'
+ Smalltalk getResourceFileName:'styles/mswindowsXP.style' forPackage:'stx:libview'
Smalltalk getResourceFileName:'Foo.rs' forPackage:'stx:libview'
"
@@ -7384,9 +7390,9 @@
!Smalltalk class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.911 2009-11-16 13:18:39 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.912 2009-11-17 10:03:04 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.911 2009-11-16 13:18:39 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.912 2009-11-17 10:03:04 cg Exp $'
! !