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.

Error accessing object functions

3 posts in Objects Last posting was on 2007-12-20 00:34:46.0Z
Rania Posted on 2007-07-31 20:50:18.0Z
Sender: 5ea3.46af9f55.1804289383@sybase.com
From: Rania
Newsgroups: sybase.public.powerbuilder.objects
Subject: Error accessing object functions
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46afa08a.5eb2.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 31 Jul 2007 13:50:18 -0700
X-Trace: forums-1-dub 1185915018 10.22.241.41 (31 Jul 2007 13:50:18 -0700)
X-Original-Trace: 31 Jul 2007 13:50:18 -0700, 10.22.241.41
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9392
Article PK: 736554

Hello,
I have an object embedded in my application that calls
functions automatically from the dll. some functions have
the same names as powerbuilder reserved words e.g

ole_1.Object.Event.button

The Event is a reserved word in Powerbuilder, so that line
fails. is there any way to override the reserved words or
maybe specificy aliases to the functions?


"John Olson [Team Sybase]" <john.olson Posted on 2007-12-14 17:21:05.0Z
From: "John Olson [Team Sybase]" <john.olson@nospam_teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <46afa08a.5eb2.1681692777@sybase.com>
Subject: Re: Error accessing object functions
Lines: 25
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: ip72-220-91-214.sd.sd.cox.net
X-Original-NNTP-Posting-Host: ip72-220-91-214.sd.sd.cox.net
Message-ID: <4762bb81$1@forums-1-dub>
Date: 14 Dec 2007 09:21:05 -0800
X-Trace: forums-1-dub 1197652865 72.220.91.214 (14 Dec 2007 09:21:05 -0800)
X-Original-Trace: 14 Dec 2007 09:21:05 -0800, ip72-220-91-214.sd.sd.cox.net
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9561
Article PK: 736720

Good question. Did you resolve this problem?

For external functions you can use ALIAS in the external definition to get
around this problem. For embedded OLE you may be able to use an ordinal to
identify which method to call.

Regards,
John

Team Sybase

<Rania> wrote in message news:46afa08a.5eb2.1681692777@sybase.com...
> Hello,
> I have an object embedded in my application that calls
> functions automatically from the dll. some functions have
> the same names as powerbuilder reserved words e.g
>
> ole_1.Object.Event.button
>
> The Event is a reserved word in Powerbuilder, so that line
> fails. is there any way to override the reserved words or
> maybe specificy aliases to the functions?


Jeremy Lakeman Posted on 2007-12-20 00:34:46.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Error accessing object functions
Date: Wed, 19 Dec 2007 16:34:46 -0800 (PST)
Organization: http://groups.google.com
Lines: 38
Message-ID: <5d989ba9-f48f-4986-a1c9-c293eb5ec432@i72g2000hsd.googlegroups.com>
References: <46afa08a.5eb2.1681692777@sybase.com> <4762bb81$1@forums-1-dub>
NNTP-Posting-Host: 203.8.163.252
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1198110887 27314 127.0.0.1 (20 Dec 2007 00:34:47 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 20 Dec 2007 00:34:47 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: i72g2000hsd.googlegroups.com; posting-host=203.8.163.252; posting-account=euaBtgoAAAC_vDxfsxmpMKlBxHaHpmRS
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11,gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 fly.essential.com.au:3128 (squid/2.5.STABLE8)
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!i72g2000hsd.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9566
Article PK: 736721

Yep there is.

oleobject lo_temp
lo_temp = ole_1.Object.Event.button

is translated by the compiler to something like:

oleobject lo_temp
lo_temp = ole_1.object.__get_attribute('Event', false)[implicit cast
to omobject] &
.__get_attribute('button', true)

The full list of hidden methods is:
public function any __invoke_method (readonly string a,
unsignedinteger b, readonly any c[], boolean d)
public function any __get_attribute (readonly string a, boolean b)
public subroutine __set_attribute(readonly string s, readonly any v)
public subroutine __set_attribute_item(readonly string s,
unsignedinteger ns, readonly long subs[], readonly any v)
public function any __get_attribute_item (readonly string s,
unsignedinteger ns, readonly long subs[], boolean b)

You can call these methods directly.
[insert standard disclaimer about using undocumented features that may
change in future]

> <Rania> wrote in messagenews:46afa08a.5eb2.1681692777@sybase.com...
> > Hello,
> > I have an object embedded in my application that calls
> > functions automatically from the dll. some functions have
> > the same names as powerbuilder reserved words e.g
>
> > ole_1.Object.Event.button
>
> > The Event is a reserved word in Powerbuilder, so that line
> > fails. is there any way to override the reserved words or
> > maybe specificy aliases to the functions?