Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Dynamic Function in Object luw PFC

3 posts in Appeon (partner product) Last posting was on 2012-01-12 22:37:08.0Z
Christian Diaz Posted on 2012-01-11 23:20:22.0Z
From: Christian Diaz <cjdiaz@motovalle.com>
Reply-To: cjdiaz@motovalle.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
Newsgroups: sybase.public.appeon
Subject: Dynamic Function in Object luw PFC
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f0e1936@forums-1-dub>
Date: 11 Jan 2012 15:20:22 -0800
X-Trace: forums-1-dub 1326324022 10.22.241.152 (11 Jan 2012 15:20:22 -0800)
X-Original-Trace: 11 Jan 2012 15:20:22 -0800, vip152.sybase.com
Lines: 14
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2855
Article PK: 21914

Hi,

The object pfc_n_cst_luw has the function of_update and this function
contains the sentence
li_rc = lpo_tocheck.Function Dynamic of_Update (ab_accepttext,
ab_resetflag, lpo_updaterequestor).

In Appeon doesn't work but in c/s works fine.
Appeon does not support dynamic functions?

I've downloaded from CodeXchange "PFC / PFC / Releases / 10.5 / Appeon -
Appeon PFC compliant release of the code" and I'm using it.

What can I do ? The Object luw is critical in PFC.


Steven Posted on 2012-01-12 07:47:51.0Z
Sender: 7401.4f0e8fae.1804289383@sybase.com
From: steven
Newsgroups: sybase.public.appeon
Subject: Re: Dynamic Function in Object luw PFC
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4f0e9027.7418.1681692777@sybase.com>
References: <4f0e1936@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 11 Jan 2012 23:47:51 -0800
X-Trace: forums-1-dub 1326354471 172.20.134.41 (11 Jan 2012 23:47:51 -0800)
X-Original-Trace: 11 Jan 2012 23:47:51 -0800, 172.20.134.41
Lines: 68
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2856
Article PK: 13626

Hi Christian,

Since the Dynamically calling overloaded function of an
uncertain object is unsupported in Appeon, please modify
this function to the following scripts.
Change the Code to:

u_dw ldw_update
n_ds lds_update
u_lvs llvs_update
u_tvs ltvs_update
if AppeonGetClientType( ) = 'PB' then
If lb_defined then
li_rc = lpo_tocheck.Function Dynamic of_Update
(ab_accepttext, ab_resetflag, lpo_updaterequestor)
if li_rc < 0 Then Return -1
Continue
End if
else
if lb_defined then
Choose Case Typeof ( lpo_tocheck)
Case DataWindow!
ldw_update = lpo_tocheck
li_rc = ldw_update.of_Update
(ab_accepttext, ab_resetflag, lpo_updaterequestor)
if li_rc < 0 then Return -1
Continue
Case ListView!
llvs_update = lpo_tocheck
li_rc = llvs_update.of_Update (ab_accepttext,
ab_resetflag, lpo_updaterequestor)
If li_rc < 0 Then return -1
Continue
Case TreeView!
ltvs_update = lpo_tocheck
li_rc= ltvs_update.of_Update (ab_accepttext,
ab_resetflag, lpo_updaterequestor)
if li_rc < 0 Then return -1
Continue
Case DataStore!
lds_update = lpo_tocheck
li_rc= lds_update.of_Update (ab_accepttext,
ab_resetflag, lpo_updaterequestor)
if li_rc < 0 Then return -1
Continue
End choose
End if
end if

You need also to modify this script.
Calling the SQLPreview event by Update or ReselectRow
functions is unsupported.
Location: Of_setupdatestyle function of the
Pfc_n_cst_dwsrv_linkage object in pfcdwsrv.pbl

Add the following Code:

if AppeonGetClientType( ) <> 'PB' then
if ai_style = TOPDOWN_BOTTOMUP then
ai_style = BOTTOMUP
end if
if ai_style = BOTTOMUP_TOPDOWN then
ai_style = BOTTOMUP
end if
end if

