<br><br><div class="gmail_quote">2010/12/17 Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu">leves@elte.hu</a>&gt;</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&#39;m correct the 3449 issue is fixed and integrated now. So how do we<br>
solve this one? Because the method lays on VMMakerTool&#39;s code, for squeak.<br>
Maybe we can add a line to ConfigurationOfVMMaker&gt;&gt;#fixVMMakerForPharo like<br>
this:<br>
<br>
(Smalltalk at: #VMMakerTool) compile:<br>
   &#39;loadConfig<br>
| fileResult file |<br>
fileResult := UIManager default chooseFileMatching: #(&#39;&#39;*.config&#39;&#39;) label:<br>
&#39;&#39;Select<br>
VMMaker configuration...&#39;&#39;.<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: &#39;&#39;Possible problem with path settings or platform<br>
name?&#39;&#39;].<br>
self updateAllViews]&#39;<br>
<br>
<br>
It&#39;s a bit of a dirty hack, maybe there&#39;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 &gt;&gt; #chooseFileMatching:label:. Note that the name of this method is a bit misleading. The first argument is a list of &quot;file extensions&quot;, not a list of patterns. So this should work in both Squeak and Pharo:<br>


<br>
fileResult := UIManager default<br>
        chooseFileMatching: #(&#39;config&#39;)<br>
        label: &#39;Select VMMaker configuration...&#39;.<br>
<br>
Since fileResult is a string that contains the full path, the variable &quot;file&quot; 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 &lt;<a href="mailto:gazzaguru2@btinternet.com" target="_blank">gazzaguru2@btinternet.com</a>&gt;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: #(&#39;config&#39;) label:<br>
&#39;Select<br>
VMMaker configuration...&#39;.<br>
<br>
would work.<br>
<br>
However, that misses the meaning of patterns.<br>
I&#39;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: &lt;<a href="mailto:pharo@googlecode.com" target="_blank">pharo@googlecode.com</a>&gt;<br>
To: &lt;<a href="mailto:pharo-project@lists.gforge.inria.fr" target="_blank">pharo-project@lists.gforge.inria.fr</a>&gt;<br>
Sent: Friday, December 17, 2010 4:21 AM<br>
Subject: [Pharo-project] Issue 3446 in pharo: VMMakerTool load config<br>
buttondoesn&#39;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&#39;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: &quot;VMMakerTool openInWorld&quot;<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&#39;t present in Pharo anymore. The method that raises the error is<br>
<br>
VMMakerTool&gt;&gt;#loadConfig<br>
   | fileResult file |<br>
   fileResult := (StandardFileMenu oldFileMenu: FileDirectory default<br>
withPattern: &#39;*.config&#39;) startUpWithCaption: &#39;Select VMMaker<br>
configuration...&#39;.<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: &#39;Possible problem with path settings or<br>
platform name?&#39;].<br>
           self updateAllViews]<br>
<br>
<br>
Changing<br>
<br>
fileResult := (StandardFileMenu oldFileMenu: FileDirectory default<br>
withPattern: &#39;*.config&#39;) startUpWithCaption: &#39;Select VMMaker<br>
configuration...&#39;.<br>
<br>
for<br>
<br>
fileResult := UIManager default chooseFileMatching: nil label: &#39;Select<br>
VMMaker configuration...&#39;.<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>
#(&#39;*.config&#39;) but it didn&#39;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>