#BUGFIX by stefan
class: FileBrowserV2
comment/format in:
#openOn:withExtent:
changed:
#on:
#openOnFileNamed:editing:
#openWithAspects:withExtent:
Fix DNU (tries to open an OrderedCollection instead a Filename).
--- a/FileBrowserV2.st Wed Feb 08 19:45:40 2017 +0100
+++ b/FileBrowserV2.st Thu Feb 09 11:47:13 2017 +0100
@@ -92,15 +92,15 @@
"return a new FileBrowserV2 in a pathname.
The browser is not yet open"
- |instance|
-
- instance := self new.
- instance onDirectory:aDirectoryPath.
- ^ instance
+ ^ self new
+ onDirectory:aDirectoryPath;
+ yourself.
"
(self on:'/etc') open
"
+
+ "Modified: / 09-02-2017 / 11:35:29 / stefan"
!
open
@@ -158,8 +158,10 @@
^ instance
"
- FileBrowserV2 openOn:(OrderedCollection with:(Filename currentDirectory asAbsoluteFilename)) withExtent:800@600
+ FileBrowserV2 openOn:(Filename currentDirectory) withExtent:800@600
"
+
+ "Modified (comment): / 09-02-2017 / 11:40:25 / stefan"
!
openOnDirectory:aDirectoryPath
@@ -208,11 +210,15 @@
"start a new FileBrowserV2 taking aspects from a dictionary
(internal interface - only for spawn)"
- |dir clone|
+ |dir|
- dir := someAspects at:#currentFileNameHolder ifAbsent:nil.
- clone := self openOn:(dir value) withExtent:extent.
- ^ clone
+ dir := (someAspects at:#currentFileNameHolder ifAbsent:nil) value.
+ (dir isNonByteCollection and:[dir notEmpty]) ifTrue:[
+ dir := dir first.
+ ].
+ ^ self openOn:dir withExtent:extent.
+
+ "Modified: / 09-02-2017 / 11:45:51 / stefan"
! !
!FileBrowserV2 class methodsFor:'class initialization'!
@@ -2506,9 +2512,9 @@
|f|
- f := aFilename asFilename asAbsoluteFilename.
+ f := aFilename asFilename.
f isDirectory ifTrue:[
- self onDirectory:aFilename.
+ self onDirectory:f.
self open.
^ self.
].
@@ -2525,8 +2531,11 @@
].
"
- FileBrowserV2 openOnFileNamed:'Makefile'
+ FileBrowserV2 openOnFileNamed:'Make.proto'
+ FileBrowserV2 openOnFileNamed:'modules'
"
+
+ "Modified (comment): / 09-02-2017 / 11:38:22 / stefan"
!
postBuildDirectoryTree:aWidget