Issue 6538 in pharo: Win32Shell new shellOpen: 'cmd.exe' fails, result is not a string.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue 6538 in pharo: Win32Shell new shellOpen: 'cmd.exe' fails, result is not a string.

pharo
Status: New
Owner: ----
Labels: Milestone-1.4 Type-Bug

New issue 6538 by [hidden email]: Win32Shell new shellOpen: 'cmd.exe'  
fails, result is not a string.
http://code.google.com/p/pharo/issues/detail?id=6538

Gofer new
     squeaksource:  'MetacelloRepository';
     package: 'ConfigurationOfFFI';
     load.

((Smalltalk at: #ConfigurationOfFFI) project version: '1.6') load

Then:

Win32Shell new shellOpen: 'cmd.exe'

Error:

'Instances of SmallInteger are not indexable'

Code:

shellOpen: aFileString
        "Opens the file specified by aFileString. The file can be an executable  
file, a document file,
         or a folder."
        | result fileUrlString |
        "@@@@ CHECKME - jrd - Hackity, hack, hack, hack.  Apparently the Win32 url  
parser doesn't handle %-encoded colons in file paths properly. So we do the  
conversion ourselves. I'm not sure if the real problem is that we shouldnt  
be encoding the colons in the first place."
        fileUrlString := (aFileString asLowercase beginsWith: 'file:')
                ifTrue: [(aFileString copyReplaceAll: '%3A' with: ':')  
copyReplaceAll: '%3a' with: ':' ]
                ifFalse: [aFileString].

        result := self shellExecute: nil
                lpOperation: 'open'
                lpFile: fileUrlString
                lpParameters: nil
                lpDirectory: nil
                nShowCmd: 1.
  result <= 32 ifTrue: [self error: 'system error, code:', result]

Fix:

        -result <= 32 ifTrue: [self error: 'system error, code:', result]
        +result <= 32 ifTrue: [self error: 'system error, code:', result  
printString]



_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6538 in pharo: Win32Shell new shellOpen: 'cmd.exe' fails, result is not a string.

pharo

Comment #1 on issue 6538 by [hidden email]: Win32Shell new  
shellOpen: 'cmd.exe' fails, result is not a string.
http://code.google.com/p/pharo/issues/detail?id=6538

Same problem in shellFind: shellExplore:


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6538 in pharo: Win32Shell new shellOpen: 'cmd.exe' fails, result is not a string.

pharo
Updates:
        Status: Closed

Comment #2 on issue 6538 by [hidden email]: Win32Shell new  
shellOpen: 'cmd.exe' fails, result is not a string.
http://code.google.com/p/pharo/issues/detail?id=6538

Note that this is the Pharo bug tracker - it is not intended for Pharo
package issues.

Nonetheless I fixed this in "FFI-Win32-tbn.11" which is used  
in "ConfigurationOfFFI-tbn.28"

use ConfigurationBrowser from the worlds tools menu to load or evaluate:

Gofer new
     squeaksource:  'MetacelloRepository';
     package: 'ConfigurationOfFFI';
     load.

((Smalltalk at: #ConfigurationOfFFI) project version: '1.7') load


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker
Reply | Threaded
Open this post in threaded view
|

Re: Issue 6538 in pharo: Win32Shell new shellOpen: 'cmd.exe' fails, result is not a string.

pharo

Comment #3 on issue 6538 by [hidden email]: Win32Shell new  
shellOpen: 'cmd.exe' fails, result is not a string.
http://code.google.com/p/pharo/issues/detail?id=6538

Note that this is the Pharo bug tracker - it is not intended for Pharo
package issues.

Nonetheless I fixed this in "FFI-Win32-tbn.11" which is used  
in "ConfigurationOfFFI-tbn.28"

use ConfigurationBrowser from the worlds tools menu to load or evaluate:

Gofer new
     squeaksource:  'MetacelloRepository';
     package: 'ConfigurationOfFFI';
     load.

((Smalltalk at: #ConfigurationOfFFI) project version: '1.7') load


_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker