Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement onDropStart, onDropEnd for file dropping #1583

Merged
merged 11 commits into from
Jun 4, 2024

Conversation

ShaharMS
Copy link
Contributor

currently' lime only has the onFileDrop function for getting the name of the dropped file. ive added support for 3 more, but only implemented 2 of them:

  • onDropStart - dispatches before any dropping of data
  • onDropEnd - dispatches after any dropping of data
  • onDropText - is implemeted on the native side, but only works for X11 on linux, so commented out on the haxe side.

@ShaharMS
Copy link
Contributor Author

thats so strange - CI fails when trying to install from haxelib. happened to me like 2 days ago too... what is going on?

@Dimensionscape
Copy link
Member

thats so strange - CI fails when trying to install from haxelib. happened to me like 2 days ago too... what is going on?

thats so strange - CI fails when trying to install from haxelib. happened to me like 2 days ago too... what is going on?

thats so strange - CI fails when trying to install from haxelib. happened to me like 2 days ago too... what is going on?

No response from the haxelib server. Might be down.

@ShaharMS
Copy link
Contributor Author

it is working for windows tho 🤔
can you rerun CI @Dimensionscape?

@Dimensionscape
Copy link
Member

Yeah, I'll try later, the haxelib server is just being slow/unresponsive at the moment.

@player-03
Copy link
Contributor

Huh. I was expecting onDropStart to be something like JavaScript's dragover event, letting you know that the user is currently holding a file over the app. I guess I didn't pay enough attention to the name.

For the record, here's what actually happens. No events are dispatched while the user holds onto the file(s). Once they let go, several events are dispatched in succession: onDropStart, followed by one or more onDropFiles, followed by onDropEnd.

Basically if you're collecting the files into an array, this lets you know where that array starts and ends. And you know what? That could be helpful for JS, which dispatches an array of file objects (despite the documentation saying the listener should expect a single String).

@player-03
Copy link
Contributor

Ok, I went ahead and implemented the JS fix, and it works pretty well. The question is, should it be part of this pull request? It's technically a breaking change, even though all it does is make JS match the documentation.

@ShaharMS
Copy link
Contributor Author

Ok, I went ahead and implemented the JS fix, and it works pretty well. The question is, should it be part of this pull request? It's technically a breaking change, even though all it does is make JS match the documentation.

actually, idk... we should probably ask the rest of the core team. should i ping them?

@player-03
Copy link
Contributor

Nah, I already pinged Chris today. I'll just post it in Discord.

.vscode/settings.json Outdated Show resolved Hide resolved
@ShaharMS
Copy link
Contributor Author

looks like CI failing on ios and getting stuck on android isn't something relate to my pr...
is there a problem with the branch's lime version compiling to mobile?

@player-03
Copy link
Contributor

Yeah, the latest hxcpp release broke those two specific tests.

@player-03 player-03 changed the base branch from 8.1.0-Dev to 8.2.0-Dev August 18, 2023 01:09
@player-03 player-03 changed the base branch from 8.2.0-Dev to 9.0.0-dev May 27, 2024 20:21
@player-03
Copy link
Contributor

Switching over to 9.0.0 so we can include HTML5 support at the same time. I guess we don't have to do it this way, but it feels wrong for a new feature to not work on a major platform.

@player-03 player-03 merged commit ead4402 into openfl:9.0.0-dev Jun 4, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants