Trouble with FileOpenDialog

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Trouble with FileOpenDialog

Fernando Rodríguez
Hi,

When I eval this method (from The Dolphin Smalltalk Companion) to open
a file dialog:

getPicture
        "Open a file select dialog to select a picture and
        associate it with the appropriate variable."
        |file|
       
        file := FileDialog new
                fileTypes: #( ('Pictures' '*.gif; *.jpg')
                                ('Bitmaps' '*.bmp'));
                showModal. "<- This message causes the error"

        file notNil ifTrue: [
                picturePresenter value: (OLEPicture fromFile: file)].

I get a 'subclass responsability' error. However, FileOpenDialog has
no subclasses... :-?


Reply | Threaded
Open this post in threaded view
|

Re: Trouble with FileOpenDialog

Fernando Rodríguez
On Sat, 26 Mar 2005 19:22:01 +0100, Fernando  <[hidden email]> wrote:

Forget it. This is what happens when you work on a saturday... ;-)

>Hi,
>
>When I eval this method (from The Dolphin Smalltalk Companion) to open
>a file dialog:
>
>getPicture
> "Open a file select dialog to select a picture and
> associate it with the appropriate variable."
> |file|
>
> file := FileDialog new
> fileTypes: #( ('Pictures' '*.gif; *.jpg')
> ('Bitmaps' '*.bmp'));
> showModal. "<- This message causes the error"
>
> file notNil ifTrue: [
> picturePresenter value: (OLEPicture fromFile: file)].
>
>I get a 'subclass responsability' error. However, FileOpenDialog has
>no subclasses... :-?
>