Regards,
Steven


Christian Diaz Posted on 2012-01-12 22:37:08.0Z
From: Christian Diaz <cjdiaz@motovalle.com>
Reply-To: cjdiaz@motovalle.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
Newsgroups: sybase.public.appeon
Subject: Re: Dynamic Function in Object luw PFC
References: <4f0e1936@forums-1-dub> <4f0e9027.7418.1681692777@sybase.com>
In-Reply-To: <4f0e9027.7418.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f0f6094@forums-1-dub>
Date: 12 Jan 2012 14:37:08 -0800
X-Trace: forums-1-dub 1326407828 10.22.241.152 (12 Jan 2012 14:37:08 -0800)
X-Original-Trace: 12 Jan 2012 14:37:08 -0800, vip152.sybase.com
Lines: 217
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2857
Article PK: 21916

Steven,

The complete script is

==================================================================================
Any la_rc
Integer li_max
Integer li_i
Integer li_rc
String ls_args[]
Boolean lb_defined
PowerObject lpo_tocheck
PowerObject lpo_updaterequestor

UserObject luo_control
tab ltab_control
window lw_control
DataWindow ldw_nonpfc
DataStore lds_nonpfc

// If requested use the assist funtionality.
If ib_assist Then
of_Assist(is_instancename+'.of_Update('+of_GetClassNames(apo_control)+')')
End If

If UpperBound(apo_control) = 0 Then Return NO_ACTION

// Set up arguments for MetaClass calls.
ls_args = {'boolean', 'boolean', 'powerobject'}

// Determine the object to pass in as the requestor.
If IsValid(ipo_updaterequestor) Then
lpo_updaterequestor = ipo_updaterequestor
Else
lpo_updaterequestor = this
End If

// Loop thru all the objects
li_max = UpperBound (apo_control)
For li_i = 1 to li_max
lpo_tocheck = apo_control[li_i]
If IsNull(lpo_tocheck) or Not IsValid(lpo_tocheck) Then Continue

Choose Case TypeOf ( lpo_tocheck )

// Windows!, Tabs!, and UserObjects! can either be SelfUpdatingObjects
(SUO) or
// they can be controls which may be holding SelfUpdatingObjects.
// If they are found to be SUO then they will treated as such, if not
their
// respective control array will be traversed in search of other SUOs.

Case Window!
If Not of_IsSelfUpdatingObject (lpo_tocheck) Then
// Test for Window Controls (which may contain SelfUpdatingObjects)
lw_control = lpo_tocheck
li_rc = This.of_Update ( lw_control.control, ab_accepttext,
ab_resetflag )
If li_rc < 0 Then Return -1
Continue
End If

Case Tab!
If Not of_IsSelfUpdatingObject (lpo_tocheck) Then
// Test for Tab Controls (which contain TabPages which may contain
SelfUpdatingObjects)
ltab_control = lpo_tocheck
li_rc = This.of_Update ( ltab_control.control, ab_accepttext,
ab_resetflag )
If li_rc < 0 Then Return -1
Continue
End If

Case UserObject!
If Not of_IsSelfUpdatingObject (lpo_tocheck) Then
// Test for UserObjects (which may contain SelfUpdatingObjects)
luo_control = lpo_tocheck
li_rc = This.of_Update ( luo_control.control, ab_accepttext,
ab_resetflag )
If li_rc < 0 Then Return -1
Continue
End If

End Choose

// -- An object which 'may' be a SUO has been encountered. --

// Determine if the SUO type is one the service has been asked to process.
If Len (is_typetoprocess) > 0 Then
If Pos (is_typetoprocess, of_GetType(lpo_tocheck)) = 0 Then
// Not a SUO type the service has been asked to process.
Continue
End If
End If

// Check/Perform for SelfUpdatingObject Functionality.
///////////////////////////// APPEON BEGIN ////////////////////////////
//<Modification reason> The ClassDefinition property for the
PowerObject object is unsupported.

