Hey..
I use PyGTK to design a client interface for an application on ZOPE
server. I use xmlrpc to get results for queries and display them on
screen. However , when theres some error, the zope error is displayed
on the shell, and python exits from the callback function which had
that xmlrpc function call.
Whenever this happens, i would wish to show the user , a pop up error
message on the interface. But right now, since python exits out of the
callback function directly, i dont know where do i place the testing
if loop to check if there was an error and pop up an error. I ll pass
the program structure for better understanding.
class window
def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
............
............
............
view_list_combo = gtk.Combo()
............
def get_view_list(self, data = None):
............
............
result = server.getAll('Metatype) # xmlrpc
call to server
............
............
view_list_combo.entry.connect("activate",get_view_list,None)
............
............
Problem : If theres an error in the rpc call, it quits the function
alltogether. so.. cant set any test condition on value of result
within the function get_view_list.
If at all a test condition has to be kept , to pop up something on
error by checking the value of result, it will have to be placed at
the point where the control is transferred after the function is quit.
What could be done ?
Any help would be appreciated.
-- Saurabh
_______________________________________________
pygtk mailing list [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/