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" <bschwab@anest.ufl.edu> To: <Pharo-project@lists.gforge.inria.fr> 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: pharo-project-bounces@lists.gforge.inria.fr [mailto:pharo-project-bounces@lists.gforge.inria.fr] On Behalf Of Gary Chambers Sent: Friday, August 07, 2009 9:24 AM To: Pharo-project@lists.gforge.inria.fr 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" <stephane.ducasse@inria.fr> To: <Pharo-project@lists.gforge.inria.fr> 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" <girba@iam.unibe.ch> To: <Pharo-project@lists.gforge.inria.fr> 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 <girba@iam.unibe.ch> 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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr 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 Pharo-project@lists.gforge.inria.fr 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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
_______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project _______________________________________________ Pharo-project mailing list Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project