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.

Creating Instance for User Objects Dynamically

3 posts in Objects Last posting was on 2006-07-23 20:25:45.0Z
Alex Posted on 2006-07-23 04:48:18.0Z
Sender: 6cba.44c2fdf7.1804289383@sybase.com
From: Alex
Newsgroups: sybase.public.powerbuilder.objects
Subject: Creating Instance for User Objects Dynamically
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <44c2ff92.6cc3.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 22 Jul 2006 21:48:18 -0700
X-Trace: forums-1-dub 1153630098 10.22.241.41 (22 Jul 2006 21:48:18 -0700)
X-Original-Trace: 22 Jul 2006 21:48:18 -0700, 10.22.241.41
Lines: 16
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8973
Article PK: 736169

Hi All,

I want to create instance for user object dynamically... is
it possible.... let me explain.... I want to create 100 user
object instances for that now I declared 100 user object
instances. I want to avoid this, because I know this is not
right way of doing this.

I can use array... is there any other alternative method
available for the same..

Thanks in advance for any help

Regards,

Alex


Brad Wery [TeamSybase] Posted on 2006-07-23 17:13:18.0Z
From: "Brad Wery [TeamSybase]" <bradwery@agricoreunited.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <44c2ff92.6cc3.1681692777@sybase.com>
Subject: Re: Creating Instance for User Objects Dynamically
Lines: 32
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
NNTP-Posting-Host: stnbmb01bbm-ac09-125-55.dial.mts.net
X-Original-NNTP-Posting-Host: stnbmb01bbm-ac09-125-55.dial.mts.net
Message-ID: <44c3ae2e@forums-1-dub>
Date: 23 Jul 2006 10:13:18 -0700
X-Trace: forums-1-dub 1153674798 204.112.125.55 (23 Jul 2006 10:13:18 -0700)
X-Original-Trace: 23 Jul 2006 10:13:18 -0700, stnbmb01bbm-ac09-125-55.dial.mts.net
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8974
Article PK: 736172

Alex,

I think an array would be your best bet. I use this method in one of my
applications and it seems to work quite well.

Then again, the function OpenUserObject adds the object reference to the
windows control array. You could always use this array to manage your open
users objects (which would be a little more work then having your own). If
you go this route then it wouldn't be necessary to declare any instance
variables. You would just pass a local variable to OpenUserObject.

Brad

<Alex> wrote in message news:44c2ff92.6cc3.1681692777@sybase.com...
> Hi All,
>
> I want to create instance for user object dynamically... is
> it possible.... let me explain.... I want to create 100 user
> object instances for that now I declared 100 user object
> instances. I want to avoid this, because I know this is not
> right way of doing this.
>
> I can use array... is there any other alternative method
> available for the same..
>
> Thanks in advance for any help
>
> Regards,
>
> Alex


Jason 'Bug' Fenter [TeamSybase] Posted on 2006-07-23 20:25:45.0Z
From: "Jason 'Bug' Fenter [TeamSybase]" <jason.fenter@teamsybase.com>
User-Agent: Thunderbird 1.5.0.4 (Windows/20060516)
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Creating Instance for User Objects Dynamically
References: <44c2ff92.6cc3.1681692777@sybase.com> <44c3ae2e@forums-1-dub>
In-Reply-To: <44c3ae2e@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: ppp-70-251-87-219.dsl.rcsntx.swbell.net
X-Original-NNTP-Posting-Host: ppp-70-251-87-219.dsl.rcsntx.swbell.net
Message-ID: <44c3db49$1@forums-1-dub>
Date: 23 Jul 2006 13:25:45 -0700
X-Trace: forums-1-dub 1153686345 70.251.87.219 (23 Jul 2006 13:25:45 -0700)
X-Original-Trace: 23 Jul 2006 13:25:45 -0700, ppp-70-251-87-219.dsl.rcsntx.swbell.net
Lines: 41
X-Authenticated-User: teamsybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8975
Article PK: 736171

For non-visual objects, an array is the way to go. For visual objects,
you have to use OpenUserObject() or you won't get anything to display.
To keep a reference of them, I would use an array, as Mr. Wery stated.
However, with 100 visual objects, you're going to start taxing your GDI
resources. If you are, indeed, dealing with visual objects, I'd
recommend finding a way to use a datawindow.

Brad Wery [TeamSybase] wrote:
> Alex,
>
> I think an array would be your best bet. I use this method in one of my
> applications and it seems to work quite well.
>
> Then again, the function OpenUserObject adds the object reference to the
> windows control array. You could always use this array to manage your open
> users objects (which would be a little more work then having your own). If
> you go this route then it wouldn't be necessary to declare any instance
> variables. You would just pass a local variable to OpenUserObject.
>
> Brad
>
> <Alex> wrote in message news:44c2ff92.6cc3.1681692777@sybase.com...
>> Hi All,
>>
>> I want to create instance for user object dynamically... is
>> it possible.... let me explain.... I want to create 100 user
>> object instances for that now I declared 100 user object
>> instances. I want to avoid this, because I know this is not
>> right way of doing this.
>>
>> I can use array... is there any other alternative method
>> available for the same..
>>
>> Thanks in advance for any help
>>
>> Regards,
>>
>> Alex
>
>