On Apr 19, 2014 3:48 PM, "Clavier" <bachcalv...@gmail.com> wrote: > > Hi, > > I encountered an error while using the drag and drop library. I tested the DND test example (https://github.com/pyjs/pyjs/tree/master/examples/dnd), and the same error was raised: > > Traceback (most recent call last): > File "DNDTest.py", line 990, in <module> > j.add(DNDDemos()) > File "DNDTest.py", line 51, in __init__ > self.add(NewSchool()) > File "DNDTest.py", line 213, in __init__ > self.drag_widget = DragWidget1() > File "DNDTest.py", line 98, in __init__ > DragWidget.__init__(self) > File "E:\download\software\python\pyjs-pyjs-07f54ad\library\pyjamas\ui\DragWid > get.py", line 73, in __init__ > self.makeDraggable() > File "E:\download\software\python\pyjs-pyjs-07f54ad\library\pyjamas\ui\DragWid > get.py", line 49, in makeDraggable > makeDraggable(self) > File "E:\download\software\python\pyjs-pyjs-07f54ad\library\pyjamas\dnd\__init > __.py", line 19, in makeDraggable > DOM.setAttribute(element, 'draggable', True) > File "E:\download\software\python\pyjs-pyjs-07f54ad\library\pyjamas\DOM.py", l > ine 827, in setAttribute > setattr(element, attribute, value) > File "C:\Python27\lib\site-packages\comtypes\client\lazybind.py", line 190, in > __setattr__ > put = self.__bind(name, DISPATCH_PROPERTYPUT) > File "C:\Python27\lib\site-packages\comtypes\client\lazybind.py", line 107, in > __bind > descr = self._tcomp.Bind(name, invkind)[1] > File "C:\Python27\lib\site-packages\comtypes\typeinfo.py", line 361, in Bind > raise NameError("Name %s not found" % name) > NameError: Name draggable not found > > This error appears only in pyjd, but not in a webbrower version. Is the drag and drop library not matured enough? Please let me know if you have an idea about how to fix the error.
pyjd for win is setup here: https://github.com/pyjs/pyjs/blob/master/pyjs/runners/mshtml.py#L407 ...and here: https://github.com/pyjs/pyjs/blob/master/pyjs/runners/mshtml.py#L270 ...and is mostly just sets up a pass through to a comtypes library object (as evidenced by traceback) . The problem seems the target object (IWebBrowser2?) does not implement draggable, or, at the very least, does not have said attribute. You'd need to review the appropriate interfaces in MS docs, or explore the API from an interactive session (if possible), for possible workarounds/alternatives. -- C Anthony -- --- You received this message because you are subscribed to the Google Groups "Pyjs.org Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to pyjs-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.