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.

DDPLB Object Manipulation

2 posts in Objects Last posting was on 2004-06-30 16:42:20.0Z
Nathan Pralle Posted on 2004-06-30 16:36:27.0Z
From: Nathan Pralle <npralleSPAMMENOT@creativesolutionsunlimited.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: DDPLB Object Manipulation
Message-ID: <MPG.1b4ca8865c200c3989685@forums.sybase.com>
Organization: Creative Solutions Unlimited
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2061
NNTP-Posting-Host: 12-214-83-85.client.mchsi.com
X-Original-NNTP-Posting-Host: 12-214-83-85.client.mchsi.com
Date: 30 Jun 2004 09:36:27 -0700
X-Trace: forums-1-dub 1088613387 12.214.83.85 (30 Jun 2004 09:36:27 -0700)
X-Original-Trace: 30 Jun 2004 09:36:27 -0700, 12-214-83-85.client.mchsi.com
Lines: 37
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7952
Article PK: 735222

Greetings.

I have a dropdownpicturelistbox control on a window that has several
hundred entries (yeah, I know...impressive). It is populated each time
the window opens by a script that loads up a configuration file and then
AddPicture()'s each of the entries into the listbox. This takes A Long
Time(tm).

I was thinking today that I could streamline the process by somehow
storing that ddplb object as a global in the program and having it only
load once when the window is first accessed. After that, I'd simply
assign the global copy to the specific ddplb control on the window and
Voila! instant control w/o waiting for the load.

I'm unsure how to do this, exactly. I know I can create non-visual
objects in memory, but this is a visual object. What I've tried so far
is creating a global variable of type 'dropdownpicturelistbox'. When
the window first opens (controlled by a boolean variable), the loading
process does a CREATE (variable=CREATE dropdownpicturelistbox) and then
goes through and populates this global object with the pictures and
text. That works fine.

However, when I try to assign the variable, that doesn't work so well
(ddplb_on_the_window = global_ddplb). Rather, that works...but no
pictures and no text appears, like it didn't transfer the items I
loaded.

I'm sure I'm doing something wrong and would love the help of anyone who
has (essentially) stored a visual object non-visually for use in more
than one place in the app...or in my case, loaded it once and then
reused it again and again to cut down on processing time.

PowerBuilder 9.0.1 Build 7171
Windows 2000 Pro SP4

Thanks,
Nathan Pralle


Philip Salgannik Posted on 2004-06-30 16:42:20.0Z
Sender: 2005.40e2dd4b.1804289383@sybase.com
From: Philip Salgannik
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: DDPLB Object Manipulation
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <40e2ed6c.262a.1681692777@sybase.com>
References: <MPG.1b4ca8865c200c3989685@forums.sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 30 Jun 2004 09:42:20 -0700
X-Trace: forums-1-dub 1088613740 10.22.241.41 (30 Jun 2004 09:42:20 -0700)
X-Original-Trace: 30 Jun 2004 09:42:20 -0700, 10.22.241.41
Lines: 50
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:7953
Article PK: 735221

First of all you CAN NOT use CREATE on visual controls, only
OpenUserObject them, so this whole idea can't work.

Where are the pictures stored?
You might be better off using a datawindow with a dddw
column instead of DDPLB, creating a global datastore that
you populate on the app opening, and then doing RowsCopy
from it into the dddw column when you need this shown...

> I have a dropdownpicturelistbox control on a window that
> has several hundred entries (yeah, I know...impressive).
> It is populated each time the window opens by a script
> that loads up a configuration file and then
> AddPicture()'s each of the entries into the listbox. This
> takes A Long Time(tm).
>
> I was thinking today that I could streamline the process
> by somehow storing that ddplb object as a global in the
> program and having it only load once when the window is
> first accessed. After that, I'd simply assign the global
> copy to the specific ddplb control on the window and
> Voila! instant control w/o waiting for the load.
>
> I'm unsure how to do this, exactly. I know I can create
> non-visual objects in memory, but this is a visual
> object. What I've tried so far is creating a global
> variable of type 'dropdownpicturelistbox'. When the
> window first opens (controlled by a boolean variable), the
> loading process does a CREATE (variable=CREATE
> dropdownpicturelistbox) and then goes through and
> populates this global object with the pictures and text.
> That works fine.
>
> However, when I try to assign the variable, that doesn't
> work so well (ddplb_on_the_window = global_ddplb).
> Rather, that works...but no pictures and no text appears,
> like it didn't transfer the items I loaded.
>
> I'm sure I'm doing something wrong and would love the help
> of anyone who has (essentially) stored a visual object
> non-visually for use in more than one place in the
> app...or in my case, loaded it once and then reused it
> again and again to cut down on processing time.
>
> PowerBuilder 9.0.1 Build 7171
> Windows 2000 Pro SP4
>
> Thanks,
> Nathan Pralle