Multiple sensitive windows.

Emma

Member
The scenario i have is as follows:

Main.w can run multiple programs. Each program can only have one instance of itself running at a particular time.

from main.w, we run child1.w

this program allows the user to add, update or view particulars.
in this instance, the user must select a personnel record already in the database, and then select a current address record too. What i want the user to be able to do is in the add mode, select a button to allow them to create a new personnel record from within this program. I have done this, using windows, but i want to implement the dialog box functionality. What i want is once the user has selected to create a new personnel record, to assign child1.w sensitive = false, but also main.w sensitive = false. how would i do this?

Emma.
 

dkellgren

Member
I think this may be what you want...?...

CURRENT-WINDOW:SENSITIVE = FALSE.
RUN child2.w. /* which is the add personel DIALOG-BOX */
CURRENT-WINDOW:SENSITIVE = TRUE.

Current-Window:sensitive will set the sensitivity of child1.

You can also use current-window:visible = false/true to "hide" the window if you desire.

-dk-
 

Emma

Member
Originally posted by dkellgren
I think this may be what you want...?...

CURRENT-WINDOW:SENSITIVE = FALSE.
RUN child2.w. /* which is the add personel DIALOG-BOX */
CURRENT-WINDOW:SENSITIVE = TRUE.

Current-Window:sensitive will set the sensitivity of child1.

You can also use current-window:visible = false/true to "hide" the window if you desire.

-dk-

Thanks for the reply, but maybe i didnt explain myself very well. I have already got the running of the child2.w, whilst causing child1.w to be sensitive, or not. The problem i have is that none of them are dialog boxes, they are all windows. what i want is to be able to also set the main.w as sensitive = false, at the same time as child1.w. Is this possible??
 

dkellgren

Member
Does this solve your situation:

Get the handle of main.w (when you first run it) and then pass that handle along to child1 (either through a shared var or a parameter).

Then when you run child2, you can do that same sensitive attribute to that handle variable (and then with child1 too).

Main.w:
def new shared var MainWinHDL as handle.

MainWinHDL = c-win:handle. /* where c-win is the "name" of the window */

RUN Child1.w.

- - - - - - - - - - -
Child1.w:
def shared var MainWinHDL as handle.

/* on choose of run child2 button (or however) */
MainWinHDL:sensitive = fasle.
child1:sensitive = false.
run child2.w.
child1:sensitive = true.
MainWinHDL:sensitive = true.

-dk-
 
Emma,

another approach is to a "PUBLISH" and subscribe the first 2 windows to that statement.

Or, you can have the first beeing subscribed to statement in handle of second screen, do a publish again to the first window...


Mail me if you need further help.
 
Top