Help with firing an event from a button

[email protected]
Newsgroups gmane.comp.gnu.enterprise.general
Message-ID <[email protected]>
Hello.

I'm trying making JUMPROWSUP from a button click. The pretended final
code is commented out; debugging code, not.

-------------------------------------------------

print "--- --- ---"
if self.findParentOfType('GFForm') != None:
   print "GFInstance found"
if self.findParentOfType('GFLayout') != None:
   print "GFLaout found"
if self.findParentOfType('GFPage') != None:
   print "GFPage found"
print "--- --- ---"

## Perform list page up
# form =  self.findParentOfType('GFForm')
# if form != None:
#   form.dispatchEvent('JUMPROWSUP');
	 
-------------------------------------------------

First Question. Is this a good approach ?

Second: Why can't I find the form object with findParentOfType()? should
I walk up myself thru the tree to find it?

Thanks in advance.
-- 
José Esteban
Granada - Spain
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.