Hi,
I need to load a file from the disk. I am invoking: UIManager default chooseFileMatching: '*.mse' label: 'Import model from MSE file.'. The problem is that I do not see any files, even though I have files with .mse ending in the directory. Also, even if I pass '*.*' I still cannot see the files (only the directories). Could anyone tell me what I am doing wrong? Cheers, Doru -- www.tudorgirba.com "Next time you see your life passing by, say 'hi' and get to know her." _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> wrote: Hi, I could reproduce it and debugging I noticed that FileDialogWindow>>validExtensions: aList "Set the filter for the files to be those with the given extensions." aList notEmpty ifTrue: [self defaultExtension: aList first]. self fileSelectionBlock: [:de | de isDirectory ifTrue: [self showDirectoriesInFileList] ifFalse: [(self fileNamePattern match: de name) and: [ aList includes: (FileDirectory extensionFor: de name asLowercase)]]] I think there can be a problem with this method. Here, aList will be '*.*' and as you can imagine that string doesn't includes any of the extensions. Perhaps we can change that include for a match: or something like that. To see this, remove the line aList includes: (FileDirectory extensionFor: de name asLowercase and you will see that now all the files are shown. we should open a ticket but I don't know if this should be 1.0 tag best, Mariano
_______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
if you have a fix tag it 1.0 ;)
Stef On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: > > > On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> > wrote: > Hi, > > I need to load a file from the disk. > > I am invoking: > UIManager default > chooseFileMatching: '*.mse' > label: 'Import model from MSE file.'. > > The problem is that I do not see any files, even though I have files > with .mse ending in the directory. Also, even if I pass '*.*' I still > cannot see the files (only the directories). > > Could anyone tell me what I am doing wrong? > > I could reproduce it and debugging I noticed that > > FileDialogWindow>>validExtensions: aList > "Set the filter for the files to be those with the given > extensions." > > aList notEmpty > ifTrue: [self defaultExtension: aList first]. > self fileSelectionBlock: [:de | > de isDirectory > ifTrue: [self showDirectoriesInFileList] > ifFalse: [(self fileNamePattern match: de name) and: [ > aList includes: (FileDirectory extensionFor: > de name asLowercase)]]] > > > I think there can be a problem with this method. Here, aList will be > '*.*' and as you can imagine that string doesn't includes any of the > extensions. Perhaps we can change that include for a match: or > something like that. To see this, remove the line > aList includes: (FileDirectory extensionFor: de name asLowercase > > and you will see that now all the files are shown. > > we should open a ticket but I don't know if this should be 1.0 tag > > best, > > Mariano > > > > Cheers, > Doru > > -- > www.tudorgirba.com > > "Next time you see your life passing by, say 'hi' and get to know > her." > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Thanks Mariano,
The following code works: UIManager default chooseFileMatching: #('mse') label: 'Import model from MSE file.'. The problem is indeed that you have to pass a valid set of extensions, so * is not allowed. Anyway, it works for the moment but perhaps it should be changed to: FileDialogWindow>>validExtensions: aList "Set the filter for the files to be those with the given extensions." aList notEmpty ifTrue: [self defaultExtension: aList first]. self fileSelectionBlock: [:de | de isDirectory ifTrue: [self showDirectoriesInFileList] ifFalse: [(self fileNamePattern match: de name) and: [ aList contains: [:each | each match: (FileDirectory extensionFor: de name asLowercase) ] ]]] On the other hand the fileNamePattern seems to already have the job of filtering, so I do not really understand why we need aList. Cheers, Doru On 5 Aug 2009, at 09:39, Stéphane Ducasse wrote: > if you have a fix tag it 1.0 ;) > > Stef > > On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: > >> >> >> On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> >> wrote: >> Hi, >> >> I need to load a file from the disk. >> >> I am invoking: >> UIManager default >> chooseFileMatching: '*.mse' >> label: 'Import model from MSE file.'. >> >> The problem is that I do not see any files, even though I have files >> with .mse ending in the directory. Also, even if I pass '*.*' I still >> cannot see the files (only the directories). >> >> Could anyone tell me what I am doing wrong? >> >> I could reproduce it and debugging I noticed that >> >> FileDialogWindow>>validExtensions: aList >> "Set the filter for the files to be those with the given >> extensions." >> >> aList notEmpty >> ifTrue: [self defaultExtension: aList first]. >> self fileSelectionBlock: [:de | >> de isDirectory >> ifTrue: [self showDirectoriesInFileList] >> ifFalse: [(self fileNamePattern match: de name) and: [ >> aList includes: (FileDirectory extensionFor: >> de name asLowercase)]]] >> >> >> I think there can be a problem with this method. Here, aList will be >> '*.*' and as you can imagine that string doesn't includes any of the >> extensions. Perhaps we can change that include for a match: or >> something like that. To see this, remove the line >> aList includes: (FileDirectory extensionFor: de name asLowercase >> >> and you will see that now all the files are shown. >> >> we should open a ticket but I don't know if this should be 1.0 tag >> >> best, >> >> Mariano >> >> >> >> Cheers, >> Doru >> >> -- >> www.tudorgirba.com >> >> "Next time you see your life passing by, say 'hi' and get to know >> her." >> >> >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -- www.tudorgirba.com "What is more important: To be happy, or to make happy?" _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Hi again,
On the same topic, what is the invocation to open a dialogue that allows for saving files? Cheers, Doru On 5 Aug 2009, at 10:26, Tudor Girba wrote: > Thanks Mariano, > > The following code works: > > UIManager default > chooseFileMatching: #('mse') > label: 'Import model from MSE file.'. > > The problem is indeed that you have to pass a valid set of extensions, > so * is not allowed. Anyway, it works for the moment but perhaps it > should be changed to: > > FileDialogWindow>>validExtensions: aList > "Set the filter for the files to be those with the given > extensions." > > aList notEmpty > ifTrue: [self defaultExtension: aList first]. > self fileSelectionBlock: [:de | > de isDirectory > ifTrue: [self showDirectoriesInFileList] > ifFalse: [(self fileNamePattern match: de name) and: [ > aList contains: [:each | each match: > (FileDirectory extensionFor: > de name asLowercase) ] ]]] > > On the other hand the fileNamePattern seems to already have the job of > filtering, so I do not really understand why we need aList. > > Cheers, > Doru > > On 5 Aug 2009, at 09:39, Stéphane Ducasse wrote: > >> if you have a fix tag it 1.0 ;) >> >> Stef >> >> On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: >> >>> >>> >>> On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> >>> wrote: >>> Hi, >>> >>> I need to load a file from the disk. >>> >>> I am invoking: >>> UIManager default >>> chooseFileMatching: '*.mse' >>> label: 'Import model from MSE file.'. >>> >>> The problem is that I do not see any files, even though I have files >>> with .mse ending in the directory. Also, even if I pass '*.*' I >>> still >>> cannot see the files (only the directories). >>> >>> Could anyone tell me what I am doing wrong? >>> >>> I could reproduce it and debugging I noticed that >>> >>> FileDialogWindow>>validExtensions: aList >>> "Set the filter for the files to be those with the given >>> extensions." >>> >>> aList notEmpty >>> ifTrue: [self defaultExtension: aList first]. >>> self fileSelectionBlock: [:de | >>> de isDirectory >>> ifTrue: [self showDirectoriesInFileList] >>> ifFalse: [(self fileNamePattern match: de name) and: [ >>> aList includes: (FileDirectory extensionFor: >>> de name asLowercase)]]] >>> >>> >>> I think there can be a problem with this method. Here, aList will be >>> '*.*' and as you can imagine that string doesn't includes any of the >>> extensions. Perhaps we can change that include for a match: or >>> something like that. To see this, remove the line >>> aList includes: (FileDirectory extensionFor: de name asLowercase >>> >>> and you will see that now all the files are shown. >>> >>> we should open a ticket but I don't know if this should be 1.0 tag >>> >>> best, >>> >>> Mariano >>> >>> >>> >>> Cheers, >>> Doru >>> >>> -- >>> www.tudorgirba.com >>> >>> "Next time you see your life passing by, say 'hi' and get to know >>> her." >>> >>> >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > -- > www.tudorgirba.com > > "What is more important: To be happy, or to make happy?" > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- www.tudorgirba.com "Some battles are better lost than fought." _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Tudor Girba-3
The ui manager method is designed to be compatible with the pre-existing
MorphicToollBuilder usage... You should write as such: UIManager default chooseFileMatching: #('mse') label: 'Import model from MSE file.'. It is unfortunate that the method name is somewhat misleading. Regards, Gary ----- Original Message ----- From: "Tudor Girba" <[hidden email]> To: "Pharo Development" <[hidden email]> Sent: Tuesday, August 04, 2009 11:32 PM Subject: [Pharo-project] file dialog > Hi, > > I need to load a file from the disk. > > I am invoking: > UIManager default > chooseFileMatching: '*.mse' > label: 'Import model from MSE file.'. > > The problem is that I do not see any files, even though I have files > with .mse ending in the directory. Also, even if I pass '*.*' I still > cannot see the files (only the directories). > > Could anyone tell me what I am doing wrong? > > Cheers, > Doru > > -- > www.tudorgirba.com > > "Next time you see your life passing by, say 'hi' and get to know her." > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Tudor Girba-3
The fileNamePattern is the dynamic user filter (the text area under the
tree). The extentsions list is designed to limit the file types under program control. Regards, Gary ----- Original Message ----- From: "Tudor Girba" <[hidden email]> To: <[hidden email]> Sent: Wednesday, August 05, 2009 9:26 AM Subject: Re: [Pharo-project] file dialog Thanks Mariano, The following code works: UIManager default chooseFileMatching: #('mse') label: 'Import model from MSE file.'. The problem is indeed that you have to pass a valid set of extensions, so * is not allowed. Anyway, it works for the moment but perhaps it should be changed to: FileDialogWindow>>validExtensions: aList "Set the filter for the files to be those with the given extensions." aList notEmpty ifTrue: [self defaultExtension: aList first]. self fileSelectionBlock: [:de | de isDirectory ifTrue: [self showDirectoriesInFileList] ifFalse: [(self fileNamePattern match: de name) and: [ aList contains: [:each | each match: (FileDirectory extensionFor: de name asLowercase) ] ]]] On the other hand the fileNamePattern seems to already have the job of filtering, so I do not really understand why we need aList. Cheers, Doru On 5 Aug 2009, at 09:39, Stéphane Ducasse wrote: > if you have a fix tag it 1.0 ;) > > Stef > > On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: > >> >> >> On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> >> wrote: >> Hi, >> >> I need to load a file from the disk. >> >> I am invoking: >> UIManager default >> chooseFileMatching: '*.mse' >> label: 'Import model from MSE file.'. >> >> The problem is that I do not see any files, even though I have files >> with .mse ending in the directory. Also, even if I pass '*.*' I still >> cannot see the files (only the directories). >> >> Could anyone tell me what I am doing wrong? >> >> I could reproduce it and debugging I noticed that >> >> FileDialogWindow>>validExtensions: aList >> "Set the filter for the files to be those with the given >> extensions." >> >> aList notEmpty >> ifTrue: [self defaultExtension: aList first]. >> self fileSelectionBlock: [:de | >> de isDirectory >> ifTrue: [self showDirectoriesInFileList] >> ifFalse: [(self fileNamePattern match: de name) and: [ >> aList includes: (FileDirectory extensionFor: >> de name asLowercase)]]] >> >> >> I think there can be a problem with this method. Here, aList will be >> '*.*' and as you can imagine that string doesn't includes any of the >> extensions. Perhaps we can change that include for a match: or >> something like that. To see this, remove the line >> aList includes: (FileDirectory extensionFor: de name asLowercase >> >> and you will see that now all the files are shown. >> >> we should open a ticket but I don't know if this should be 1.0 tag >> >> best, >> >> Mariano >> >> >> >> Cheers, >> Doru >> >> -- >> www.tudorgirba.com >> >> "Next time you see your life passing by, say 'hi' and get to know >> her." >> >> >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project -- www.tudorgirba.com "What is more important: To be happy, or to make happy?" _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Tudor Girba-3
Unfortunately, the current protocol of UIManager is rather limited.
Would be good to flesh out properly with colour choosers, font choosers etc. For the moment your best bet is: UITheme builder fileSave: 'Your title here' which returns a new empty file stream or nil if cancelled. There are other variants, see TEasilyThemed for others. Regards, Gary ----- Original Message ----- From: "Tudor Girba" <[hidden email]> To: <[hidden email]> Sent: Wednesday, August 05, 2009 10:36 AM Subject: Re: [Pharo-project] file dialog Hi again, On the same topic, what is the invocation to open a dialogue that allows for saving files? Cheers, Doru On 5 Aug 2009, at 10:26, Tudor Girba wrote: > Thanks Mariano, > > The following code works: > > UIManager default > chooseFileMatching: #('mse') > label: 'Import model from MSE file.'. > > The problem is indeed that you have to pass a valid set of extensions, > so * is not allowed. Anyway, it works for the moment but perhaps it > should be changed to: > > FileDialogWindow>>validExtensions: aList > "Set the filter for the files to be those with the given > extensions." > > aList notEmpty > ifTrue: [self defaultExtension: aList first]. > self fileSelectionBlock: [:de | > de isDirectory > ifTrue: [self showDirectoriesInFileList] > ifFalse: [(self fileNamePattern match: de name) and: [ > aList contains: [:each | each match: > (FileDirectory extensionFor: > de name asLowercase) ] ]]] > > On the other hand the fileNamePattern seems to already have the job of > filtering, so I do not really understand why we need aList. > > Cheers, > Doru > > On 5 Aug 2009, at 09:39, Stéphane Ducasse wrote: > >> if you have a fix tag it 1.0 ;) >> >> Stef >> >> On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: >> >>> >>> >>> On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> >>> wrote: >>> Hi, >>> >>> I need to load a file from the disk. >>> >>> I am invoking: >>> UIManager default >>> chooseFileMatching: '*.mse' >>> label: 'Import model from MSE file.'. >>> >>> The problem is that I do not see any files, even though I have files >>> with .mse ending in the directory. Also, even if I pass '*.*' I >>> still >>> cannot see the files (only the directories). >>> >>> Could anyone tell me what I am doing wrong? >>> >>> I could reproduce it and debugging I noticed that >>> >>> FileDialogWindow>>validExtensions: aList >>> "Set the filter for the files to be those with the given >>> extensions." >>> >>> aList notEmpty >>> ifTrue: [self defaultExtension: aList first]. >>> self fileSelectionBlock: [:de | >>> de isDirectory >>> ifTrue: [self showDirectoriesInFileList] >>> ifFalse: [(self fileNamePattern match: de name) and: [ >>> aList includes: (FileDirectory extensionFor: >>> de name asLowercase)]]] >>> >>> >>> I think there can be a problem with this method. Here, aList will be >>> '*.*' and as you can imagine that string doesn't includes any of the >>> extensions. Perhaps we can change that include for a match: or >>> something like that. To see this, remove the line >>> aList includes: (FileDirectory extensionFor: de name asLowercase >>> >>> and you will see that now all the files are shown. >>> >>> we should open a ticket but I don't know if this should be 1.0 tag >>> >>> best, >>> >>> Mariano >>> >>> >>> >>> Cheers, >>> Doru >>> >>> -- >>> www.tudorgirba.com >>> >>> "Next time you see your life passing by, say 'hi' and get to know >>> her." >>> >>> >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > -- > www.tudorgirba.com > > "What is more important: To be happy, or to make happy?" > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- www.tudorgirba.com "Some battles are better lost than fought." _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Thanks.
Doru On 7 Aug 2009, at 11:25, Gary Chambers wrote: > Unfortunately, the current protocol of UIManager is rather limited. > Would be good to flesh out properly with colour choosers, font > choosers etc. > > For the moment your best bet is: > > UITheme builder fileSave: 'Your title here' > > which returns a new empty file stream or nil if cancelled. > There are other variants, see TEasilyThemed for others. > > Regards, Gary > > ----- Original Message ----- > From: "Tudor Girba" <[hidden email]> > To: <[hidden email]> > Sent: Wednesday, August 05, 2009 10:36 AM > Subject: Re: [Pharo-project] file dialog > > > Hi again, > > On the same topic, what is the invocation to open a dialogue that > allows for saving files? > > Cheers, > Doru > > > On 5 Aug 2009, at 10:26, Tudor Girba wrote: > >> Thanks Mariano, >> >> The following code works: >> >> UIManager default >> chooseFileMatching: #('mse') >> label: 'Import model from MSE file.'. >> >> The problem is indeed that you have to pass a valid set of >> extensions, >> so * is not allowed. Anyway, it works for the moment but perhaps it >> should be changed to: >> >> FileDialogWindow>>validExtensions: aList >> "Set the filter for the files to be those with the given >> extensions." >> >> aList notEmpty >> ifTrue: [self defaultExtension: aList first]. >> self fileSelectionBlock: [:de | >> de isDirectory >> ifTrue: [self showDirectoriesInFileList] >> ifFalse: [(self fileNamePattern match: de name) and: [ >> aList contains: [:each | each match: >> (FileDirectory extensionFor: >> de name asLowercase) ] ]]] >> >> On the other hand the fileNamePattern seems to already have the job >> of >> filtering, so I do not really understand why we need aList. >> >> Cheers, >> Doru >> >> On 5 Aug 2009, at 09:39, Stéphane Ducasse wrote: >> >>> if you have a fix tag it 1.0 ;) >>> >>> Stef >>> >>> On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: >>> >>>> >>>> >>>> On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> >>>> wrote: >>>> Hi, >>>> >>>> I need to load a file from the disk. >>>> >>>> I am invoking: >>>> UIManager default >>>> chooseFileMatching: '*.mse' >>>> label: 'Import model from MSE file.'. >>>> >>>> The problem is that I do not see any files, even though I have >>>> files >>>> with .mse ending in the directory. Also, even if I pass '*.*' I >>>> still >>>> cannot see the files (only the directories). >>>> >>>> Could anyone tell me what I am doing wrong? >>>> >>>> I could reproduce it and debugging I noticed that >>>> >>>> FileDialogWindow>>validExtensions: aList >>>> "Set the filter for the files to be those with the given >>>> extensions." >>>> >>>> aList notEmpty >>>> ifTrue: [self defaultExtension: aList first]. >>>> self fileSelectionBlock: [:de | >>>> de isDirectory >>>> ifTrue: [self showDirectoriesInFileList] >>>> ifFalse: [(self fileNamePattern match: de name) and: [ >>>> aList includes: (FileDirectory extensionFor: >>>> de name asLowercase)]]] >>>> >>>> >>>> I think there can be a problem with this method. Here, aList will >>>> be >>>> '*.*' and as you can imagine that string doesn't includes any of >>>> the >>>> extensions. Perhaps we can change that include for a match: or >>>> something like that. To see this, remove the line >>>> aList includes: (FileDirectory extensionFor: de name asLowercase >>>> >>>> and you will see that now all the files are shown. >>>> >>>> we should open a ticket but I don't know if this should be 1.0 tag >>>> >>>> best, >>>> >>>> Mariano >>>> >>>> >>>> >>>> Cheers, >>>> Doru >>>> >>>> -- >>>> www.tudorgirba.com >>>> >>>> "Next time you see your life passing by, say 'hi' and get to know >>>> her." >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> -- >> www.tudorgirba.com >> >> "What is more important: To be happy, or to make happy?" >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > -- > www.tudorgirba.com > > "Some battles are better lost than fought." > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > -- www.tudorgirba.com "It's not what we do that matters most, it's how we do it." _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Gary Chambers-4
Yes and we would integrate fast any steps in that direction.
Stef On Aug 7, 2009, at 11:25 AM, Gary Chambers wrote: > Unfortunately, the current protocol of UIManager is rather limited. > Would be good to flesh out properly with colour choosers, font > choosers etc. > > For the moment your best bet is: > > UITheme builder fileSave: 'Your title here' > > which returns a new empty file stream or nil if cancelled. > There are other variants, see TEasilyThemed for others. > > Regards, Gary > > ----- Original Message ----- > From: "Tudor Girba" <[hidden email]> > To: <[hidden email]> > Sent: Wednesday, August 05, 2009 10:36 AM > Subject: Re: [Pharo-project] file dialog > > > Hi again, > > On the same topic, what is the invocation to open a dialogue that > allows for saving files? > > Cheers, > Doru > > > On 5 Aug 2009, at 10:26, Tudor Girba wrote: > >> Thanks Mariano, >> >> The following code works: >> >> UIManager default >> chooseFileMatching: #('mse') >> label: 'Import model from MSE file.'. >> >> The problem is indeed that you have to pass a valid set of >> extensions, >> so * is not allowed. Anyway, it works for the moment but perhaps it >> should be changed to: >> >> FileDialogWindow>>validExtensions: aList >> "Set the filter for the files to be those with the given >> extensions." >> >> aList notEmpty >> ifTrue: [self defaultExtension: aList first]. >> self fileSelectionBlock: [:de | >> de isDirectory >> ifTrue: [self showDirectoriesInFileList] >> ifFalse: [(self fileNamePattern match: de name) and: [ >> aList contains: [:each | each match: >> (FileDirectory extensionFor: >> de name asLowercase) ] ]]] >> >> On the other hand the fileNamePattern seems to already have the job >> of >> filtering, so I do not really understand why we need aList. >> >> Cheers, >> Doru >> >> On 5 Aug 2009, at 09:39, Stéphane Ducasse wrote: >> >>> if you have a fix tag it 1.0 ;) >>> >>> Stef >>> >>> On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: >>> >>>> >>>> >>>> On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> >>>> wrote: >>>> Hi, >>>> >>>> I need to load a file from the disk. >>>> >>>> I am invoking: >>>> UIManager default >>>> chooseFileMatching: '*.mse' >>>> label: 'Import model from MSE file.'. >>>> >>>> The problem is that I do not see any files, even though I have >>>> files >>>> with .mse ending in the directory. Also, even if I pass '*.*' I >>>> still >>>> cannot see the files (only the directories). >>>> >>>> Could anyone tell me what I am doing wrong? >>>> >>>> I could reproduce it and debugging I noticed that >>>> >>>> FileDialogWindow>>validExtensions: aList >>>> "Set the filter for the files to be those with the given >>>> extensions." >>>> >>>> aList notEmpty >>>> ifTrue: [self defaultExtension: aList first]. >>>> self fileSelectionBlock: [:de | >>>> de isDirectory >>>> ifTrue: [self showDirectoriesInFileList] >>>> ifFalse: [(self fileNamePattern match: de name) and: [ >>>> aList includes: (FileDirectory extensionFor: >>>> de name asLowercase)]]] >>>> >>>> >>>> I think there can be a problem with this method. Here, aList will >>>> be >>>> '*.*' and as you can imagine that string doesn't includes any of >>>> the >>>> extensions. Perhaps we can change that include for a match: or >>>> something like that. To see this, remove the line >>>> aList includes: (FileDirectory extensionFor: de name asLowercase >>>> >>>> and you will see that now all the files are shown. >>>> >>>> we should open a ticket but I don't know if this should be 1.0 tag >>>> >>>> best, >>>> >>>> Mariano >>>> >>>> >>>> >>>> Cheers, >>>> Doru >>>> >>>> -- >>>> www.tudorgirba.com >>>> >>>> "Next time you see your life passing by, say 'hi' and get to know >>>> her." >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> -- >> www.tudorgirba.com >> >> "What is more important: To be happy, or to make happy?" >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > -- > www.tudorgirba.com > > "Some battles are better lost than fought." > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
I'll add some then :-)
Printing, unfortunately, is another common feature that is not really supported. Regards, Gary ----- Original Message ----- From: "Stéphane Ducasse" <[hidden email]> To: <[hidden email]> Sent: Friday, August 07, 2009 3:18 PM Subject: Re: [Pharo-project] file dialog Yes and we would integrate fast any steps in that direction. Stef On Aug 7, 2009, at 11:25 AM, Gary Chambers wrote: > Unfortunately, the current protocol of UIManager is rather limited. > Would be good to flesh out properly with colour choosers, font > choosers etc. > > For the moment your best bet is: > > UITheme builder fileSave: 'Your title here' > > which returns a new empty file stream or nil if cancelled. > There are other variants, see TEasilyThemed for others. > > Regards, Gary > > ----- Original Message ----- > From: "Tudor Girba" <[hidden email]> > To: <[hidden email]> > Sent: Wednesday, August 05, 2009 10:36 AM > Subject: Re: [Pharo-project] file dialog > > > Hi again, > > On the same topic, what is the invocation to open a dialogue that > allows for saving files? > > Cheers, > Doru > > > On 5 Aug 2009, at 10:26, Tudor Girba wrote: > >> Thanks Mariano, >> >> The following code works: >> >> UIManager default >> chooseFileMatching: #('mse') >> label: 'Import model from MSE file.'. >> >> The problem is indeed that you have to pass a valid set of >> extensions, >> so * is not allowed. Anyway, it works for the moment but perhaps it >> should be changed to: >> >> FileDialogWindow>>validExtensions: aList >> "Set the filter for the files to be those with the given >> extensions." >> >> aList notEmpty >> ifTrue: [self defaultExtension: aList first]. >> self fileSelectionBlock: [:de | >> de isDirectory >> ifTrue: [self showDirectoriesInFileList] >> ifFalse: [(self fileNamePattern match: de name) and: [ >> aList contains: [:each | each match: >> (FileDirectory extensionFor: >> de name asLowercase) ] ]]] >> >> On the other hand the fileNamePattern seems to already have the job >> of >> filtering, so I do not really understand why we need aList. >> >> Cheers, >> Doru >> >> On 5 Aug 2009, at 09:39, Stéphane Ducasse wrote: >> >>> if you have a fix tag it 1.0 ;) >>> >>> Stef >>> >>> On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: >>> >>>> >>>> >>>> On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> >>>> wrote: >>>> Hi, >>>> >>>> I need to load a file from the disk. >>>> >>>> I am invoking: >>>> UIManager default >>>> chooseFileMatching: '*.mse' >>>> label: 'Import model from MSE file.'. >>>> >>>> The problem is that I do not see any files, even though I have >>>> files >>>> with .mse ending in the directory. Also, even if I pass '*.*' I >>>> still >>>> cannot see the files (only the directories). >>>> >>>> Could anyone tell me what I am doing wrong? >>>> >>>> I could reproduce it and debugging I noticed that >>>> >>>> FileDialogWindow>>validExtensions: aList >>>> "Set the filter for the files to be those with the given >>>> extensions." >>>> >>>> aList notEmpty >>>> ifTrue: [self defaultExtension: aList first]. >>>> self fileSelectionBlock: [:de | >>>> de isDirectory >>>> ifTrue: [self showDirectoriesInFileList] >>>> ifFalse: [(self fileNamePattern match: de name) and: [ >>>> aList includes: (FileDirectory extensionFor: >>>> de name asLowercase)]]] >>>> >>>> >>>> I think there can be a problem with this method. Here, aList will >>>> be >>>> '*.*' and as you can imagine that string doesn't includes any of >>>> the >>>> extensions. Perhaps we can change that include for a match: or >>>> something like that. To see this, remove the line >>>> aList includes: (FileDirectory extensionFor: de name asLowercase >>>> >>>> and you will see that now all the files are shown. >>>> >>>> we should open a ticket but I don't know if this should be 1.0 tag >>>> >>>> best, >>>> >>>> Mariano >>>> >>>> >>>> >>>> Cheers, >>>> Doru >>>> >>>> -- >>>> www.tudorgirba.com >>>> >>>> "Next time you see your life passing by, say 'hi' and get to know >>>> her." >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> -- >> www.tudorgirba.com >> >> "What is more important: To be happy, or to make happy?" >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > -- > www.tudorgirba.com > > "Some battles are better lost than fought." > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Gary,
Some time ago, you mentioned having made some progress on printing. Is that something you can make available? Bill -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Gary Chambers Sent: Friday, August 07, 2009 9:24 AM To: [hidden email] Subject: Re: [Pharo-project] file dialog I'll add some then :-) Printing, unfortunately, is another common feature that is not really supported. Regards, Gary ----- Original Message ----- From: "Stéphane Ducasse" <[hidden email]> To: <[hidden email]> Sent: Friday, August 07, 2009 3:18 PM Subject: Re: [Pharo-project] file dialog Yes and we would integrate fast any steps in that direction. Stef On Aug 7, 2009, at 11:25 AM, Gary Chambers wrote: > Unfortunately, the current protocol of UIManager is rather limited. > Would be good to flesh out properly with colour choosers, font > choosers etc. > > For the moment your best bet is: > > UITheme builder fileSave: 'Your title here' > > which returns a new empty file stream or nil if cancelled. > There are other variants, see TEasilyThemed for others. > > Regards, Gary > > ----- Original Message ----- > From: "Tudor Girba" <[hidden email]> > To: <[hidden email]> > Sent: Wednesday, August 05, 2009 10:36 AM > Subject: Re: [Pharo-project] file dialog > > > Hi again, > > On the same topic, what is the invocation to open a dialogue that > allows for saving files? > > Cheers, > Doru > > > On 5 Aug 2009, at 10:26, Tudor Girba wrote: > >> Thanks Mariano, >> >> The following code works: >> >> UIManager default >> chooseFileMatching: #('mse') >> label: 'Import model from MSE file.'. >> >> The problem is indeed that you have to pass a valid set of >> extensions, >> so * is not allowed. Anyway, it works for the moment but perhaps it >> should be changed to: >> >> FileDialogWindow>>validExtensions: aList >> "Set the filter for the files to be those with the given >> extensions." >> >> aList notEmpty >> ifTrue: [self defaultExtension: aList first]. >> self fileSelectionBlock: [:de | >> de isDirectory >> ifTrue: [self showDirectoriesInFileList] >> ifFalse: [(self fileNamePattern match: de name) and: [ >> aList contains: [:each | each match: >> (FileDirectory extensionFor: >> de name asLowercase) ] ]]] >> >> On the other hand the fileNamePattern seems to already have the job >> of >> filtering, so I do not really understand why we need aList. >> >> Cheers, >> Doru >> >> On 5 Aug 2009, at 09:39, Stéphane Ducasse wrote: >> >>> if you have a fix tag it 1.0 ;) >>> >>> Stef >>> >>> On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: >>> >>>> >>>> >>>> On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> >>>> wrote: >>>> Hi, >>>> >>>> I need to load a file from the disk. >>>> >>>> I am invoking: >>>> UIManager default >>>> chooseFileMatching: '*.mse' >>>> label: 'Import model from MSE file.'. >>>> >>>> The problem is that I do not see any files, even though I have >>>> files >>>> with .mse ending in the directory. Also, even if I pass '*.*' I >>>> still >>>> cannot see the files (only the directories). >>>> >>>> Could anyone tell me what I am doing wrong? >>>> >>>> I could reproduce it and debugging I noticed that >>>> >>>> FileDialogWindow>>validExtensions: aList >>>> "Set the filter for the files to be those with the given >>>> extensions." >>>> >>>> aList notEmpty >>>> ifTrue: [self defaultExtension: aList first]. >>>> self fileSelectionBlock: [:de | >>>> de isDirectory >>>> ifTrue: [self showDirectoriesInFileList] >>>> ifFalse: [(self fileNamePattern match: de name) and: [ >>>> aList includes: (FileDirectory extensionFor: >>>> de name asLowercase)]]] >>>> >>>> >>>> I think there can be a problem with this method. Here, aList will >>>> be >>>> '*.*' and as you can imagine that string doesn't includes any of >>>> the >>>> extensions. Perhaps we can change that include for a match: or >>>> something like that. To see this, remove the line >>>> aList includes: (FileDirectory extensionFor: de name asLowercase >>>> >>>> and you will see that now all the files are shown. >>>> >>>> we should open a ticket but I don't know if this should be 1.0 tag >>>> >>>> best, >>>> >>>> Mariano >>>> >>>> >>>> >>>> Cheers, >>>> Doru >>>> >>>> -- >>>> www.tudorgirba.com >>>> >>>> "Next time you see your life passing by, say 'hi' and get to know >>>> her." >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> -- >> www.tudorgirba.com >> >> "What is more important: To be happy, or to make happy?" >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > -- > www.tudorgirba.com > > "Some battles are better lost than fought." > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Stéphane Ducasse
In Sophie we built out the native file dialog handlers for Windows and
macintosh. Someone might want to harvest them? People *like* working with the native platform file choosers/pickers. Extensive use of FFI tho, but a fall back to squeak like file dialogs if we found the platform didn't support the native ones. On 7-Aug-09, at 7:18 AM, Stéphane Ducasse wrote: > Yes and we would integrate fast any steps in that direction. > > Stef > > On Aug 7, 2009, at 11:25 AM, Gary Chambers wrote: > >> Unfortunately, the current protocol of UIManager is rather limited. >> Would be good to flesh out properly with colour choosers, font >> choosers etc. >> >> For the moment your best bet is: >> >> UITheme builder fileSave: 'Your title here' >> >> which returns a new empty file stream or nil if cancelled. >> There are other variants, see TEasilyThemed for others. >> >> Regards, Gary -- = = = ======================================================================== John M. McIntosh <[hidden email]> Twitter: squeaker68882 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com = = = ======================================================================== _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
with the fallback solution you mentioned it would be great.
Stef On Aug 8, 2009, at 3:19 AM, John M McIntosh wrote: > In Sophie we built out the native file dialog handlers for Windows and > macintosh. > Someone might want to harvest them? > > People *like* working with the native platform file choosers/pickers. > > Extensive use of FFI tho, but a fall back to squeak like file dialogs > if we found > the platform didn't support the native ones. > > > On 7-Aug-09, at 7:18 AM, Stéphane Ducasse wrote: > >> Yes and we would integrate fast any steps in that direction. >> >> Stef >> >> On Aug 7, 2009, at 11:25 AM, Gary Chambers wrote: >> >>> Unfortunately, the current protocol of UIManager is rather limited. >>> Would be good to flesh out properly with colour choosers, font >>> choosers etc. >>> >>> For the moment your best bet is: >>> >>> UITheme builder fileSave: 'Your title here' >>> >>> which returns a new empty file stream or nil if cancelled. >>> There are other variants, see TEasilyThemed for others. >>> >>> Regards, Gary > > -- > = > = > = > = > = > ====================================================================== > John M. McIntosh <[hidden email]> Twitter: > squeaker68882 > Corporate Smalltalk Consulting Ltd. http:// > www.smalltalkconsulting.com > = > = > = > = > = > ====================================================================== > > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
In reply to this post by Schwab,Wilhelm K
Nothing generic, just enough for us to get Postscript/PDF out to file for
printing via lpr in Linux. Regards, Gary ----- Original Message ----- From: "Schwab,Wilhelm K" <[hidden email]> To: <[hidden email]> Sent: Friday, August 07, 2009 8:07 PM Subject: Re: [Pharo-project] file dialog Gary, Some time ago, you mentioned having made some progress on printing. Is that something you can make available? Bill -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Gary Chambers Sent: Friday, August 07, 2009 9:24 AM To: [hidden email] Subject: Re: [Pharo-project] file dialog I'll add some then :-) Printing, unfortunately, is another common feature that is not really supported. Regards, Gary ----- Original Message ----- From: "Stéphane Ducasse" <[hidden email]> To: <[hidden email]> Sent: Friday, August 07, 2009 3:18 PM Subject: Re: [Pharo-project] file dialog Yes and we would integrate fast any steps in that direction. Stef On Aug 7, 2009, at 11:25 AM, Gary Chambers wrote: > Unfortunately, the current protocol of UIManager is rather limited. > Would be good to flesh out properly with colour choosers, font > choosers etc. > > For the moment your best bet is: > > UITheme builder fileSave: 'Your title here' > > which returns a new empty file stream or nil if cancelled. > There are other variants, see TEasilyThemed for others. > > Regards, Gary > > ----- Original Message ----- > From: "Tudor Girba" <[hidden email]> > To: <[hidden email]> > Sent: Wednesday, August 05, 2009 10:36 AM > Subject: Re: [Pharo-project] file dialog > > > Hi again, > > On the same topic, what is the invocation to open a dialogue that > allows for saving files? > > Cheers, > Doru > > > On 5 Aug 2009, at 10:26, Tudor Girba wrote: > >> Thanks Mariano, >> >> The following code works: >> >> UIManager default >> chooseFileMatching: #('mse') >> label: 'Import model from MSE file.'. >> >> The problem is indeed that you have to pass a valid set of >> extensions, >> so * is not allowed. Anyway, it works for the moment but perhaps it >> should be changed to: >> >> FileDialogWindow>>validExtensions: aList >> "Set the filter for the files to be those with the given >> extensions." >> >> aList notEmpty >> ifTrue: [self defaultExtension: aList first]. >> self fileSelectionBlock: [:de | >> de isDirectory >> ifTrue: [self showDirectoriesInFileList] >> ifFalse: [(self fileNamePattern match: de name) and: [ >> aList contains: [:each | each match: >> (FileDirectory extensionFor: >> de name asLowercase) ] ]]] >> >> On the other hand the fileNamePattern seems to already have the job >> of >> filtering, so I do not really understand why we need aList. >> >> Cheers, >> Doru >> >> On 5 Aug 2009, at 09:39, Stéphane Ducasse wrote: >> >>> if you have a fix tag it 1.0 ;) >>> >>> Stef >>> >>> On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: >>> >>>> >>>> >>>> On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> >>>> wrote: >>>> Hi, >>>> >>>> I need to load a file from the disk. >>>> >>>> I am invoking: >>>> UIManager default >>>> chooseFileMatching: '*.mse' >>>> label: 'Import model from MSE file.'. >>>> >>>> The problem is that I do not see any files, even though I have >>>> files >>>> with .mse ending in the directory. Also, even if I pass '*.*' I >>>> still >>>> cannot see the files (only the directories). >>>> >>>> Could anyone tell me what I am doing wrong? >>>> >>>> I could reproduce it and debugging I noticed that >>>> >>>> FileDialogWindow>>validExtensions: aList >>>> "Set the filter for the files to be those with the given >>>> extensions." >>>> >>>> aList notEmpty >>>> ifTrue: [self defaultExtension: aList first]. >>>> self fileSelectionBlock: [:de | >>>> de isDirectory >>>> ifTrue: [self showDirectoriesInFileList] >>>> ifFalse: [(self fileNamePattern match: de name) and: [ >>>> aList includes: (FileDirectory extensionFor: >>>> de name asLowercase)]]] >>>> >>>> >>>> I think there can be a problem with this method. Here, aList will >>>> be >>>> '*.*' and as you can imagine that string doesn't includes any of >>>> the >>>> extensions. Perhaps we can change that include for a match: or >>>> something like that. To see this, remove the line >>>> aList includes: (FileDirectory extensionFor: de name asLowercase >>>> >>>> and you will see that now all the files are shown. >>>> >>>> we should open a ticket but I don't know if this should be 1.0 tag >>>> >>>> best, >>>> >>>> Mariano >>>> >>>> >>>> >>>> Cheers, >>>> Doru >>>> >>>> -- >>>> www.tudorgirba.com >>>> >>>> "Next time you see your life passing by, say 'hi' and get to know >>>> her." >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> -- >> www.tudorgirba.com >> >> "What is more important: To be happy, or to make happy?" >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > -- > www.tudorgirba.com > > "Some battles are better lost than fought." > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Gary,
Were you able to pipe the data to lpr, or did you find it necessary to write a file? The latter is not a disaster, but it's always nice to skip that step if possible. Bill -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Gary Chambers Sent: Monday, August 10, 2009 10:41 AM To: [hidden email] Subject: Re: [Pharo-project] file dialog Nothing generic, just enough for us to get Postscript/PDF out to file for printing via lpr in Linux. Regards, Gary ----- Original Message ----- From: "Schwab,Wilhelm K" <[hidden email]> To: <[hidden email]> Sent: Friday, August 07, 2009 8:07 PM Subject: Re: [Pharo-project] file dialog Gary, Some time ago, you mentioned having made some progress on printing. Is that something you can make available? Bill -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Gary Chambers Sent: Friday, August 07, 2009 9:24 AM To: [hidden email] Subject: Re: [Pharo-project] file dialog I'll add some then :-) Printing, unfortunately, is another common feature that is not really supported. Regards, Gary ----- Original Message ----- From: "Stéphane Ducasse" <[hidden email]> To: <[hidden email]> Sent: Friday, August 07, 2009 3:18 PM Subject: Re: [Pharo-project] file dialog Yes and we would integrate fast any steps in that direction. Stef On Aug 7, 2009, at 11:25 AM, Gary Chambers wrote: > Unfortunately, the current protocol of UIManager is rather limited. > Would be good to flesh out properly with colour choosers, font > choosers etc. > > For the moment your best bet is: > > UITheme builder fileSave: 'Your title here' > > which returns a new empty file stream or nil if cancelled. > There are other variants, see TEasilyThemed for others. > > Regards, Gary > > ----- Original Message ----- > From: "Tudor Girba" <[hidden email]> > To: <[hidden email]> > Sent: Wednesday, August 05, 2009 10:36 AM > Subject: Re: [Pharo-project] file dialog > > > Hi again, > > On the same topic, what is the invocation to open a dialogue that > allows for saving files? > > Cheers, > Doru > > > On 5 Aug 2009, at 10:26, Tudor Girba wrote: > >> Thanks Mariano, >> >> The following code works: >> >> UIManager default >> chooseFileMatching: #('mse') >> label: 'Import model from MSE file.'. >> >> The problem is indeed that you have to pass a valid set of >> extensions, >> so * is not allowed. Anyway, it works for the moment but perhaps it >> should be changed to: >> >> FileDialogWindow>>validExtensions: aList >> "Set the filter for the files to be those with the given >> extensions." >> >> aList notEmpty >> ifTrue: [self defaultExtension: aList first]. >> self fileSelectionBlock: [:de | >> de isDirectory >> ifTrue: [self showDirectoriesInFileList] >> ifFalse: [(self fileNamePattern match: de name) and: [ >> aList contains: [:each | each match: >> (FileDirectory extensionFor: >> de name asLowercase) ] ]]] >> >> On the other hand the fileNamePattern seems to already have the job >> of >> filtering, so I do not really understand why we need aList. >> >> Cheers, >> Doru >> >> On 5 Aug 2009, at 09:39, Stéphane Ducasse wrote: >> >>> if you have a fix tag it 1.0 ;) >>> >>> Stef >>> >>> On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: >>> >>>> >>>> >>>> On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> >>>> wrote: >>>> Hi, >>>> >>>> I need to load a file from the disk. >>>> >>>> I am invoking: >>>> UIManager default >>>> chooseFileMatching: '*.mse' >>>> label: 'Import model from MSE file.'. >>>> >>>> The problem is that I do not see any files, even though I have >>>> files >>>> with .mse ending in the directory. Also, even if I pass '*.*' I >>>> still >>>> cannot see the files (only the directories). >>>> >>>> Could anyone tell me what I am doing wrong? >>>> >>>> I could reproduce it and debugging I noticed that >>>> >>>> FileDialogWindow>>validExtensions: aList >>>> "Set the filter for the files to be those with the given >>>> extensions." >>>> >>>> aList notEmpty >>>> ifTrue: [self defaultExtension: aList first]. >>>> self fileSelectionBlock: [:de | >>>> de isDirectory >>>> ifTrue: [self showDirectoriesInFileList] >>>> ifFalse: [(self fileNamePattern match: de name) and: [ >>>> aList includes: (FileDirectory extensionFor: >>>> de name asLowercase)]]] >>>> >>>> >>>> I think there can be a problem with this method. Here, aList will >>>> be >>>> '*.*' and as you can imagine that string doesn't includes any of >>>> the >>>> extensions. Perhaps we can change that include for a match: or >>>> something like that. To see this, remove the line >>>> aList includes: (FileDirectory extensionFor: de name asLowercase >>>> >>>> and you will see that now all the files are shown. >>>> >>>> we should open a ticket but I don't know if this should be 1.0 tag >>>> >>>> best, >>>> >>>> Mariano >>>> >>>> >>>> >>>> Cheers, >>>> Doru >>>> >>>> -- >>>> www.tudorgirba.com >>>> >>>> "Next time you see your life passing by, say 'hi' and get to know >>>> her." >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> -- >> www.tudorgirba.com >> >> "What is more important: To be happy, or to make happy?" >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > -- > www.tudorgirba.com > > "Some battles are better lost than fought." > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
File write at present, not ideal...
Allows checking for when the file is spooled amongst other things. Regards, Gary ----- Original Message ----- From: "Schwab,Wilhelm K" <[hidden email]> To: <[hidden email]> Sent: Monday, August 10, 2009 6:13 PM Subject: Re: [Pharo-project] file dialog Gary, Were you able to pipe the data to lpr, or did you find it necessary to write a file? The latter is not a disaster, but it's always nice to skip that step if possible. Bill -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Gary Chambers Sent: Monday, August 10, 2009 10:41 AM To: [hidden email] Subject: Re: [Pharo-project] file dialog Nothing generic, just enough for us to get Postscript/PDF out to file for printing via lpr in Linux. Regards, Gary ----- Original Message ----- From: "Schwab,Wilhelm K" <[hidden email]> To: <[hidden email]> Sent: Friday, August 07, 2009 8:07 PM Subject: Re: [Pharo-project] file dialog Gary, Some time ago, you mentioned having made some progress on printing. Is that something you can make available? Bill -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Gary Chambers Sent: Friday, August 07, 2009 9:24 AM To: [hidden email] Subject: Re: [Pharo-project] file dialog I'll add some then :-) Printing, unfortunately, is another common feature that is not really supported. Regards, Gary ----- Original Message ----- From: "Stéphane Ducasse" <[hidden email]> To: <[hidden email]> Sent: Friday, August 07, 2009 3:18 PM Subject: Re: [Pharo-project] file dialog Yes and we would integrate fast any steps in that direction. Stef On Aug 7, 2009, at 11:25 AM, Gary Chambers wrote: > Unfortunately, the current protocol of UIManager is rather limited. > Would be good to flesh out properly with colour choosers, font > choosers etc. > > For the moment your best bet is: > > UITheme builder fileSave: 'Your title here' > > which returns a new empty file stream or nil if cancelled. > There are other variants, see TEasilyThemed for others. > > Regards, Gary > > ----- Original Message ----- > From: "Tudor Girba" <[hidden email]> > To: <[hidden email]> > Sent: Wednesday, August 05, 2009 10:36 AM > Subject: Re: [Pharo-project] file dialog > > > Hi again, > > On the same topic, what is the invocation to open a dialogue that > allows for saving files? > > Cheers, > Doru > > > On 5 Aug 2009, at 10:26, Tudor Girba wrote: > >> Thanks Mariano, >> >> The following code works: >> >> UIManager default >> chooseFileMatching: #('mse') >> label: 'Import model from MSE file.'. >> >> The problem is indeed that you have to pass a valid set of >> extensions, >> so * is not allowed. Anyway, it works for the moment but perhaps it >> should be changed to: >> >> FileDialogWindow>>validExtensions: aList >> "Set the filter for the files to be those with the given >> extensions." >> >> aList notEmpty >> ifTrue: [self defaultExtension: aList first]. >> self fileSelectionBlock: [:de | >> de isDirectory >> ifTrue: [self showDirectoriesInFileList] >> ifFalse: [(self fileNamePattern match: de name) and: [ >> aList contains: [:each | each match: >> (FileDirectory extensionFor: >> de name asLowercase) ] ]]] >> >> On the other hand the fileNamePattern seems to already have the job >> of >> filtering, so I do not really understand why we need aList. >> >> Cheers, >> Doru >> >> On 5 Aug 2009, at 09:39, Stéphane Ducasse wrote: >> >>> if you have a fix tag it 1.0 ;) >>> >>> Stef >>> >>> On Aug 5, 2009, at 12:56 AM, Mariano Martinez Peck wrote: >>> >>>> >>>> >>>> On Tue, Aug 4, 2009 at 7:32 PM, Tudor Girba <[hidden email]> >>>> wrote: >>>> Hi, >>>> >>>> I need to load a file from the disk. >>>> >>>> I am invoking: >>>> UIManager default >>>> chooseFileMatching: '*.mse' >>>> label: 'Import model from MSE file.'. >>>> >>>> The problem is that I do not see any files, even though I have >>>> files >>>> with .mse ending in the directory. Also, even if I pass '*.*' I >>>> still >>>> cannot see the files (only the directories). >>>> >>>> Could anyone tell me what I am doing wrong? >>>> >>>> I could reproduce it and debugging I noticed that >>>> >>>> FileDialogWindow>>validExtensions: aList >>>> "Set the filter for the files to be those with the given >>>> extensions." >>>> >>>> aList notEmpty >>>> ifTrue: [self defaultExtension: aList first]. >>>> self fileSelectionBlock: [:de | >>>> de isDirectory >>>> ifTrue: [self showDirectoriesInFileList] >>>> ifFalse: [(self fileNamePattern match: de name) and: [ >>>> aList includes: (FileDirectory extensionFor: >>>> de name asLowercase)]]] >>>> >>>> >>>> I think there can be a problem with this method. Here, aList will >>>> be >>>> '*.*' and as you can imagine that string doesn't includes any of >>>> the >>>> extensions. Perhaps we can change that include for a match: or >>>> something like that. To see this, remove the line >>>> aList includes: (FileDirectory extensionFor: de name asLowercase >>>> >>>> and you will see that now all the files are shown. >>>> >>>> we should open a ticket but I don't know if this should be 1.0 tag >>>> >>>> best, >>>> >>>> Mariano >>>> >>>> >>>> >>>> Cheers, >>>> Doru >>>> >>>> -- >>>> www.tudorgirba.com >>>> >>>> "Next time you see your life passing by, say 'hi' and get to know >>>> her." >>>> >>>> >>>> >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>>> >>>> _______________________________________________ >>>> Pharo-project mailing list >>>> [hidden email] >>>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >>> >>> >>> _______________________________________________ >>> Pharo-project mailing list >>> [hidden email] >>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> >> -- >> www.tudorgirba.com >> >> "What is more important: To be happy, or to make happy?" >> >> >> _______________________________________________ >> Pharo-project mailing list >> [hidden email] >> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project >> > > -- > www.tudorgirba.com > > "Some battles are better lost than fought." > > > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project > > > _______________________________________________ > Pharo-project mailing list > [hidden email] > http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project |
Free forum by Nabble | Edit this page |