Status: New
Owner: ---- New issue 3446 by elpochodelagente: VMMakerTool load config button doesn't work http://code.google.com/p/pharo/issues/detail?id=3446 Pharo image: dev 1.1.1 Pharo core version: Pharo-1.1-11411 Virtual machine used: custom linux, allmost latest VMMaker, classic (not cog) Class browser used if applicable: OBSystemBrowserAdaptor Steps to reproduce: 1. Load VMMaker with 2. Open the VMMakerTool with: "VMMakerTool openInWorld" 3. Push load config button, you get an error message The problem is that VMMaker tool makes use of StandardFileDialog, which isn't present in Pharo anymore. The method that raises the error is VMMakerTool>>#loadConfig | fileResult file | fileResult := (StandardFileMenu oldFileMenu: FileDirectory default withPattern: '*.config') startUpWithCaption: 'Select VMMaker configuration...'. fileResult ifNotNil: [ file := fileResult directory fullNameFor: fileResult name. [ vmMaker := VMMaker forConfigurationFile: file. vmMaker logger: logger. vmMaker platformDirectory ] on: Error do: [self inform: 'Possible problem with path settings or platform name?']. self updateAllViews] Changing fileResult := (StandardFileMenu oldFileMenu: FileDirectory default withPattern: '*.config') startUpWithCaption: 'Select VMMaker configuration...'. for fileResult := UIManager default chooseFileMatching: nil label: 'Select VMMaker configuration...'. and file := fileResult directory fullNameFor: fileResult name. for file := fileResult Fixes it almost completely. It would be better to use chooseFileMatching: #('*.config') but it didn't work well. |
Comment #1 on issue 3446 by elpochodelagente: VMMakerTool load config button doesn't work http://code.google.com/p/pharo/issues/detail?id=3446 forgot to say, loading VMMaker with: Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfVMMaker'; load. (ConfigurationOfVMMaker project version: '1.3') load |
In reply to this post by pharo
It seems the implementation in MorphicUIManager uses the patterns
as extensions. So fileResult := UIManager default chooseFileMatching: #('config') label: 'Select VMMaker configuration...'. would work. However, that misses the meaning of patterns. I've raised issue http://code.google.com/p/pharo/issues/detail?id=3449 with change set attached... Regards, Gary ----- Original Message ----- From: <[hidden email]> To: <[hidden email]> Sent: Friday, December 17, 2010 4:21 AM Subject: [Pharo-project] Issue 3446 in pharo: VMMakerTool load config buttondoesn't work > Status: New > Owner: ---- > > New issue 3446 by elpochodelagente: VMMakerTool load config button doesn't > work > http://code.google.com/p/pharo/issues/detail?id=3446 > > Pharo image: dev 1.1.1 > Pharo core version: Pharo-1.1-11411 > Virtual machine used: custom linux, allmost latest VMMaker, classic (not > cog) > Class browser used if applicable: OBSystemBrowserAdaptor > > Steps to reproduce: > 1. Load VMMaker with > 2. Open the VMMakerTool with: "VMMakerTool openInWorld" > 3. Push load config button, you get an error message > > The problem is that VMMaker tool makes use of StandardFileDialog, which > isn't present in Pharo anymore. The method that raises the error is > > VMMakerTool>>#loadConfig > | fileResult file | > fileResult := (StandardFileMenu oldFileMenu: FileDirectory default > withPattern: '*.config') startUpWithCaption: 'Select VMMaker > configuration...'. > fileResult > ifNotNil: [ > file := fileResult directory fullNameFor: fileResult name. > [ > vmMaker := VMMaker forConfigurationFile: file. > vmMaker logger: logger. > vmMaker platformDirectory > ] > on: Error > do: [self inform: 'Possible problem with path settings or > platform name?']. > self updateAllViews] > > > Changing > > fileResult := (StandardFileMenu oldFileMenu: FileDirectory default > withPattern: '*.config') startUpWithCaption: 'Select VMMaker > configuration...'. > > for > > fileResult := UIManager default chooseFileMatching: nil label: 'Select > VMMaker configuration...'. > > and > > file := fileResult directory fullNameFor: fileResult name. > > for > > file := fileResult > > Fixes it almost completely. It would be better to use chooseFileMatching: > #('*.config') but it didn't work well. > > > |
OK, if I'm correct the 3449 issue is fixed and integrated now. So how do we solve this one? Because the method lays on VMMakerTool's code, for squeak. Maybe we can add a line to ConfigurationOfVMMaker>>#fixVMMakerForPharo like this:
(Smalltalk at: #VMMakerTool) compile: 'loadConfig
| fileResult file | fileResult := UIManager default chooseFileMatching: #(''*.config'') label: ''Select
VMMaker configuration...''. fileResult ifNotNil: [file := fileResult.
[vmMaker := VMMaker forConfigurationFile: file. vmMaker logger: logger. vmMaker platformDirectory]
on: Error do: [self inform: ''Possible problem with path settings or platform name?''].
self updateAllViews]' It's a bit of a dirty hack, maybe there's a cleaner way. What do you think?
Regards, Javier. On Fri, Dec 17, 2010 at 8:35 AM, Gary Chambers <[hidden email]> wrote: It seems the implementation in MorphicUIManager uses the patterns -- Javier Pimás Ciudad de Buenos Aires |
On Fri, 17 Dec 2010, Javier Pimás wrote:
> OK, if I'm correct the 3449 issue is fixed and integrated now. So how do we > solve this one? Because the method lays on VMMakerTool's code, for squeak. > Maybe we can add a line to ConfigurationOfVMMaker>>#fixVMMakerForPharo like > this: > > (Smalltalk at: #VMMakerTool) compile: > 'loadConfig > | fileResult file | > fileResult := UIManager default chooseFileMatching: #(''*.config'') label: > ''Select > VMMaker configuration...''. > fileResult > ifNotNil: [file := fileResult. > [vmMaker := VMMaker forConfigurationFile: file. > vmMaker logger: logger. > vmMaker platformDirectory] > on: Error > do: [self inform: ''Possible problem with path settings or platform > name?'']. > self updateAllViews]' > > > It's a bit of a dirty hack, maybe there's a cleaner way. What do you think? 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: fileResult := UIManager default chooseFileMatching: #('config') label: 'Select VMMaker configuration...'. Since fileResult is a string that contains the full path, the variable "file" is not necessary anymore. Levente > > Regards, > Javier. > > On Fri, Dec 17, 2010 at 8:35 AM, Gary Chambers <[hidden email]>wrote: > >> It seems the implementation in MorphicUIManager uses the patterns >> as extensions. >> >> So >> fileResult := UIManager default chooseFileMatching: #('config') label: >> 'Select >> VMMaker configuration...'. >> >> would work. >> >> However, that misses the meaning of patterns. >> I've raised issue http://code.google.com/p/pharo/issues/detail?id=3449with change set attached... >> >> Regards, Gary >> >> ----- Original Message ----- From: <[hidden email]> >> To: <[hidden email]> >> Sent: Friday, December 17, 2010 4:21 AM >> Subject: [Pharo-project] Issue 3446 in pharo: VMMakerTool load config >> buttondoesn't work >> >> >> >> Status: New >>> Owner: ---- >>> >>> New issue 3446 by elpochodelagente: VMMakerTool load config button doesn't >>> work >>> http://code.google.com/p/pharo/issues/detail?id=3446 >>> >>> Pharo image: dev 1.1.1 >>> Pharo core version: Pharo-1.1-11411 >>> Virtual machine used: custom linux, allmost latest VMMaker, classic (not >>> cog) >>> Class browser used if applicable: OBSystemBrowserAdaptor >>> >>> Steps to reproduce: >>> 1. Load VMMaker with >>> 2. Open the VMMakerTool with: "VMMakerTool openInWorld" >>> 3. Push load config button, you get an error message >>> >>> The problem is that VMMaker tool makes use of StandardFileDialog, which >>> isn't present in Pharo anymore. The method that raises the error is >>> >>> VMMakerTool>>#loadConfig >>> | fileResult file | >>> fileResult := (StandardFileMenu oldFileMenu: FileDirectory default >>> withPattern: '*.config') startUpWithCaption: 'Select VMMaker >>> configuration...'. >>> fileResult >>> ifNotNil: [ >>> file := fileResult directory fullNameFor: fileResult name. >>> [ >>> vmMaker := VMMaker forConfigurationFile: file. >>> vmMaker logger: logger. >>> vmMaker platformDirectory >>> ] >>> on: Error >>> do: [self inform: 'Possible problem with path settings or >>> platform name?']. >>> self updateAllViews] >>> >>> >>> Changing >>> >>> fileResult := (StandardFileMenu oldFileMenu: FileDirectory default >>> withPattern: '*.config') startUpWithCaption: 'Select VMMaker >>> configuration...'. >>> >>> for >>> >>> fileResult := UIManager default chooseFileMatching: nil label: 'Select >>> VMMaker configuration...'. >>> >>> and >>> >>> file := fileResult directory fullNameFor: fileResult name. >>> >>> for >>> >>> file := fileResult >>> >>> Fixes it almost completely. It would be better to use chooseFileMatching: >>> #('*.config') but it didn't work well. >>> >>> >>> >>> >> >> > > > -- > Javier Pimás > Ciudad de Buenos Aires > |
2010/12/17 Levente Uzonyi <[hidden email]>
Excelent! Many thanks for the redirect! javier
-- Javier Pimás Ciudad de Buenos Aires |
In reply to this post by Levente Uzonyi-2
Misleading indeed, probably why I had it that way initially.
Obviously this will no longer work with the earlier fix. Guess it is time to decide whether we want patterns or extensions. I suggest we have another UIManager method with extensions in addition to the (semantically) fixed patterns one (that is more flexible). Regards, Gary ----- Original Message ----- From: "Levente Uzonyi" <[hidden email]> To: <[hidden email]> Cc: <[hidden email]> Sent: Friday, December 17, 2010 5:39 PM Subject: Re: [Pharo-project] Issue 3446 in pharo: VMMakerTool load config buttondoesn't work On Fri, 17 Dec 2010, Javier Pimás wrote: > OK, if I'm correct the 3449 issue is fixed and integrated now. So how do > we > solve this one? Because the method lays on VMMakerTool's code, for squeak. > Maybe we can add a line to ConfigurationOfVMMaker>>#fixVMMakerForPharo > like > this: > > (Smalltalk at: #VMMakerTool) compile: > 'loadConfig > | fileResult file | > fileResult := UIManager default chooseFileMatching: #(''*.config'') label: > ''Select > VMMaker configuration...''. > fileResult > ifNotNil: [file := fileResult. > [vmMaker := VMMaker forConfigurationFile: file. > vmMaker logger: logger. > vmMaker platformDirectory] > on: Error > do: [self inform: ''Possible problem with path settings or platform > name?'']. > self updateAllViews]' > > > It's a bit of a dirty hack, maybe there's a cleaner way. What do you > think? 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: fileResult := UIManager default chooseFileMatching: #('config') label: 'Select VMMaker configuration...'. Since fileResult is a string that contains the full path, the variable "file" is not necessary anymore. Levente > > Regards, > Javier. > > On Fri, Dec 17, 2010 at 8:35 AM, Gary Chambers > <[hidden email]>wrote: > >> It seems the implementation in MorphicUIManager uses the patterns >> as extensions. >> >> So >> fileResult := UIManager default chooseFileMatching: #('config') label: >> 'Select >> VMMaker configuration...'. >> >> would work. >> >> However, that misses the meaning of patterns. >> I've raised issue >> http://code.google.com/p/pharo/issues/detail?id=3449with change set >> attached... >> >> Regards, Gary >> >> ----- Original Message ----- From: <[hidden email]> >> To: <[hidden email]> >> Sent: Friday, December 17, 2010 4:21 AM >> Subject: [Pharo-project] Issue 3446 in pharo: VMMakerTool load config >> buttondoesn't work >> >> >> >> Status: New >>> Owner: ---- >>> >>> New issue 3446 by elpochodelagente: VMMakerTool load config button >>> doesn't >>> work >>> http://code.google.com/p/pharo/issues/detail?id=3446 >>> >>> Pharo image: dev 1.1.1 >>> Pharo core version: Pharo-1.1-11411 >>> Virtual machine used: custom linux, allmost latest VMMaker, classic (not >>> cog) >>> Class browser used if applicable: OBSystemBrowserAdaptor >>> >>> Steps to reproduce: >>> 1. Load VMMaker with >>> 2. Open the VMMakerTool with: "VMMakerTool openInWorld" >>> 3. Push load config button, you get an error message >>> >>> The problem is that VMMaker tool makes use of StandardFileDialog, which >>> isn't present in Pharo anymore. The method that raises the error is >>> >>> VMMakerTool>>#loadConfig >>> | fileResult file | >>> fileResult := (StandardFileMenu oldFileMenu: FileDirectory default >>> withPattern: '*.config') startUpWithCaption: 'Select VMMaker >>> configuration...'. >>> fileResult >>> ifNotNil: [ >>> file := fileResult directory fullNameFor: fileResult name. >>> [ >>> vmMaker := VMMaker forConfigurationFile: file. >>> vmMaker logger: logger. >>> vmMaker platformDirectory >>> ] >>> on: Error >>> do: [self inform: 'Possible problem with path settings or >>> platform name?']. >>> self updateAllViews] >>> >>> >>> Changing >>> >>> fileResult := (StandardFileMenu oldFileMenu: FileDirectory default >>> withPattern: '*.config') startUpWithCaption: 'Select VMMaker >>> configuration...'. >>> >>> for >>> >>> fileResult := UIManager default chooseFileMatching: nil label: 'Select >>> VMMaker configuration...'. >>> >>> and >>> >>> file := fileResult directory fullNameFor: fileResult name. >>> >>> for >>> >>> file := fileResult >>> >>> Fixes it almost completely. It would be better to use >>> chooseFileMatching: >>> #('*.config') but it didn't work well. >>> >>> >>> >>> >> >> > > > -- > Javier Pimás > Ciudad de Buenos Aires > |
In reply to this post by Levente Uzonyi-2
On Fri, Dec 17, 2010 at 06:39:33PM +0100, Levente Uzonyi wrote:
> > On Fri, 17 Dec 2010, Javier Pim?s wrote: > > >OK, if I'm correct the 3449 issue is fixed and integrated now. So how do we > >solve this one? Because the method lays on VMMakerTool's code, for squeak. > >Maybe we can add a line to ConfigurationOfVMMaker>>#fixVMMakerForPharo like > >this: <snip> > >It's a bit of a dirty hack, maybe there's a cleaner way. What do you think? > > 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: > > fileResult := UIManager default > chooseFileMatching: #('config') > label: 'Select VMMaker configuration...'. > > Since fileResult is a string that contains the full path, the variable > "file" is not necessary anymore. This is in VMMaker-dtl.211. The #saveConfig method had a similar problem, so I changed it to use UIManager>>request:initialAnswer: Both methods should work on Squeak/Pharo now. Thanks, Dave |
On Fri, 17 Dec 2010, David T. Lewis wrote:
> > On Fri, Dec 17, 2010 at 06:39:33PM +0100, Levente Uzonyi wrote: >> >> On Fri, 17 Dec 2010, Javier Pim?s wrote: >> >>> OK, if I'm correct the 3449 issue is fixed and integrated now. So how do we >>> solve this one? Because the method lays on VMMakerTool's code, for squeak. >>> Maybe we can add a line to ConfigurationOfVMMaker>>#fixVMMakerForPharo like >>> this: > > <snip> > >>> It's a bit of a dirty hack, maybe there's a cleaner way. What do you think? >> >> 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: >> >> fileResult := UIManager default >> chooseFileMatching: #('config') >> label: 'Select VMMaker configuration...'. >> >> Since fileResult is a string that contains the full path, the variable >> "file" is not necessary anymore. > > This is in VMMaker-dtl.211. > > The #saveConfig method had a similar problem, so I changed it to > use UIManager>>request:initialAnswer: > > Both methods should work on Squeak/Pharo now. Thanks. Levente > > Thanks, > Dave > > |
In reply to this post by pharo
Updates:
Status: Invalid Comment #2 on issue 3446 by [hidden email]: VMMakerTool load config button doesn't work http://code.google.com/p/pharo/issues/detail?id=3446 For Pharo, you should use the VMmaker / Cmake generator setup, not the graphical VMMaker. (see squeak-vm mailinglist for more infos for now) |
Free forum by Nabble | Edit this page |