Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community

At 14 APR 2000 07:17:14PM Orlay Edward Plummer wrote:

I am working on the procedures (event handlers) for some buttons

that open a form to allow creation of related rows in another

table. The button Click event handler stores some data (the

key for the open row in the form, etc.) in a user variable

(@USER1) through Get_Property and then opens the relevant form

(window). That newly opened window's activated event handler

places the data in @USER1 into some of its control through

Set_Property. The purpose is to fill important fields with

the proper data without relying on the user to enter it in

creating related rows in a relational table. The routines

worked in that the information is transferred and appears

in the correct fields (edit line controls) but when any

edit line control is clicked, all the controls are nulled

out, that is, the transferred data disappears.

Ed Plummer


At 14 APR 2000 11:52PM Donald Bakke wrote:

Ed,

I sounds like you are populating the controls first and then the new forms does a row read which would then obviously erase the fields. If this sounds about right then I would do the following:

1. Use the CREATE event to automatically cause the READ event to fire (e.g. Send_Event(@Window, "READ"))

2. Then use the READ event to populate the controls based on the contents of @USER1.

[email protected]

SRP Computer Solutions


At 15 APR 2000 03:24PM Oystein Reigem wrote:

Ed,

…and then opens the relevant form (window).That newly opened window's activated event handler…

Don't use the ACTIVATED handler. Use CREATE. ACTIVATED is run each time focus changes from a different window to this window. So e.g if the user switched temporarily to a different window or program the ACTIVATED handler would be run once more when he switched back.

(And the normal way to pass the key to the CREATE handler would be in the CreateParam or InitParam of Start_Window or Dialog_Box or whatever function you start your window with.)

…places the data in @USER1 into some of its control through Set_Property.

- Oystein -


At 18 APR 2000 05:44PM Orlay Edward Plummer wrote:

Don Bakke,

Your suggestions work!

Thanks!

Ed Plummer


At 18 APR 2000 05:50PM Orlay Edward Plummer wrote:

Oystein,

Your suggestions were helpful.

Thanks!

Ed Plummer

View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/cb02715cf4907031852568c1007febe1.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1