Mix Elemental and Widget

116 views
Skip to first unread message

J.Ganesan

unread,
Dec 5, 2012, 9:36:43 AM12/5/12
to google-we...@googlegroups.com
On drop event, I would like to get elemental.dom.Clipboard object from onDrop(com.google.gwt.event.dom.client.DropEvent event) method. The idea is to read the binary data and the name of the file being dropped onto a com.google.gwt.user.client.ui.ScrollPanel. How do I do this ? Apparently, it is not possible to mix Elemental and Widget.

Thanks
J.Ganesan

Thomas Broyer

unread,
Dec 5, 2012, 10:16:05 AM12/5/12
to google-we...@googlegroups.com


On Wednesday, December 5, 2012 3:36:43 PM UTC+1, J.Ganesan wrote:
On drop event, I would like to get elemental.dom.Clipboard object from onDrop(com.google.gwt.event.dom.client.DropEvent event) method. The idea is to read the binary data and the name of the file being dropped onto a com.google.gwt.user.client.ui.ScrollPanel. How do I do this ? Apparently, it is not possible to mix Elemental and Widget.

DropEvent#getDataTransfer() returns a DataTransfer, which is a JavaScriptObject, so you can cast() it to element.js.dom.JsClipboard.

J.Ganesan

unread,
Dec 7, 2012, 7:05:30 AM12/7/12
to google-we...@googlegroups.com
Thanks Broyer. It works.

J.Ganeasn
Reply all
Reply to author
Forward
0 new messages