Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

@Record (OpenInsight Specific)

At 02 FEB 1999 05:12:32PM Greg James, ISIS, Inc. wrote:

I have an MDI frame with several MDI children. When I have a record open in a child window, I cannot access @record from the frame.

How can I modify @record from the frame? For example, how could I change the contents of @Record via a button on the frame?

Thanks

gjames@isisicor.com onmouseover=window.status=email greg james;return(true)"


At 02 FEB 1999 08:06PM Bob Carten, WinWin Solutions wrote:

Greg:

What do you really want to do? Can you name the event that causes you to want to update @record? Have the frame send an omnievent to the sheet, parameter 1 is your 'event name', the other parameters are data , let the window put data into the appropriate controls. You could have the button on the frame send the event to @mdiactive instead of to a specific sheet. Have the button disabled when the frame is created, then have the activate event of every sheet that wants to process that message enable your button, the same sheet's deactivate event disable the button. Place a menu event on the frame for any button you would put on the frame. Use a toolbar to hold the button. Search this site 'toolbar' to get sample code.

Apologies for the pedantic tone.

Bob


At 02 FEB 1999 10:38PM Don Bakke wrote:

Greg,

Like Bob asked, what are you actually trying to accomplish. From what I can infer I think you are confused about the nature of @RECORD.

@RECORD is not the dynamic variable the way AREV uses it. That is, updating @RECORD will not[/i] update the window. In a sense, it is a read-only variable (although you can programmatically change its contents…but this will get overwritten when the record is modified within the form.) Additionally, @RECORD is a property of a databound window. The MDI Frame, at least in your case, is not itself attached to a table so you have to reference the active MDI child at the time (using @MDIACTIVE like Bob suggested or getting the MDIACTIVE property of the frame.) If this doesn't help, give us some more information and we'll go from there. dbakke@srpcs.com SRP Computer Solutions </QUOTE> —- === At 03 FEB 1999 03:09PM Bob & Don: This is what I am trying to do…. wrote: === <QUOTE>I apologize for the long explanation— @Record contains an @VM delimited list of data. I should say that it contains data only if the user has entered something there–@Record is empty when the record is created. I have a button on the MDI Frame that starts a form (actually a dialog box) that contains non-databound controls – edit fields, combo boxes, etc. The contents of @Record are passed to the form via the form's CreateParam. If @Record contains data, the appropriate controls are programmatically populated. In the close event of the form I get the contents of the conrols, update or create the @VM delimited list and then call End_Dialog, passing the @VM delimited list back to the calling procedure. So, now I'm back in the click event of the button that started the form in the first place. Right now I'm setting a user defined property of the frame to the contents of the newly created or recently updated @VM delimited list. How can I update @Record for the record that is open in the MDI Child? It seems to be a little less complicated in AREV. </QUOTE> —- === At 03 FEB 1999 03:54PM Steve C. wrote: === <QUOTE>Greg, you might want to try having an invisible control on your form holding @record. The try the following, with the dialog box data updating the DEFPROP of the invisible control. Orig=Get_Property(Ctrl, "DEFPROP", Aux) Text=Dialog_Box("ZOOM_EDIT", Parent, Orig) * If the variable Text is not null and not equal to Orig, then the *text (DEFPROP) is updated for the control with focus. */ if len(Text) and Text # Orig then Set_Property(Ctrl, "DEFPROP", Text, Aux) end Steve C. </QUOTE> —- === At 03 FEB 1999 04:08PM Steve C. wrote: === <QUOTE>Greg, I got the above code from the ZOOM.PDF white paper. Give that a try. Steve C. </QUOTE> —- === At 03 FEB 1999 04:27PM Thanks Steve. wrote: === <QUOTE>I think that your suggestion is very good. I haven't tried it yet, but I will soon. Ironically, I use the 'ZOOM' feature throughout my application. For some reason using an approach similar to what ZOOM does for my current problem did not cross my mind. Thanks for the help. </QUOTE> —- === At 03 FEB 1999 07:33PM Don Bakke wrote: === <QUOTE>Greg, Just to repeat and clarify: You can't update the variable @RECORD and expect its contents to be available "down the road". In AREV, we could modify field values even if there wasn't a field on the current form representing that column. In OI, you must have a control bound to each column that you want to update. So the simplest approach is to make the control invisible and during the WRITE event you would update it accordingly. The reason for the difference is that AREV is based on the entire record and it works directly with it, while OI is based on individual columns and works indirectly with it. Plus, in OI it is possible to have information visible in a control but it won't be reflected in the underlying databound record. While some simplicity is lost, this does allow OI to offer some other powerful features - such as the ability to ignore self locks and pull up multiple windows looking at the same record (but presumably different columns!) dbakke@srpcs.com SRP Computer Solutions </QUOTE> View this thread on the forum...