<br><br><div class="gmail_quote">2010/12/17 Levente Uzonyi <span dir="ltr"><<a href="mailto:leves@elte.hu">leves@elte.hu</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>On Fri, 17 Dec 2010, Javier Pimás wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
OK, if I'm correct the 3449 issue is fixed and integrated now. So how do we<br>
solve this one? Because the method lays on VMMakerTool's code, for squeak.<br>
Maybe we can add a line to ConfigurationOfVMMaker>>#fixVMMakerForPharo like<br>
this:<br>
<br>
(Smalltalk at: #VMMakerTool) compile:<br>
'loadConfig<br>
| fileResult file |<br>
fileResult := UIManager default chooseFileMatching: #(''*.config'') label:<br>
''Select<br>
VMMaker configuration...''.<br>
fileResult<br>
ifNotNil: [file := fileResult.<br>
[vmMaker := VMMaker forConfigurationFile: file.<br>
vmMaker logger: logger.<br>
vmMaker platformDirectory]<br>
on: Error<br>
do: [self inform: ''Possible problem with path settings or platform<br>
name?''].<br>
self updateAllViews]'<br>
<br>
<br>
It's a bit of a dirty hack, maybe there's a cleaner way. What do you think?<br>
</blockquote>
<br>
No need to do dirty hacks, just communicate your needs properly. Ask David to update the method. Squeak (since 3.9) also implements UIManager >> #chooseFileMatching:label:. Note that the name of this method is a bit misleading. The first argument is a list of "file extensions", not a list of patterns. So this should work in both Squeak and Pharo:<br>
<br>
fileResult := UIManager default<br>
chooseFileMatching: #('config')<br>
label: 'Select VMMaker configuration...'.<br>
<br>
Since fileResult is a string that contains the full path, the variable "file" is not necessary anymore.<br>
<br></blockquote><div><br></div><div>Excelent! Many thanks for the redirect!</div><div><br></div><div>javier</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Levente<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Regards,<br>
Javier.<br>
<br>
On Fri, Dec 17, 2010 at 8:35 AM, Gary Chambers <<a href="mailto:gazzaguru2@btinternet.com" target="_blank">gazzaguru2@btinternet.com</a>>wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It seems the implementation in MorphicUIManager uses the patterns<br>
as extensions.<br>
<br>
So<br>
fileResult := UIManager default chooseFileMatching: #('config') label:<br>
'Select<br>
VMMaker configuration...'.<br>
<br>
would work.<br>
<br>
However, that misses the meaning of patterns.<br>
I've raised issue <a href="http://code.google.com/p/pharo/issues/detail?id=3449with" target="_blank">http://code.google.com/p/pharo/issues/detail?id=3449with</a> change set attached...<br>
<br>
Regards, Gary<br>
<br>
----- Original Message ----- From: <<a href="mailto:pharo@googlecode.com" target="_blank">pharo@googlecode.com</a>><br>
To: <<a href="mailto:pharo-project@lists.gforge.inria.fr" target="_blank">pharo-project@lists.gforge.inria.fr</a>><br>
Sent: Friday, December 17, 2010 4:21 AM<br>
Subject: [Pharo-project] Issue 3446 in pharo: VMMakerTool load config<br>
buttondoesn't work<br>
<br>
<br>
<br>
Status: New<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Owner: ----<br>
<br>
New issue 3446 by elpochodelagente: VMMakerTool load config button doesn't<br>
work<br>
<a href="http://code.google.com/p/pharo/issues/detail?id=3446" target="_blank">http://code.google.com/p/pharo/issues/detail?id=3446</a><br>
<br>
Pharo image: dev 1.1.1<br>
Pharo core version: Pharo-1.1-11411<br>
Virtual machine used: custom linux, allmost latest VMMaker, classic (not<br>
cog)<br>
Class browser used if applicable: OBSystemBrowserAdaptor<br>
<br>
Steps to reproduce:<br>
1. Load VMMaker with<br>
2. Open the VMMakerTool with: "VMMakerTool openInWorld"<br>
3. Push load config button, you get an error message<br>
<br>
The problem is that VMMaker tool makes use of StandardFileDialog, which<br>
isn't present in Pharo anymore. The method that raises the error is<br>
<br>
VMMakerTool>>#loadConfig<br>
| fileResult file |<br>
fileResult := (StandardFileMenu oldFileMenu: FileDirectory default<br>
withPattern: '*.config') startUpWithCaption: 'Select VMMaker<br>
configuration...'.<br>
fileResult<br>
ifNotNil: [<br>
file := fileResult directory fullNameFor: fileResult name.<br>
[<br>
vmMaker := VMMaker forConfigurationFile: file.<br>
vmMaker logger: logger.<br>
vmMaker platformDirectory<br>
]<br>
on: Error<br>
do: [self inform: 'Possible problem with path settings or<br>
platform name?'].<br>
self updateAllViews]<br>
<br>
<br>
Changing<br>
<br>
fileResult := (StandardFileMenu oldFileMenu: FileDirectory default<br>
withPattern: '*.config') startUpWithCaption: 'Select VMMaker<br>
configuration...'.<br>
<br>
for<br>
<br>
fileResult := UIManager default chooseFileMatching: nil label: 'Select<br>
VMMaker configuration...'.<br>
<br>
and<br>
<br>
file := fileResult directory fullNameFor: fileResult name.<br>
<br>
for<br>
<br>
file := fileResult<br>
<br>
Fixes it almost completely. It would be better to use chooseFileMatching:<br>
#('*.config') but it didn't work well.<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
<br>
-- <br>
Javier Pimás<br>
Ciudad de Buenos Aires<br>
</blockquote>
<br></blockquote></div><br><br clear="all"><br>-- <br>Javier Pimás<br>Ciudad de Buenos Aires<br>