[squeak-dev] ExternalDropHandler chooseServiceFrom: -- cancel button is missing; (FileServices: dropping a TrueType file)
H. Hirzel
hannes.hirzel at gmail.com
Wed Mar 29 13:49:40 UTC 2017
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Choose_dialog_after_dropping_a_ttf_file_2017-03-29.png
Type: image/png
Size: 29096 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20170329/53810874/attachment.png>
More information about the Squeak-dev
mailing list
|