Passing DataWindow by reference
Posted by Li Song on 26 April 2011 04:06 PM


Passing DataWindows by reference is unsupported. 


Define an instance variable and set its value as the data retrieved from the DataWindow, then pass this variable by reference to the function.

The same workaround should be used for passing DataWindows between two Tab controls in any window.  The modification made in the ancestor object has no effect on the child objects.  They should be modified separately.

Example #1

The original script:

ldws_status = tab_1.tabpage_h_list.dw_h_list.GetItemStatus(ll_current,0,primary!)
IF ldws_status = datamodified! or ldws_status = NotModified!  THEN

Re-write it using the following format:

ldws_status = idws_Status
idws_status = this.GetItemStatus(currentrow,0,Primary!)
IF idws_status = DataModified! or idws_status = NotModIfied!  THEN     

Example #2:

The original script:

ls_country = tab_1.tabpage_h_list.dw_h_list.getitemString(ll_current, "country_code")
ls_agent = tab_1.tabpage_h_list.dw_h_list.getitemString(ll_current, "stakeholder_code") this.retrieve(ls_country, ls_agent, gs_localdata)

Re-write it using the following format:

is_country = tab_1.tabpage_h_list.dw_h_list.getitemString(currentrow, "country_code")
is_agent = tab_1.tabpage_h_list.dw_h_list.getitemString(currentrow, "stakeholder_code")
this.retrieve(is_country, is_agent, gs_localdata)

(1 votes)
This article was helpful
This article was not helpful

Comments (0)
Post a new comment 

Please login if you wish to leave a comment about this article.

Help Desk Software by Kayako Fusion