ExternalDropHandler chooseServiceFrom: -- cancel button is missing; (FileServices: dropping a TrueType file)

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

ExternalDropHandler chooseServiceFrom: -- cancel button is missing; (FileServices: dropping a TrueType file)

Hannes Hirzel
Hello

This is a follow up message on the thread
http://forum.world.st/Dropping-a-morph-gives-me-a-funny-menu-td4939787.html


Dropping a ttf file gives the dialog box attached below.

I probably do not want to edit a TrueType font file but rather prefer
to have a 'cancel' button instead.

-- Hannes





Details
======

The method used is #chooseServiceFrom: [1]


ExternalDropHandler chooseServiceFrom:


 chooseServiceFrom: aCollection
        "private - choose a service from aCollection asking the user if  needed"
        ^aCollection size = 1
                ifTrue: [aCollection anyOne]
                ifFalse:[UIManager default
                        chooseFrom: (aCollection collect:[:each| each label])
                        values: aCollection
                        title: 'You dropped a file. Please choose a service:' translated withCRs].


aCollection contains a list of FileServices classes. These are classes
which implement #fileReaderServicesForFile:suffix: [2].

BTW there are only a few ExternalDropHandler instances. Most cases are
handled by a file service "external" to the "ExternalDropHandler".



References
----------------

[1] http://wiki.squeak.org/squeak/4283 ExternalDropHandler
[2] http://wiki.squeak.org/squeak/1005 List of classes which provide
file reader services



Choose_dialog_after_dropping_a_ttf_file_2017-03-29.png (38K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ExternalDropHandler chooseServiceFrom: -- cancel button is missing; (FileServices: dropping a TrueType file)

Chris Muller-3
Looks like it has a red X button, does it work?

On Wed, Mar 29, 2017 at 8:49 AM, H. Hirzel <[hidden email]> wrote:

> Hello
>
> This is a follow up message on the thread
> http://forum.world.st/Dropping-a-morph-gives-me-a-funny-menu-td4939787.html
>
>
> Dropping a ttf file gives the dialog box attached below.
>
> I probably do not want to edit a TrueType font file but rather prefer
> to have a 'cancel' button instead.
>
> -- Hannes
>
>
>
>
>
> Details
> ======
>
> The method used is #chooseServiceFrom: [1]
>
>
> ExternalDropHandler chooseServiceFrom:
>
>
>  chooseServiceFrom: aCollection
>         "private - choose a service from aCollection asking the user if  needed"
>         ^aCollection size = 1
>                 ifTrue: [aCollection anyOne]
>                 ifFalse:[UIManager default
>                         chooseFrom: (aCollection collect:[:each| each label])
>                         values: aCollection
>                         title: 'You dropped a file. Please choose a service:' translated withCRs].
>
>
> aCollection contains a list of FileServices classes. These are classes
> which implement #fileReaderServicesForFile:suffix: [2].
>
> BTW there are only a few ExternalDropHandler instances. Most cases are
> handled by a file service "external" to the "ExternalDropHandler".
>
>
>
> References
> ----------------
>
> [1] http://wiki.squeak.org/squeak/4283 ExternalDropHandler
> [2] http://wiki.squeak.org/squeak/1005 List of classes which provide
> file reader services
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: ExternalDropHandler chooseServiceFrom: -- cancel button is missing; (FileServices: dropping a TrueType file)

Hannes Hirzel
If you click it the dialog just stays.

After clicking a second time the dialog box disappears.

This is not regular UI behaviour for a user dialog box.

On 3/31/17, Chris Muller <[hidden email]> wrote:

> Looks like it has a red X button, does it work?
>
> On Wed, Mar 29, 2017 at 8:49 AM, H. Hirzel <[hidden email]> wrote:
>> Hello
>>
>> This is a follow up message on the thread
>> http://forum.world.st/Dropping-a-morph-gives-me-a-funny-menu-td4939787.html
>>
>>
>> Dropping a ttf file gives the dialog box attached below.
>>
>> I probably do not want to edit a TrueType font file but rather prefer
>> to have a 'cancel' button instead.
>>
>> -- Hannes
>>
>>
>>
>>
>>
>> Details
>> ======
>>
>> The method used is #chooseServiceFrom: [1]
>>
>>
>> ExternalDropHandler chooseServiceFrom:
>>
>>
>>  chooseServiceFrom: aCollection
>>         "private - choose a service from aCollection asking the user if
>> needed"
>>         ^aCollection size = 1
>>                 ifTrue: [aCollection anyOne]
>>                 ifFalse:[UIManager default
>>                         chooseFrom: (aCollection collect:[:each| each
>> label])
>>                         values: aCollection
>>                         title: 'You dropped a file. Please choose a
>> service:' translated withCRs].
>>
>>
>> aCollection contains a list of FileServices classes. These are classes
>> which implement #fileReaderServicesForFile:suffix: [2].
>>
>> BTW there are only a few ExternalDropHandler instances. Most cases are
>> handled by a file service "external" to the "ExternalDropHandler".
>>
>>
>>
>> References
>> ----------------
>>
>> [1] http://wiki.squeak.org/squeak/4283 ExternalDropHandler
>> [2] http://wiki.squeak.org/squeak/1005 List of classes which provide
>> file reader services
>>
>>
>>
>
>