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
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
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
Subject: DDPLB Object Manipulation
Organization: Creative Solutions Unlimited
Content-Type: text/plain; charset="iso-8859-15"
Date: 30 Jun 2004 09:36:27 -0700
X-Trace: forums-1-dub 1088613387 18.104.22.168 (30 Jun 2004 09:36:27 -0700)
X-Original-Trace: 30 Jun 2004 09:36:27 -0700, 12-214-83-85.client.mchsi.com
Xref: forums-1-dub sybase.public.powerbuilder.objects:7952
Article PK: 735222
From: Philip Salgannik
Subject: Re: DDPLB Object Manipulation
X-Mailer: WebNews to Mail Gateway v1.1t
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
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...