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.

Enumerated data types

2 posts in Objects Last posting was on 2005-08-22 15:11:29.0Z
kaaposc Posted on 2005-08-22 08:29:11.0Z
From: kaaposc <kaaposc@gmail.com>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Enumerated data types
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: 159.148.238.253
Message-ID: <43098cd4$1@forums-2-dub>
X-Original-Trace: 22 Aug 2005 01:29:08 -0700, 159.148.238.253
Lines: 21
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 22 Aug 2005 01:29:09 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 22 Aug 2005 01:29:11 -0700
X-Trace: forums-1-dub 1124699351 10.22.108.75 (22 Aug 2005 01:29:11 -0700)
X-Original-Trace: 22 Aug 2005 01:29:11 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8538
Article PK: 735761

Hello!

PowerBuilder manual tells one cannot create his own custom enumerated
data types, so constants must be used instead. :( But what are
EnumerationDefinition objects for? I tried to create new object, but
with few success:

<code>

enumerationdefinition ed_test

ed_test = create enumerationdefinition // here was break point
MessageBox ('info on ed_test', 'name property: ' + ed_test.name)

</code>

MessageBox did not pop. Debugger showed box-with-plus near local
variable ed_test after create statement. when I tried to view ed_test
properties, PB crushed with "cannot read memory" error :)

any ideas?


Jason 'Bug' Fenter Posted on 2005-08-22 15:11:29.0Z
From: Jason 'Bug' Fenter <fenterbug@hotmail.com>
User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Enumerated data types
References: <43098cd4$1@forums-2-dub>
In-Reply-To: <43098cd4$1@forums-2-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: pool-71-96-132-217.dfw.dsl-w.verizon.net
Message-ID: <4309eb1f$1@forums-2-dub>
X-Original-Trace: 22 Aug 2005 08:11:27 -0700, pool-71-96-132-217.dfw.dsl-w.verizon.net
Lines: 34
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 22 Aug 2005 08:11:28 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 22 Aug 2005 08:11:29 -0700
X-Trace: forums-1-dub 1124723489 10.22.108.75 (22 Aug 2005 08:11:29 -0700)
X-Original-Trace: 22 Aug 2005 08:11:29 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8539
Article PK: 735763


kaaposc wrote:
> Hello!
>
> PowerBuilder manual tells one cannot create his own custom enumerated
> data types, so constants must be used instead. :( But what are
> EnumerationDefinition objects for? I tried to create new object, but
> with few success:
>
> <code>
>
> enumerationdefinition ed_test
>
> ed_test = create enumerationdefinition // here was break point
> MessageBox ('info on ed_test', 'name property: ' + ed_test.name)
>
> </code>
>
> MessageBox did not pop. Debugger showed box-with-plus near local
> variable ed_test after create statement. when I tried to view ed_test
> properties, PB crushed with "cannot read memory" error :)
>
> any ideas?

The EnumerationDefinition object provides a bit of reflection. It can't
be used (yet?) to create your own enumerations. IIRC, they are adding
that feature soon. See http://www.techno-kitten.com

--
Some informative links:
news:news.announce.newusers
http://members.fortunecity.com/nnqweb/
http://www.catb.org/~esr/faqs/smart-questions.html
http://www.caliburn.nl/topposting.html
http://www.netmeister.org/news/learn2quote.html