pharo-graphics / Bloc

Low-level UI infrastructure & framework for Pharo
MIT License
80 stars 40 forks source link

Drop files broken on Morphic host #611

Closed tinchodias closed 23 hours ago

tinchodias commented 1 day ago

See BlMorphicEventHandler>>#dropFiles:

dropFiles: anEvent
    "Handle a number of dropped files from the OS.
    TODO:
        - use a more general mechanism for figuring out what to do with the file (perhaps even offering a choice from a menu)
        - remember the resource location or (when in browser) even the actual file handle"
    | numFiles |    
    numFiles := anEvent contents.

    1 to: numFiles do: [:i | | aFileReference handler |
        aFileReference := FileReference requestDropReference: i.
        handler := ExternalDropHandler lookupExternalDropHandler: aFileReference.
        handler ifNotNil: [ aFileReference binaryWriteStreamDo: [ :stream | handler handle: stream in: self dropEvent: anEvent ] ]].

This is broken: FileReference requestDropReference: i.

tinchodias commented 23 hours ago

Fixed via d4bf62d