OI Replacement for Window Common (OpenInsight 32-bit Specific)
At 24 MAY 2002 02:33:53PM Jim Bayne wrote:
In AREV, I frequently use WC_WI%, The current prompt number, to put up default values. Does anyone know what you can use to replace the WC_WI% function in OI?
At 24 MAY 2002 02:37PM [url=http://www.sprezzatura.com" onMouseOver=window.status=Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:
There is no prompt number, per se, however, the FOCUS property will tell you what control has focus.
Do you set all these defaults in one swoop? There should be an easy way to do this, if we know the basic format of your code.
At 24 MAY 2002 06:10PM Jim Bayne wrote:
I thought it should be easy as well. The program is set to run as the Default for each prompt. A default value gets returned if there is one for the current prompt. The program does not drop the defaults all at once and it only drops a default if the prompt/control is blank. Here's a sample from the AREV code:
CASE TEMPLATE=I.90'
BEGIN CASECASE WI=6; @ANS=@RECORDCASE WI=7; @ANS=@RECORDCASE WI=8; @ANS=@RECORDCASE WI=9; @ANS=@RECORDCASE WI=10; @ANS=@RECORDEND CASEI thought I could replace the above with something like this:
CASE @window=I_90'
wi=Get_Property(@window, 'FOCUS')BEGIN CASECASE WI=I_90.ADDRESS'; Set_Property('I_90.ADDRESS','TEXT', @RECORD)CASE WI=I_90.APT_NO'; Set_Property('I_90.APT','TEXT', @RECORD)CASE WI=I_90.CITY'; Set_Property('I_90.CITY','TEXT', @RECORD)CASE WI=I_90.STATE'; Set_Property('I_90.STATE','TEXT', @RECORD)CASE WI=I_90.ZIP'; Set_Property('I_90.ZIP','TEXT', @RECORD)END CASEHowever, When I run the program, wi is always blank.
Any ideas?
Jim
At 24 MAY 2002 07:53PM Richard Hunt wrote:
Jim,
I think, I think, this will work. Replace "@window" with "system".
Like this…
wi=Get_Property('SYSTEM', 'FOCUS')
At 24 MAY 2002 09:13PM [url=http://www.sprezzatura.com" onMouseOver=window.status= Click here to visit our web site?';return(true)]The Sprezzatura Group[/url] wrote:
Just checking - are you saying that the FOCUS property is always blank?
At 25 MAY 2002 01:29AM Jim Bayne wrote:
Thanks Richard. That was the first thing I tried.
At 25 MAY 2002 03:18PM Jim Bayne wrote:
Here's the test code I am working with. The program DFLT is called from the Default entry in control G28_CLIENT_NO in form G_28.
SUBROUTINE DFLT(code)
DECLARE FUNCTION POP, Get_Property, Utility, Set_Property
DECLARE SUBROUTINE MSG, Set_Property, Get_Property
*
* Default Program for all Forms
* Created 05/23/02
*
* Find out which control has focus
wi=Get_Property('SYSTEM','FOCUS')
msg(
:wi); * THEN DATA=@USER3,MV] IF DATA THEN @ANS=DATA END */ RETURN END </QUOTE> —- === At 25 MAY 2002 05:10PM Oystein Reigem wrote: === <QUOTE>Jim, I leave the Window Common stuff to the experts. Just a quick comment on your msg call: msg('':wi); * ←-This message returns blank. When message closed, error msg below returned *OIWIN_GOTFOCUS, line 2. Variable has not been assigned a vlaue. Use two arguments like msg( @Window, "Hello!" ) - Oystein - </QUOTE> View this thread on the forum...