Re: Forms 4.5 item ids

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 1997/12/08
Message-ID: <881606012.15982_at_dejanews.com>#1/1


In article <01bd02e2$5d10f9e0$35a320cb_at_default>,   "Brian Membrey" <horsemth_at_mel.switch.net.au> wrote:
>
> As mentioned in previous posting, I'm trying to write a series of generic
> visual objects for Forms 4.5
>
> Many of the proposed objects need to dynamically address specific items or
> canvases when they are invoked.
>
> In soms cases, (calendar, progress bar), the users will invoke the object
> only occasionally and any overheards in finding item or canvas ids is
> minimal.
>
> But in others (eg an enhanced handling of items with LIST VALUES attached),
> the id retrieval is invoked each time the user enters the item and I'm
> concerned about the ensuing overheads
>
> Question Is there any way of storing an item id after it has been
> retrieved. I've tried assigning to text items, global variables and
> COPYing the ids to no avail .... every time, attempting to compile gives
> "expression is of the wrong type" errors ???

I just realized a few weeks ago that you can use pl/sql packages within a form or pll library. One of the features of a package is that you can create variables that keep their values within the package. This sounds like the perfect place for you to use one.

In the package initialization, you look up the id of your item or block, and store it in a static variable. Then on subsequent calls to the package, the lookup is already done.

While I haven't tried this except as an experiment, it should work for you. The package stays active as long as you remain in the specific form. When you do a new_form, the package is erased and is reinitialized the next time you use it.

Regards, Steve Cosner http://members.aol.com/stevec5088 Site of QA, a free downloadable utility form to display and update any table.

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Mon Dec 08 1997 - 00:00:00 CET

Original text of this message