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 calls to overloaded functions

3 posts in Appeon (partner product) Last posting was on 2012-04-19 14:23:26.0Z
Mike S Posted on 2012-04-18 15:45:08.0Z
From: "Mike S" <M@M.com>
Subject: dynamic calls to overloaded functions
Newsgroups: sybase.public.appeon
User-Agent: XanaNews/1.18.1.6
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f8ee184@forums-1-dub>
Date: 18 Apr 2012 08:45:08 -0700
X-Trace: forums-1-dub 1334763908 10.22.241.152 (18 Apr 2012 08:45:08 -0700)
X-Original-Trace: 18 Apr 2012 08:45:08 -0700, vip152.sybase.com
Lines: 17
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2953
Article PK: 13671

The help states that dynamic calls to overloaded functions is not
supported. Is this unsupported for only user defined functions?

example:

powerobject adws_hdr (either a datastore or datawindow)


adws_hdr.dynamic GetItemString(al_hdr_row, "customer_name")


this works in appeon, yet getitemstring is an overloaded function (can
take either a string or a long for the column)


--


Marco Meoni Posted on 2012-04-18 21:32:48.0Z
From: Marco Meoni <mail@marcomeoni.com>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-US; rv:1.9.2.11) Gecko/20101013 Thunderbird/3.1.5
MIME-Version: 1.0
Newsgroups: sybase.public.appeon
Subject: Re: dynamic calls to overloaded functions
References: <4f8ee184@forums-1-dub>
In-Reply-To: <4f8ee184@forums-1-dub>
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: <4f8f3300$1@forums-1-dub>
Date: 18 Apr 2012 14:32:48 -0700
X-Trace: forums-1-dub 1334784768 10.22.241.152 (18 Apr 2012 14:32:48 -0700)
X-Original-Trace: 18 Apr 2012 14:32:48 -0700, vip152.sybase.com
Lines: 46
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2955
Article PK: 21967

Hi,
dynamic calling of overloaded functions of uncertain objects (e.g.
powerobject, parentwindow etc...) is unsupported.
For example, this doesn't work:

parentwindow.DYNAMIC wf_hello()
parentwindow.DYNAMIC wf_hello("hello Appeon")

But this does:

w_test.DYNAMIC wf_hello()
w_test.DYNAMIC wf_hello("Hello Appeon")

A barely acceptable workaround consists of testing beforehand the
Classname() of uncertain PB objects where overloading is applied and
then call the overloaded function on it. I mean:

Choose Case genericobject.ClassName()
Case "w_test"
w_test.DYNAMIC wf_hello()
w_test.DYNAMIC wf_hello("H
Case ...
[...]
End Choose

Cheers,
M.

On 4/18/12 5:45 PM, Mike S wrote:
> The help states that dynamic calls to overloaded functions is not
> supported. Is this unsupported for only user defined functions?
>
> example:
>
> powerobject adws_hdr (either a datastore or datawindow)
>
>
> adws_hdr.dynamic GetItemString(al_hdr_row, "customer_name")
>
>
> this works in appeon, yet getitemstring is an overloaded function (can
> take either a string or a long for the column)
>
>


Mike S Posted on 2012-04-19 14:23:26.0Z
From: "Mike S" <M@M.com>
Subject: Re: dynamic calls to overloaded functions
Newsgroups: sybase.public.appeon
References: <4f8ee184@forums-1-dub> <4f8f3300$1@forums-1-dub>
User-Agent: XanaNews/1.18.1.6
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4f901fde$1@forums-1-dub>
Date: 19 Apr 2012 07:23:26 -0700
X-Trace: forums-1-dub 1334845406 10.22.241.152 (19 Apr 2012 07:23:26 -0700)
X-Original-Trace: 19 Apr 2012 07:23:26 -0700, vip152.sybase.com
Lines: 54
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:2956
Article PK: 21969

thanks for the clarification and examples!

Marco Meoni wrote:

> Hi,
> dynamic calling of overloaded functions of uncertain objects (e.g.
> powerobject, parentwindow etc...) is unsupported. For example, this
> doesn't work:
>
> parentwindow.DYNAMIC wf_hello()
> parentwindow.DYNAMIC wf_hello("hello Appeon")
>
> But this does:
>
> w_test.DYNAMIC wf_hello()
> w_test.DYNAMIC wf_hello("Hello Appeon")
>
> A barely acceptable workaround consists of testing beforehand the
> Classname() of uncertain PB objects where overloading is applied and
> then call the overloaded function on it. I mean:
>
> Choose Case genericobject.ClassName()
> Case "w_test"
> w_test.DYNAMIC wf_hello()
> w_test.DYNAMIC wf_hello("H
> Case ...
> [...]
> End Choose
>
> Cheers,
> M.
>
>
> On 4/18/12 5:45 PM, Mike S wrote:
> > The help states that dynamic calls to overloaded functions is not
> > supported. Is this unsupported for only user defined functions?
> >
> > example:
> >
> > powerobject adws_hdr (either a datastore or datawindow)
> >
> >
> > adws_hdr.dynamic GetItemString(al_hdr_row, "customer_name")
> >
> >
> > this works in appeon, yet getitemstring is an overloaded function
> > (can take either a string or a long for the column)
> >
> >

--