opensubscriber
   Find in this group all groups
 
Unknown more information…

p : pykde@mats.imk.fraunhofer.de 6 March 2007 • 12:29AM -0500

[PyKDE] KHTML method returning null
by Paul Giannaros

REPLY TO AUTHOR
 
REPLY TO GROUP




The documentation for KHTML's DOM::Document::getElementById (
http://api.kde.org/3.5-api/kdelibs-apidocs/khtml/html/classDOM_1_1Document.html#a20 )
show's that the method returns null when an element in the webpage by the
given ID hasn't been found. I would have thought that would have mapped to
Python's None, but instead I'm getting a khtml.DOM.Element. Whenever I try to
call a method on it, my application crashes with "terminate called after
throwing an instance of 'DOM::DOMException'".
Firstly, is this intended behaviour? Secondly, is there any way that I can
check if the return value from that call is a valid object? Maybe there is
something you can do with the sip module? (though I can't see anything in the
docs)

Thanks,
Paul

_______________________________________________
PyKDE mailing list    PyKDE@mats...
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.