2009/7/19 Glyph Lefkowitz <[email protected]>: > On Sun, Jul 19, 2009 at 6:55 PM, Juanjo Conti<[email protected]> wrote: >> I have notice that when an error occur in a LiveElement (lost >> connection or not handled exception in the server) an error message is >> displayed in the browser. Is there an explicit way to use this error >> showing mechanism to display errors from my application? This stuff >> seems not covered in Athena documentation. > > The error dialog you're noticing comes from > Nevow.Athena.PageWidget.showErrorDialog (which is defined in > Nevow/nevow/js/Nevow/Athena/__init__.js). > > The PageWidget is the root JavaScript class that controls everything > that's going on on the page. If you want to customize this, you > should subclass Nevow.Athena.PageWidget in your application, and > override showErrordDialog. On the Python side of things, you need to > subclass nevow.athena.LivePage, and set your subclass's jsClass > attribute to the name of your PageWidget subclass. [..]
Ok, but I don't actually need a customization, I'm just fine using the showErrorDialog. How can I acces the correct PageWidget instance? myLivePage.jsClass? So I can do myLivePage.jsClass.showErrorDialog(some params); right? > This could definitely be better documented. Can you contribute a > documentation patch that explains that stuff I just said? :-) As soon as I get something done, I'll contribute with doc. Thanks! -- Juanjo Conti _______________________________________________ Twisted-web mailing list [email protected] http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web
