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

At 31 OCT 1997 04:50:28AM Peter Richards wrote:

Within the WRITE event for a form the command:

ret_controls=Get_Property(@WINDOW,"RECORD")

doesn't return the correct control value for any controls that have events.

For instance, there are 30 controls in the form, and all have database associated columns. Two of these controls have events, and the RET_CONTROLS variable as outlined above doesn't return the correct value for those 2 controls. (The values returned are the @RECORD vales).

The 2 controls are an edit line (LOSTFOCUS event) and an edit table (INSERTROW,DELETEROW & POSCHANGED events).

Peter


At 31 OCT 1997 01:37PM Don Bakke wrote:

Peter,

What version of OI?

dbakke@srpcs.com

SRP Computer Solutions


At 31 OCT 1997 07:37PM Peter Richards wrote:

Don,

Sorry, I should show what OI version.

I am using version 3.2

Peter


At 01 NOV 1997 02:12AM Don Bakke wrote:

The 2 controls are an edit line (LOSTFOCUS event)

Hmmm, I'm not exactly sure about this one. Are you positive that nothing in the LOSTFOCUS event could be interfering? Are you playing with the GOTFOCUS_VALUE property or anything similar? What happens if you 1) remove the event completely, or 2) keep the event but rem out any real coding?

…and an edit table (INSERTROW,DELETEROW & POSCHANGED events).

Now this is somewhat expected. OI didn't update the RECORD property correctly with edittables, especially when doing an insertion or deletion of a row up to version 3.2. This was corrected in 3.3 or 3.31.

dbakke@srpcs.com

SRP Computer Solutions


At 03 NOV 1997 12:00AM Peter Richards wrote:

Don,

]The 2 controls are an edit line (LOSTFOCUS event)

]Hmmm, I'm not exactly sure about this one. Are ]you positive that nothing in the LOSTFOCUS event ]could be interfering? Are you playing with the

]GOTFOCUS_VALUE property or anything similar?

Here is all the code in the LOSTFOCUS:

Declare function RowExists

Supporter_Number=.SUPPORTER_NUMBER-]text

Name=.NAME-]text

Exists=RowExists("SUPPORTERS",Supporter_Number)

If exists then

end else

  Salutation=.SALUATION-]text
  If  Salutation=" then
     text
Initials=.INITIALS-]text
If  then
    If  Initials=" then				.SALUTATION-]text=Friends"
    End
end else
    .SALUTATION-]text=Title:" ":Name		end		
 end

end

] What happens if you 1) remove the event completely, or 2) keep the event but rem out any real coding?

Will try this and let advise.

]…and an edit table (INSERTROW,DELETEROW & ]POSCHANGED events). Now this is somewhat ]expected. OI didn't update the RECORD property

]correctly with edittables, especially when doing ]an insertion or deletion of a row up to version ]3.2. This was corrected in 3.3 or 3.31.

Thanks, will keep this in mind.

Peter


At 03 NOV 1997 02:18PM Don Bakke wrote:

Peter,

Based on your LOSTFOCUS script I'd say that the problem is the use of the TEXT property when updating your controls. TEXT does not update the RECORD property because it only affects the control itself and not the underlying database column (at least until the record is written.)

Instead you should use either the DEFPROP property (for already output converted data) or the INVALUE property (for internally formatted data). Then the RECORD property will be automatically updated as well.

dbakke@srpcs.com

SRP Computer Solutions


At 03 NOV 1997 02:54PM Don Bakke wrote:

Peter,

I forgot to mention something else which may just be a typo when you copied your LOSTFOCUS event code:

Line #7 says:

Salutation=.SALUATION-]text

I'm sure it's supposed to read:

Salutation=.SALUTATION-]text

You may want to double-check your code on this.

dbakke@srpcs.com

SRP Computer Solutions


At 03 NOV 1997 05:45PM Cameron Revelation wrote:

Peter,

At the end of your LOSTFOCUS code you should have:

return 1

Cameron. Revelation


At 05 NOV 1997 06:23AM Peter Richards wrote:

Cameron,

Thanks for the tip on RETURN. Is there a general rule for when to use value 0 and when to use 1 ? Is it dependant upon the event chain, as to what event will 'stop' with a value 1 ?

Peter


At 05 NOV 1997 06:31AM Peter Richards wrote:

Don,

Will check out the spelling on 'Salutation', thanks.

With TEXT and DEFPROP, I thought it was 'safe' to use TEXT. At WRITE time, aren't just POS & TABLE properties used to 'line up' each control on the form to columns in the Database ?

Peter


At 05 NOV 1997 07:48AM Cameron Revelation wrote:

Peter,

If you "return 1", the event chain continues. If you "return 0", it stops. If you "forward_event(…)", it executes the rest of the event chain immediately. Most events don't have "the rest of the event chain", but GOTFOCUS, LOSTFOCUS, POSCHANGED, CLOSE, READ, WRITE, etc. do.

Cameron. Revelation


At 07 NOV 1997 01:13AM Peter Richards wrote:

Cameron,

Thanks for clearing up the return values with event chaining, etc.

Peter


At 07 NOV 1997 12:14PM Don Bakke wrote:

Peter,

With TEXT and DEFPROP, I thought it was 'safe' to use TEXT. At WRITE time, aren't just POS & TABLE properties used to 'line up' each control on the form to columns in the Database ?

It's safe for WRITE purposes, yes, but if you need to access the latest changes in the RECORD property before the WRITE (for instance, printing a form) then TEXT won't do you any good.

dbakke@srpcs.com

SRP Computer Solutions


At 14 NOV 1997 11:08PM Peter Richards wrote:

Don,

Thanks, I see the difference now. Will use DEFPROP

in preference to TEXT.

Peter

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/deae1e9dc0427bb98525654100309111.txt
  • Last modified: 2024/01/04 21:00
  • by 127.0.0.1