[OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

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

[OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
 

This PR aligns the default numFiles value recorded for DragEnter, DragMove, and DragLeave events recorded by the X11 implementation of the DropPlugin, which was 1, to the default value used by the Win32 implementation of the plugin, which is 0.

The motivation for this change is to unify the event protocol along with different platforms. It would technically be highly expensive and questionable to find out this value before the drop event has been recorded. Concretely, Win32 does not support this at all without switching the library, and on Linux, this would require a performance-extensive ping-pong of "Target to source: Please hand a copy of all dragged files", "Source to target: I converted these files for you", "Target to source: Thank you, but I was only interested into their total number" messages. (However, interestingly macOS appears to support this (I could not yet test it) and https://github.com/codefrau/SqueakJS/ could do so, too.)

While pursuing the same master plan, this PR is not dependent nor reverse-dependent on #508. They can be merged independently of each other.

Please review and merge if you agree. I hereby confirm that I did not observe any regressions when dragging files or folders into a recent Squeak image.


You can view, comment on, or merge this pull request online at:

  https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514

Commit Summary

  • X11 DropPlugin: Don't specify numFiles= 1 before DragDrop

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hello,

I've tried building from the "dnd-unify-numfiles" branch.

This works for me : I can compile a "squeak-stack-spur" VM from it,
and when I drag a file into the Squeak desktop, this works,
I don't get into the debugger as I currently have with the sqUnixXdnd branch.

However when I try to merge dnd-unify-numfiles into sqUnixXdnd I get
Auto-merging platforms/unix/vm-display-X11/sqUnixXdnd.c
CONFLICT (content): Merge conflict in platforms/unix/vm-display-X11/sqUnixXdnd.c
Automatic merge failed; fix conflicts and then commit the result.

So is it please possible that you merge yourself and advise on what change
you really want to make to sqUnixXdnd.c ?

Also is there documentation on the dropFiles changeset on how to use the
new class DemoDropTool, subclass of Model.

This would be useful to see how I can test the DemoDropTool.

Regards,
David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJfP3zkAAoJEAwpOKXMq1MarjkH/1CVvbshbyyiPh5VeLsCEVAs
PcL1JR0YyM/4wzmlIu8PaWyfMICLRh43V1TIXT6gBD1iB/2D30LIdN4Y/20lkJY8
k6W3fqYbQOm5alKw53bq6oobS2brscFThP2mqGJtcObf0NVNBLmmb9lPW++bXUdQ
A7KINPCz6kXd/fOcgJMzC9oRXLLJq/wvs2w6MWP69+mBSesIyzAXtgkcde2lbX9G
PK+StOk3bjbCSz8TbdlTBE+KQ5FFhigoJIsOOeM7CrSEKWlg0rZIrt+8itLhxdpp
0yro6iPRpjju4uVIBuN/0zxN2K8GlCMUtwT7parnbKI5Jb2kbExX0OXn0E7C33k=
=v6j1
-----END PGP SIGNATURE-----


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678099206", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678099206", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
In reply to this post by David T Lewis
 

@LinqLover pushed 1 commit.

  • dae0bf5 Merge branch 'Cog' into dnd-unify-numfiles


You are receiving this because you are subscribed to this thread.
View it on GitHub or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514/files/a749b6b54909d6f3eea544fdffe17271d00a7f95..dae0bf5670efa757c482ada192534244efe2d688", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514/files/a749b6b54909d6f3eea544fdffe17271d00a7f95..dae0bf5670efa757c482ada192534244efe2d688", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
In reply to this post by David T Lewis
 

So is it please possible that you merge yourself

Done

Also is there documentation on the dropFiles changeset on how to use the new class DemoDropTool, subclass of Model.

Good hint! Just do ToolBuilder open. DemoDropTool and then try to drop things into the tool. It's really only a demo made to show the different drop hooks we have got.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678460513", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678460513", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
In reply to this post by David T Lewis
 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

I compiled a new VM from the updated branch:

squeak -version

5.0-202008211759-dnd-unify-numfiles Sat Aug 22 09:57:02 CEST 2020 cc [Production Spur 64-bit VM]

StackInterpreter VMMaker.oscog-eem.2792 uuid: f914b421-12d3-48b8-b510-833495378c66 Aug 22 2020

VM: 202008211759-dnd-unify-numfiles stes@gecko:src/thiede/opensmalltalk

Date: Fri Aug 21 19:59:53 2020 CommitHash: dae0bf5

Plugins: 202008211759-dnd-unify-numfiles stes@gecko:src/thiede/opensmalltalk

Then I used the image Squeak6.0alpha-19687-64bit.image.
I loaded (with Tools -> File List "FileIn") the changeset DropFiles3.14.cs
(and DropFiles-examples.cs).

When I drag and drop 2 files myfile1 and myfile2 into the Squeak desktop,
it works, I get "PluggableSystemWindow" objects without getting into the
debugger.

If I then (following your previous instructions) browse HandMorph,
and go to private events #generateDropFilesEvent: and insert the showln:

and when I then drag again the files, it works (without debugger), and
the Transcript shows:

1
2
...
2
2
4

So that seems to work.

Can you explain more how to use the DemoDropTool ?
How to open the ToolBuilder and get from there to the DemoDropTool ...

Regards,
David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJfQNVuAAoJEAwpOKXMq1Mal6YIAKVbbsAyJWhW6jZF2MTZ4vCV
CB7R9mZBmRbSCcF6QD5bUfzq5CXBsnEaQWuswdupdfyEzlUK1l/3vmQUhIiRHFYN
i5X9YQdwb5wvbuHMr346zRQoRACMPlWOQnUTXJn42TGHmKKrSa1ug+wZEVcmb3Bo
Z1KheFmCERjkbv4lcb8KERKG5RfdoZyy+MIQnEoBVLNIyx3CVIRlGXVKXet1s47/
yi0g/B2MKBnhYEopDXAGJrio4+KadnNrKxQVhgBsJJxIdgciFOnCFHXfkEPEE0hi
NtlEuQalotcl2MhQjobMbRmZwgyLtOKqrkysPoTxULN1/CL4fWfjX29DR2rx1mM=
=JKWg
-----END PGP SIGNATURE-----


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678614247", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678614247", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
In reply to this post by David T Lewis
 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

I compiled a new VM from the updated branch:

squeak -version

5.0-202008211759-dnd-unify-numfiles Sat Aug 22 09:57:02 CEST 2020 cc [Production Spur 64-bit VM]

StackInterpreter VMMaker.oscog-eem.2792 uuid: f914b421-12d3-48b8-b510-833495378c66 Aug 22 2020

VM: 202008211759-dnd-unify-numfiles stes@gecko:src/thiede/opensmalltalk

Date: Fri Aug 21 19:59:53 2020 CommitHash: dae0bf5

Plugins: 202008211759-dnd-unify-numfiles stes@gecko:src/thiede/opensmalltalk

Then I used the image Squeak6.0alpha-19687-64bit.image.
I loaded (with Tools -> File List "FileIn") the changeset DropFiles3.14.cs
(and DropFiles-examples.cs).

When I drag and drop 2 files myfile1 and myfile2 into the Squeak desktop,
it works, I get "PluggableSystemWindow" objects without getting into the
debugger.

If I then (following your previous instructions) browse HandMorph,
and go to private events #generateDropFilesEvent: and insert the showln:

and when I then drag again the files, it works (without debugger), and
the Transcript shows:

1
2
...
2
2
4

So that seems to work.

Can you explain more how to use the DemoDropTool ?
How to open the ToolBuilder and get from there to the DemoDropTool ...

Regards,
David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJfQNVuAAoJEAwpOKXMq1Mal6YIAKVbbsAyJWhW6jZF2MTZ4vCV
CB7R9mZBmRbSCcF6QD5bUfzq5CXBsnEaQWuswdupdfyEzlUK1l/3vmQUhIiRHFYN
i5X9YQdwb5wvbuHMr346zRQoRACMPlWOQnUTXJn42TGHmKKrSa1ug+wZEVcmb3Bo
Z1KheFmCERjkbv4lcb8KERKG5RfdoZyy+MIQnEoBVLNIyx3CVIRlGXVKXet1s47/
yi0g/B2MKBnhYEopDXAGJrio4+KadnNrKxQVhgBsJJxIdgciFOnCFHXfkEPEE0hi
NtlEuQalotcl2MhQjobMbRmZwgyLtOKqrkysPoTxULN1/CL4fWfjX29DR2rx1mM=
=JKWg
-----END PGP SIGNATURE-----


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678614248", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678614248", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
In reply to this post by David T Lewis
 

Can you explain more how to use the DemoDropTool ?
How to open the ToolBuilder and get from there to the DemoDropTool ...

The ToolBuilder is not a tool but a class that can build tools for you.
The correct snippet is:

ToolBuilder open: DemoDropTool.

Insert this into any text field and press d to do it.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678633557", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678633557", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
In reply to this post by David T Lewis
 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

This results in a doesNotUnderstand: message for DemoDropTool,
it does not recognize the #buildListWith: selector.

Does it work for you ?

I get

  • --- The full stack ---
    DemoDropTool(Object)>>doesNotUnderstand: #buildListWith:
    [] in DemoDropTool>>buildWith:
    [] in DemoDropTool(Model)>>buildWindowWith:specs:
    Array(SequenceableCollection)>>do:
    DemoDropTool(Model)>>buildWindowWith:specs:
    DemoDropTool>>buildWith:
    DemoDropTool class(Model class)>>buildWith:
    MorphicToolBuilder(ToolBuilder)>>build:
    MorphicToolBuilder>>open:
    ToolBuilder class>>open:

David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJfQUCzAAoJEAwpOKXMq1Ma68cH/RmTsvmtMaSpoGXaddKM/Ez9
WLqsGE3FQZboHGJ+D9wV6mDB/wIfH9r8pqv93VeHHPeX5g2M76MAF/2KlUzey6KL
RkKvxtAOtVxyWyzL2CdSQnwjIcRmuzLnkg05x2HODbWEuHWmib7yzH9+XZhBfbDm
67qaiDC+MXnP2ETlJ5G0zgMkAbByYdiIN1iPLv//dKz/Vxj6ZE/fFK7HUupm2tDa
NszB5Y8r1fdZsvSzzYbin0878h9DJoqwWiVKaRgfx3+4CSr0hUDZL9yss5OTJA6C
QbSfD6Nxo5i4jdPF/EIWvV4ORnvlrKkEx5CLLgMHAMcypJxN1RG/ekCRu6uOQns=
=uAio
-----END PGP SIGNATURE-----


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678657975", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678657975", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
In reply to this post by David T Lewis
 

Oh, so sorry, I have no idea how this method has flown off my changeset. :-( If you still have patience, you could try this one:
dropFiles3.31.zip


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678675122", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678675122", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
In reply to this post by David T Lewis
 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

This new package dropFiles is working: ToolBuilder open:DemoDropTool
works, it displays some numbers (1 ... 10) although I'm not sure how to use it.

In any case the VM with dnd-unify-numfiles seems to be working.

David Stes

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJfQiYvAAoJEAwpOKXMq1Ma8fkH/2kuQkoWRehBEpttp3/VNM9c
4QoYMRhRAHRlr/flGMZgNpWSGtEOZIrZdSAz8+Y0YBKEz6s7vV3sX46/mxb2TNP0
k6RZ5oNL/bWhoCAteEzIK0WXWRWWTpZLai6nScntc5kg5u2uvrH6m2VzjRJaKp3b
qGX7//OeF/3gVWX+l9PNf+oPM7jMui/KlAE+XIfN+9BwaTsGDRgMV4HMS9vsyMcz
dYYAUmd5tyfOKVHPXuqcFvihqmx6xP5m/9ptP4nx6vyf9ck4Xj28rCbj97JucaNm
0dQoUO0Z8Vnbct7OcAmzhLAPS2yQ08EAiRLf1BDrNZlAtDY2R53HKzgbGz1Uvw4=
=Emqj
-----END PGP SIGNATURE-----


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678744946", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-678744946", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
In reply to this post by David T Lewis
 

You can use the DemoDropTool by dragging objects into each of the three panes, and to show that the drop works, it displays each dragged items. For example, try to drag a text to number 5 of the list and the 5 will be replaced by the text. Together with this PR, you can drag a file from the host system directly in this tool.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-679058647", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-679058647", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
In reply to this post by David T Lewis
 

@marceltaeumel @nicolas-cellier-aka-nice Friendly reminder that this PR is complete, conflict-free, and ready to merge :-)


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-684732808", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#issuecomment-684732808", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>
Reply | Threaded
Open this post in threaded view
|

Re: [OpenSmalltalk/opensmalltalk-vm] DropPlugin: Unify numFiles fallback value before DragDrop has been recorded (#514)

David T Lewis
In reply to this post by David T Lewis
 

Merged #514 into Cog.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

<script type="application/ld+json">[ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#event-3719972062", "url": "https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514#event-3719972062", "name": "View Pull Request" }, "description": "View this Pull Request on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]</script>