In Pharo 4. I'm writing a ui in spec and I want to be able to select and open a file on a button click. I can see one example in polymorph but I don't know if that can be used from spec. Or am I missing something obvious? -- View this message in context: http://forum.world.st/FileDialog-from-Spec-tp4860608.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
2015-11-12 7:23 GMT+01:00 Jeff Gray <jeff@rogerthedog.com>:
In Pharo 4. I'm writing a ui in spec and I want to be able to select and open a file on a button click. I can see one example in polymorph but I don't know if that can be used from spec. Or am I missing something obvious?
We don't have a spec based FileDialog (or FileChooserModel) yet. Do you want to integrate the FileChooserUI in your spec based UI, or just open a FileChooserDialog? If you just want to open a dialog, I would say, take the polymorph one. If you want to have the FileChooser as a part of your UI, you 'll have to create a new spec model for it. nicolai
-- View this message in context: http://forum.world.st/FileDialog-from-Spec-tp4860608.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
I just want to call a dialog on a button click. What approach do I take with the Polymorph one? Do I have to open a Polymorph window which then calls the dialog or can I bake the Polymorph dialog into my spec window? -- View this message in context: http://forum.world.st/FileDialog-from-Spec-tp4860608p4860782.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Hi Jeff, Here is an example to bring up the file dialog answering a file reference. | reference | reference := UIManager default fileSave: 'Save as?' extensions: #('pdf' 'png' 'stuff') path: Smalltalk imageDirectory. For other examples see MorphicUIManager where methods start with file* Best regards, Henrik -----Original Message----- From: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] On Behalf Of Jeff Gray Sent: Thursday, November 12, 2015 11:22 PM To: pharo-users@lists.pharo.org Subject: Re: [Pharo-users] FileDialog from Spec I just want to call a dialog on a button click. What approach do I take with the Polymorph one? Do I have to open a Polymorph window which then calls the dialog or can I bake the Polymorph dialog into my spec window? -- View this message in context: http://forum.world.st/FileDialog-from-Spec-tp4860608p4860782.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
Thanks! That worked like a charm. -- View this message in context: http://forum.world.st/FileDialog-from-Spec-tp4860608p4860831.html Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.
participants (3)
-
Henrik Nergaard -
Jeff Gray -
Nicolai Hess