Copy link to clipboard
Copied
I've got an application set up to listen for nativedragevents.When I build the application to .air, all works well.
However, the drag events are not dispatched from within Flashbuilder.
If I try to debug the application, dragging from my desktop to the application screen is ignored. I can understand why: it's not running as an air application but inside Flashbuilder.
What is a way to do some debugging on the nativedragevent? I don't want to build->update->run my app every time I change something.
Copy link to clipboard
Copied
Hi,
You should be able debug native drag events fine from Flash Builder. (I just tried it, it works)
However, you should be in a Flex Desktop project (AIR project) for this debugging to work.
What exactly do you mean by "inside Flash Builder"?
Thanks,
Anirudh
Copy link to clipboard
Copied
Hi and thank you for your answer (and for trying it out for me)
I think I have got my project configured wrong, because when I drag something from my desktop over the application (in debug mode) nothing happens, the curser just turns in one of the "not allowed / not accepting drags" icons from windows.
However, I cannot find where to tell Flashbuilder that this is an AIR application.
Any sugestions?
Copy link to clipboard
Copied
Hi,
On NativeDragEvent.NATIVE_DRAG_ENTER, you have to call DragDropManager.acceptDragDrop(), then you'll get the accepted icon.
For a complete example, see: http://www.mikechambers.com/blog/2007/11/07/air-example-native-drag-and-drop/
When you create a new Flex project, choose desktop in the first page of the wizard.
You can also right click a flex project, choose add/change project type and pick "Convert to Flex desktop project"
Thanks,
Anirudh
Copy link to clipboard
Copied
I removed Flash Builder and re-installed it.
I also updated to Flex SDK 4.1
Everyting works now!
Copy link to clipboard
Copied
Another small addition to those who come google ing in here:
It appears that using Flash Builder under the "administrator" user account prevents nativedrag events from dispatching.
Copy link to clipboard
Copied
That's really strange - I don't think admin permissions should interfere with this.
Is this consistently reproducible for you? Running in admin mode doesn't fire nativedragevent and running in normal mode does?
Copy link to clipboard
Copied
Yes it is consistant, try it (right-click your flashbuilder shortcut, advanced, run as administrator) I filed a bug report on this already.
Copy link to clipboard
Copied
Can you please post the bug ID here?
Thanks.
Copy link to clipboard
Copied
https://bugs.adobe.com/jira/browse/FB-28439
Copy link to clipboard
Copied
Thank you.
Copy link to clipboard
Copied
holly crap you saved my day
thank you for bringing that up!
btw, i'm on flex 4.5 and issue is till there ...