Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ancestor Object function call

Status
Not open for further replies.

markv105

Programmer
Aug 8, 2002
11
CA
Hi everyone,

I have a tab_control_x which is descended from tab_control_y. I also have tab_control_x.uf_save() and tab_control_y.uf_save(). When I first created tab_control_x
the uf_save() function did not return anything even though it is supposed to return an int. The ancestor uf_save() was called. Then I added some code to this and it broke.

Now I have to do a Super::uf_save() followed by a return 1
in order to do the same thing I was doing before.

Does anyone have any clue about this?

Thanks very much,

Mark
 
Hi,

This behavior is typical to native and user events in PowerBuilder. Remember although ItemChanged! returns a numeric value, you don't have to return a value from it even if you write some script in it? Try the same with a user-defined event and it fails - it needs a return value in "all" situations if you place any code in it and runs into an error if it cannot find one at runtime!!

PowerBuilder functions work at the current level of validation. If the current level requires you to return a value, it needs a value to be returned. Further, I noticed in earlier versions, if there is no code in the ancestor script, the return value was not required at the descendant/current level.

Regards,

--
PowerObject!
-----------------------------------------
PowerBuilder / PFC Developers' Group
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top