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.

TypeOf() using string instead of object possible?

6 posts in Objects Last posting was on 2008-05-05 04:53:43.0Z
Gwydion Posted on 2008-05-02 10:17:13.0Z
From: Gwydion <gwydion@oletros.info>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: TypeOf() using string instead of object possible?
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: <481aea29@forums-1-dub>
Date: 2 May 2008 03:17:13 -0700
X-Trace: forums-1-dub 1209723433 10.22.241.152 (2 May 2008 03:17:13 -0700)
X-Original-Trace: 2 May 2008 03:17:13 -0700, vip152.sybase.com
Lines: 2
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9672
Article PK: 736812

Can I know the type of an object if I only know its name?


Millard F. Brown III Posted on 2008-05-02 13:37:04.0Z
From: "Millard F. Brown III" <millard.brown@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <481aea29@forums-1-dub>
Subject: Re: TypeOf() using string instead of object possible?
Lines: 12
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.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <481b1900$1@forums-1-dub>
Date: 2 May 2008 06:37:04 -0700
X-Trace: forums-1-dub 1209735424 10.22.241.152 (2 May 2008 06:37:04 -0700)
X-Original-Trace: 2 May 2008 06:37:04 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9673
Article PK: 736813

You can use "rcreate using" to create an instance from the name and assign
it to a variable of type "PowerObject". Then you can query the PowerObject
using the ClassName() method.
--
Regards,
Millard [TeamSybase]

"Gwydion" <gwydion@oletros.info> wrote in message
news:481aea29@forums-1-dub...
> Can I know the type of an object if I only know its name?


"Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_ Posted on 2008-05-02 14:22:09.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <NO_SPAMMING_jason.fenter_@_teamsybase.com>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: TypeOf() using string instead of object possible?
References: <481aea29@forums-1-dub>
In-Reply-To: <481aea29@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: <481b2391$1@forums-1-dub>
Date: 2 May 2008 07:22:09 -0700
X-Trace: forums-1-dub 1209738129 10.22.241.152 (2 May 2008 07:22:09 -0700)
X-Original-Trace: 2 May 2008 07:22:09 -0700, vip152.sybase.com
Lines: 7
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9674
Article PK: 736814

I'm confused. Wouldn't the "name" be the "name of the class", as in: the
name *is* the type?

Gwydion wrote:
> Can I know the type of an object if I only know its name?


Millard F. Brown III Posted on 2008-05-02 14:47:04.0Z
From: "Millard F. Brown III" <millard.brown@teamsybase.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <481aea29@forums-1-dub> <481b2391$1@forums-1-dub>
Subject: Re: TypeOf() using string instead of object possible?
Lines: 21
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.3198
X-RFC2646: Format=Flowed; Response
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <481b2968$1@forums-1-dub>
Date: 2 May 2008 07:47:04 -0700
X-Trace: forums-1-dub 1209739624 10.22.241.152 (2 May 2008 07:47:04 -0700)
X-Original-Trace: 2 May 2008 07:47:04 -0700, vip152.sybase.com
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9675
Article PK: 736816

Hmm... good point.

But if the OP is referring to the variable name then
<variablename>.ClassName() is the answer.

--
Regards,
Millard [TeamSybase]

"Jason 'Bug' Fenter [TeamSybase]"

<NO_SPAMMING_jason.fenter_@_teamsybase.com> wrote in message
news:481b2391$1@forums-1-dub...
> I'm confused. Wouldn't the "name" be the "name of the class", as in: the
> name *is* the type?
>
>
>
> Gwydion wrote:
>> Can I know the type of an object if I only know its name?


Jeremy Lakeman Posted on 2008-05-03 13:19:33.0Z
From: Jeremy Lakeman <jeremy.lakeman@gmail.com>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: TypeOf() using string instead of object possible?
References: <481aea29@forums-1-dub>
In-Reply-To: <481aea29@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: <481c6665$1@forums-1-dub>
Date: 3 May 2008 06:19:33 -0700
X-Trace: forums-1-dub 1209820773 10.22.241.152 (3 May 2008 06:19:33 -0700)
X-Original-Trace: 3 May 2008 06:19:33 -0700, vip152.sybase.com
Lines: 11
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9676
Article PK: 736815


Gwydion wrote:
> Can I know the type of an object if I only know its name?

so you want;
typeof(variable)

except you don't actually have a variable, just a string with a class name?

classdefinition lc
lc = Findclassdefinition(ls_class_name)
lc.datatypeof


Gwydion Posted on 2008-05-05 04:53:43.0Z
From: Gwydion <gwydion@oletros.info>
User-Agent: Thunderbird 2.0.0.12 (Windows/20080213)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: TypeOf() using string instead of object possible?
References: <481aea29@forums-1-dub>
In-Reply-To: <481aea29@forums-1-dub>
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: <481e92d7$1@forums-1-dub>
Date: 4 May 2008 21:53:43 -0700
X-Trace: forums-1-dub 1209963223 10.22.241.152 (4 May 2008 21:53:43 -0700)
X-Original-Trace: 4 May 2008 21:53:43 -0700, vip152.sybase.com
Lines: 4
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9677
Article PK: 736817

Thanks to all of you

Best regards,
Iñaki