//lb_defined = inv_metaclass.of_isFunctionDefined &
// (lpo_tocheck.ClassDefinition, "of_Update", ls_args)

If lpo_tocheck.TriggerEvent("pfc_descendant") = 1 Then
lb_defined = True
Else
lb_defined = False
End If

///////////////////////////// APPEON END //////////////////////////////

If lb_defined Then
li_rc = lpo_tocheck.Function Dynamic of_Update (ab_accepttext,
ab_resetflag, lpo_updaterequestor) // =======>>>>>> Here Is Doesn't work
in Appeon

If li_rc < 0 Then Return -1
Continue
End If

// Handle NonPFC DataWindows/DataStores.
If TypeOf (lpo_tocheck) = DataWindow! Then
ldw_nonpfc = lpo_tocheck
If ldw_nonpfc.Update (ab_accepttext, ab_resetflag) < 0 Then
// Visual notification is not displayed by PFC. Left up to the NonPFC
// object to process.
Return -1
End If
ElseIf TypeOf (lpo_tocheck) = DataStore! Then
lds_nonpfc = lpo_tocheck
If lds_nonpfc.Update (ab_accepttext, ab_resetflag) < 0 Then
// Visual notification is not displayed by PFC. Left up to the NonPFC
// object to process.
Return -1
End If
End If
Next

// All updates were successful.
Return 1
==================================================================================

The question is how can I do to use luw in appeon ? if I use the
function AppeonGetClientType() to check if is PB o WEB, what I must to
do if "AppeonGetClientType() = "PB" is false ?


El 12/01/2012 02:47 a.m., steven escribió:

> Hi Christian,
>
> Since the Dynamically calling overloaded function of an
> uncertain object is unsupported in Appeon, please modify
> this function to the following scripts.
> Change the Code to:
>
> u_dw ldw_update
> n_ds lds_update
> u_lvs llvs_update
> u_tvs ltvs_update
> if AppeonGetClientType( ) = 'PB' then
> If lb_defined then
> li_rc = lpo_tocheck.Function Dynamic of_Update
> (ab_accepttext, ab_resetflag, lpo_updaterequestor)
> if li_rc< 0 Then Return -1
> Continue
> End if
> else
> if lb_defined then
> Choose Case Typeof ( lpo_tocheck)
> Case DataWindow!
> ldw_update = lpo_tocheck
> li_rc = ldw_update.of_Update
> (ab_accepttext, ab_resetflag, lpo_updaterequestor)
> if li_rc< 0 then Return -1
> Continue
> Case ListView!
> llvs_update = lpo_tocheck
> li_rc = llvs_update.of_Update (ab_accepttext,
> ab_resetflag, lpo_updaterequestor)
> If li_rc< 0 Then return -1
> Continue
> Case TreeView!
> ltvs_update = lpo_tocheck
> li_rc= ltvs_update.of_Update (ab_accepttext,
> ab_resetflag, lpo_updaterequestor)
> if li_rc< 0 Then return -1
> Continue
> Case DataStore!
> lds_update = lpo_tocheck
> li_rc= lds_update.of_Update (ab_accepttext,
> ab_resetflag, lpo_updaterequestor)
> if li_rc< 0 Then return -1
> Continue
> End choose
> End if
> end if
>
> You need also to modify this script.
> Calling the SQLPreview event by Update or ReselectRow
> functions is unsupported.
> Location: Of_setupdatestyle function of the
> Pfc_n_cst_dwsrv_linkage object in pfcdwsrv.pbl
>
> Add the following Code:
>
> if AppeonGetClientType( )<> 'PB' then
> if ai_style = TOPDOWN_BOTTOMUP then
> ai_style = BOTTOMUP
> end if
> if ai_style = BOTTOMUP_TOPDOWN then
> ai_style = BOTTOMUP
> end if
> end if
>
> Regards,
> Steven