Current-window

jmac13

Member
Hi all I'm using 10.2b,


I've got program where i run another program persistent. But I’m not sure what to do about the current-window or how it really works.


Does the current-window relate to the whole session or just to each program. So that messages go to the correct window. Or do you have to keep track of what the current-window is?

Thanks
 

RealHeavyDude

Well-Known Member
From the online help:

CURRENT-WINDOW system handle
A handle to the default window for the current ABL session. This window is the default parent for all frames, dialog boxes, alert boxes, and messages. Set or examine the attributes of the CURRENT-WINDOW handle to modify or get information on the current default window.
Syntax

CURRENT-WINDOW [ :attribute ]

attribute
An attribute of the CURRENT-WINDOW.
Attributes
The CURRENT-WINDOW handle has all the attributes of a window widget.
Notes
sblue.jpg
The default value of the CURRENT-WINDOW handle is the static session window referenced by the DEFAULT-WINDOW handle. You can change the default window for the current session by assigning the handle of a window to CURRENT WINDOW.


sblue.jpg
The IN WINDOW phrase allows you to explicitly assign a window as a parent for a frame, dialog box, alert box, or message.


sblue.jpg
In a character interface, the ACTIVE-WINDOW, CURRENT-WINDOW, and DEFAULT-WINDOW handles return the handle of the static window for the current ABL session.


sblue.jpg
The CURRENT-WINDOW attribute of a procedure allows you to specify a default window for the procedure block. The CURRENT-WINDOW attribute of a procedure overrides the CURRENT-WINDOW handle for the procedure block.


sblue.jpg
You can enable or disable the current window by changing CURRENT-WINDOW:SENSITIVE.


sblue.jpg
You can set the menu bar for the current window by assigning the handle of a menu bar to CURRENT-WINDOW:MENUBAR.


sblue.jpg
You can make the current window visible or invisible by changing the value of CURRENT-WINDOW:VISIBLE.


See also
ACTIVE-WINDOW system handle, DEFAULT-WINDOW system handle

[/QUOTE

The CURRENT-WINDOW is a system handle tied to the session.

Heavy Regards, RealHeavyDude.
 

jmac13

Member
cheers RHD


I did see that in the help but i also saw

Code:
[INDENT] CURRENT-WINDOW attribute
 A current window for the specified  procedure.
  [TABLE]
  [TR]
 [TD] Data type:  
[/TD]
 [TD="width: 100%"] HANDLE
[/TD]
[/TR]
[/TABLE]

  [TABLE]
  [TR]
 [TD] Access:  
[/TD]
 [TD="width: 100%"] Readable/Writeable
[/TD]
[/TR]
[/TABLE]

  [TABLE]
  [TR]
 [TD] Applies to:  
[/TD]
 [TD="width: 100%"] [URL="http://www.progresstalk.com/20dvref-Handles.19.27.html#330346"]Procedure object handle[/URL], [URL="http://www.progresstalk.com/20dvref-Handles.19.44.html#9578"]SOURCE-PROCEDURE system  handle[/URL], [URL="http://www.progresstalk.com/20dvref-Handles.19.46.html#9712"]TARGET-PROCEDURE system  handle[/URL], [URL="http://www.progresstalk.com/20dvref-Handles.19.48.html#9921"]THIS-PROCEDURE system  handle[/URL]
[/TD]
[/TR]
[/TABLE]

 Specifies and allows you to reset the  current window used to parent alert box, dialog box, or frame widgets for  the specified procedure. The default value is the Unknown value (?). Returns the Unknown value (?) for  a Web service procedure or proxy persistent procedure.
 If you set this attribute to the handle of a  window, this value takes precedence over the CURRENT-WINDOW handle to  provide the default window for parenting alert boxes, frames, and dialog boxes  created within the procedure.
 This attribute is especially useful for  creating and associating a unique current window with each instantiation of  a persistent procedure. For more information on persistent procedures, see the  [URL="http://www.progresstalk.com/16dvref-PR.15.67.html#11281"]RUN statement[/URL] reference  entry.

[/INDENT]

Which confused me... So reading from what you've quoted I’ve got to keep track of the current-window all the time...talk about pain in the backside
 
Top