Dialog Box / Parent (None Specified)
At 28 JAN 1999 09:51:42AM Don Miller wrote:
Is there any way for a dialog box to "look" at the contents of controls in its Parent? Probably a simple thing, I'm stumped.
Thanks
Don Miller
C3 Inc.
At 28 JAN 1999 01:02PM Arjun VarmaRevelation wrote:
Are you using the CREATE_DIALOG Function to bring up the Dialog Box? If you are then you could pass the values from the controls on the form to it.
At 28 JAN 1999 03:05PM Don Miller wrote:
Arjun:
I know I can pass data to the Create Event or use @USERn to hold information. The problem is that the underlying form has over 50 controls on it. While I'm in the Dialog Box, I need to check a number of things in the main form to make sure that the data being added or changed in the Dialog is consistent with the underlying data. In former incarnations of stuff (AREV), I could simply stuff @USER0 with @RECORD, load up @PSEUDO in a collector window, do my stuff and check as I went along. Doesn't seem to be quite that simple in OI.
Don Miller
At 28 JAN 1999 03:58PM Cameron Purdy wrote:
Don,
You can directly access the controls on the parent window using Get_Property.
See PARENT property.
Cameron Purdy
Revelation Software
At 29 JAN 1999 10:30AM Mike Ruane, WinWin Solutions Inc. wrote:
Don-
Get the dialog box's PARENT property- this is the window that called it.
Then just use Get_Property.
Hope it helps-
Mike Ruane
WinWin Solutions Inc.
At 29 JAN 1999 04:33PM Don Miller wrote:
Mike .. Just hunky dory. I was trying to use a fully-qualified entity id rather than the name of the parent by itself.
By the way, since you're an old hand at this, I've figgured out how to do the first of two tasks:
1. User clicks button to add new line to a DBTABLE. Pretty much standard stuff to insert a blank line. What I'd really like to do is to set SELPOS to that blank line and send a DBLCLK to the DBTABLE to load up my whippy-dippy-dialog box to capture all the stuff. The reason I needed the properties of the parent is that the dialog box is dependent on what is in the parent for validation of the stuff being entered (which includes text lines, hence a dialog-box). I have tried using the following:* make a blank line in the table and update it
SET_PROPERTY(@window:".DBTABLE_1","SELPOS",1:@FM:1)
SET_PROPERTY(@WINDOW,"FOCUS","DBTABLE_1")
SEND_EVENT(@WINDOW:".DBTABLE_1","DBLCLK"), but nothing happens
Thanks ..
Don Miller
C3 Inc.
At 01 FEB 1999 04:51AM Oystein Reigem wrote:
Don,
Are you sure you really get the focus set? Shouldn't your
<code> SET_PROPERTY(@WINDOW,"FOCUS","DBTABLE_1")</code>
at least be
<code> SET_PROPERTY(@WINDOW,"FOCUS",@WINDOW:".DBTABLE_1") =============</code>
?
Also - can one use a window name as the first parameter? I never did myself. I consulted the online docs, and it seems you can Get_Property(@Window,"FOCUS",…, but I'm not sure if you can Set_Property(@Window,FOCUS",…
I usually set focus like this:
<code> SET_PROPERTY("SYSTEM","FOCUS",@WINDOW:".DBTABLE_1")</code>
This syntax should also work
<code> SET_PROPERTY(@WINDOW:".DBTABLE_1","FOCUS",1)</code>
but I've been told the former is better.
- Oystein -
At 01 FEB 1999 09:42AM Don Miller wrote:
Oystein ..
I think you're probably right on the syntax. I'll give it a try.
Regards ..
Don Miller
C3 Inc.
At 01 FEB 1999 01:04PM Don Miller wrote:
Oystein..
The following fragment is what I'm trying to do:
* INSERT A BLANK LINE IN THE SCHEDULE ARRAY AND CALL THE DIALOG BOX
$INSERT LOGICAL
DECLARE FUNCTION GET_PROPERTY,MSG,SEND_EVENT
DECLARE SUBROUTINE SET_PROPERTY,MSG,SEND_EVENT
DEBUG ;* this allows for checking …
LINES= GET_PROPERTY(@WINDOW:".DBTABLE_1","DEFPROP")
TOP =GET_PROPERTY(@WINDOW:".DBTABLE_1","TOPPOS")
COUNT=COUNT(LINES,@VM)+(LINES # "")+1 ;* position to add
* MAKE A NEW BLANK LINE WITH THIRTY BLANK COLUMNS IN IT
* this is why the dialog box needs access to the parent. The schedule
* structure can be pretty big vertically but it has 30 columns of info
* about 15 of which need to be used in validating the new entry to
* be made in the dialog box
FOR I=1 TO 30
LINES='NEXT I
* PLACE THE NEW LINE AT THE BOTTOM, SCROLL IF NECESSARY
IF TOP = (COUNT-8)
SET_PROPERTY(@WINDOW:".DBTABLE_1","DEFPROP",LINES)
SET_PROPERTY(@WINDOW:".DBTABLE_1","TOPPOS",TOP)
SET_PROPERTY(@WINDOW:".DBTABLE_1","SELPOS",1:@FM:COUNT)
SET_PROPERTY("SYSTEM","FOCUS",@WINDOW:".DBTABLE_1")
FKUS=GET_PROPERTY(@WINDOW,"FOCUS") ;* at this point fkus is right!!
RETVAL=SEND_EVENT(@WINDOW:".DBTABLE","DBLCLK",1)
* since retval is "" at this point, I assume success, but the
* the new blank line is there, focus is on the first column but the
* double-click event is not processed! It will be if I do it manually
* but nothing happens programatically
RETURN 1
Any suggestions???
Don M.
At 01 FEB 1999 03:50PM [email protected] - [url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url] wrote:
Don,
the line
RETVAL=SEND_EVENT(@WINDOW:".DBTABLE","DBLCLK",1)should be
RETVAL=SEND_EVENT(@WINDOW:".DBTABLE[b][color=#FF0000]_1[/color][/b]","DBLCLK",1)
At 01 FEB 1999 04:10PM Don Miller wrote:
Aaron ..
Now that I've got egg all over my face, THANKS…..
Not enuf people checking code here …
Don M.