Date: 3 Mar 2004 11:30:40 -0800
Message-ID: <32fe19ad.0403031130.6acce913_at_posting.google.com>
Hi,
[Quoted] I'm using Oracle Forms 5.0, but I guess my question should not be related to a certain version.
[Quoted] [Quoted] I have declared a package (not in the database, but in the Form-Builder under 'Program Units'):
PACKAGE thisform
IS
TYPE t_integer IS TABLE OF NUMBER(1) INDEX BY BINARY_INTEGER;
- Type safe variables that we need only in this form v_imp_radio t_integer;
- Next 2 are needed to check if fields in file are the same
- as the user has selected with the position radio buttons n_selected NUMBER(2); n_fields NUMBER(2); END;
IS
BEGIN
- initialise package variables
- "shadow" state of the radio buttons in F_IMP_COLUMNS v_imp_radio(1) := 1; -- id selector v_imp_radio(2) := 1; -- unit selector v_imp_radio(3) := -1; -- origin selector
n_selected := 8;
n_fields := 0;
END;
I use them to keep track of the of 3 "on-off" radio-button groups
on the control block F_IMP_COLUMNS. If I say "control" block, I
mean its items are not associated with any database object.
[Quoted] If this would be a database stored package, the scope would be clear: "The first time I use a function/procedure/variable of this package, the package is loaded into Global-Area and the intialisation code between BEGIN and END of the package body is executed." Then the package variables will be valid until my session ends, until I log out.
But now my Application consists of multiple forms and at runtime I do load other forms and unload this one with the package (I use 'New_Form' [Quoted] to do this) and later on the user may come back to this form.
[Quoted] [Quoted] What happens to my package variables, when the form is unloaded? [Quoted] Do they persist somewhere in the shared global area?
[Quoted] Would they be persistent if I would move the package into a library?
[Quoted] Basically I don't care for persistence, I would rather like it if those package variables have the liftime of the form. Well, the package variables were in my first attempt just items in a hidden datablock, but then I realised that I would need a PL/SQL table and I couldn't use a block anymore.
[Quoted] [Quoted] Any hints, maybe how to find something about that kind of background [Quoted] handling in the Forms documentation, are welcome ...
Thanks, Rolf Received on Wed Mar 03 2004 - 20:30:40 CET