Here's a simple version of what we do.

First, you want a general method of  finding at runtime a reference to the tab
control on which the current tab page sits:

 // of_getparentTab( ref oTab type u_tab )
 boolean bRet = True
 powerObject lpoParent, lpoPrevParent
 // Loop to get the parent of this object.
 lpoParent = this.GetParent()
 Do While lpoParent.TypeOf() <> Tab! And IsValid( lpoParent )
  lpoPrevParent = lpoParent
  lpoParent = lpoParent.getParent()
 Loop
 If Not IsValid( lpoParent ) Then
  SetNull( oTab )
  bRet = False
 Else
  oTab = lpoParent
 End If
 Return bRet

Next, you want all pages to be objects with the same inheritance � say, u_my_tabPg
which inherits in turn from u_tabPg. Then having found the parent tab with a call to
of_getParentTab(), you can find the required tab page instance of u_my_tabPg in
oTab�s control array as oTab.control[ N ] where N is the number of the desired tab
page.

So, if you want something from a DW on tab page 3 �

 u_tab oTab
 u_my_tabPg oTabPg
 u_dw oDw
 int iTabPage = 3  // tab page 3

 If of_getParent( oTab ) Then
  oTabPg = oTab.control[ iTabPage ]
  oDw = oTabPg.u_name_of_DwControl
  value = oDw.getItem� etc
 End If

As you can see, this can be generalised further by giving each page an instance array
of its own DW controls, and turning the above code snippet into a parameterised
method.

HTH

Peter Brawley

--------

"Theisen, Timothy J." wrote:

> I have a w_sheet, with a u_tab, with several u_tabpg, each tab page has a
> u_dw datawindow.
>
> While processing a script in tabpg2.dw2,  I need to get a column value from
> a row in u_tabpg1.dw1  ...
> i.e. column data from another tabpg datawindow.
>
> What is the most effective way to get data from 1 tabpg/dw to another
> tabpg/dw ... thanks in advance.
> > [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> > A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE:   help pfcsig
> > SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]

> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE:   help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]
> [EMAIL PROTECTED] HOSTED BY IIGG, INC. FOR HELP WITH LIST SERVE COMMANDS, ADDRESS
> A MESSAGE TO [EMAIL PROTECTED] WITH THE FOLLOWING MESSAGE:   help pfcsig
> SEND ALL OTHER INQUIRES TO [EMAIL PROTECTED]

Reply via email to