Regression in P7 with drag and drop
Hi, PasteUpMorph>>dropFiles: looks wrong in P7. A Write stream is created while a Read stream is expected. Result: drag and drop of a sketch file does not work anymore in DrGeo. Should it be a binary read stream or just a read stream? With a read stream it works fine for DrGeo, not sure about other. Enclosed .st of the edited method. Please, some one with know fill a bug ticket with the proposed fix. Thanks Hilaire -- Dr. Geo http://drgeo.eu
That method was fixed as follows in Pharo 8 PasteUpMorph>>#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 ] ]].
On 27 Jun 2019, at 22:41, Hilaire <hilaire@drgeo.eu> wrote:
Hi,
PasteUpMorph>>dropFiles:
looks wrong in P7.
A Write stream is created while a Read stream is expected.
Result: drag and drop of a sketch file does not work anymore in DrGeo.
Should it be a binary read stream or just a read stream?
With a read stream it works fine for DrGeo, not sure about other.
Enclosed .st of the edited method.
Please, some one with know fill a bug ticket with the proposed fix.
Thanks
Hilaire
-- Dr. Geo http://drgeo.eu
<PasteUpMorph-dropFiles.st>
It was changed like that as early as in P7. It does not work. How could the dragged and dropped file opened as a write stream? Replacing binaryWriteStreamDo: wtih readStreamDo: make it work for DrGeo. I don't know about other scenario usage. Hilaire -- Dr. Geo http://drgeo.eu
And there is an issue with the Default drop handler. Try to drop a text file in P7 or likely P8 image. Message #name is expected to be understandble by Stream, but it is not any more the case. Hilaire -- Dr. Geo http://drgeo.eu -- Dr. Geo http://drgeo.eu
thanks for the report. Hilaire could you open a bug entry and we will issue a fix for P7 and P8 S.
On 28 Jun 2019, at 07:16, Hilaire <hilaire@drgeo.eu> wrote:
And there is an issue with the Default drop handler.
Try to drop a text file in P7 or likely P8 image.
Message #name is expected to be understandble by Stream, but it is not any more the case.
Hilaire
-- Dr. Geo http://drgeo.eu
-- Dr. Geo http://drgeo.eu
https://github.com/pharo-project/pharo/issues/3679 Le 28/06/2019 à 03:09, ducasse a écrit :
thanks for the report. Hilaire could you open a bug entry and we will issue a fix for P7 and P8
S.
-- Dr. Geo http://drgeo.eu
participants (3)
-
ducasse -
Hilaire -
Sven Van Caekenberghe