Paradox Community

Items in pnews.paradox-programming

Subject:Re: CanArrive
Date:14 Jan 2021 22:27:56 -0400
From:"Kevin Zawicki" <numberjack@wi.rr.com>
Newsgroups:pnews.paradox-programming



I can recreate what you describe...   have to think about it


it seems the record gets focus no matter where code is, I tried canArrive,
arrive, onthe frame, record, etc....





but

try this:


on the form, copy the field object from the table frame on to the form page,
making a "raw" field but still bound to the table with no container.

rename it "fieldDisplay" (or whatever)
this  should show the same value as the field in the frame

a duplicate field

then
  

on the form canArrive:

method canArrive(var eventInfo MoveEvent)
 var
  ui uiObject
 endvar

 eventinfo.getTarget(ui)

	if eventInfo.isPreFilter() then
		;// This code executes for each object on the form

   if ui.name = "NameOfYourTableFrame" then
    view(fieldDisplay.value)
   endif

	else
		;// This code executes only for the form

	endIf

endMethod


I think this captures the arrive on the table frame but shows the duplicate
before it changes.





Peter <peterspammenot@whiteknight.email> wrote:
>Let's say the first record of the tbf has focus.
>I then click on an undefined field on the form (i.e. outside the tbf) to

>remove focus from the tbf/rec
>
>Next I click on the tbf/rec, say the 4th row, I want to capture the 
>value of the field in the tbf/rec when focus had left which is the 1st row.
>
>
>
>On 1/14/2021 5:40 PM, Tom Krieg wrote:
>> What do you mean by "the current record" ? The current record is the one

>> that's got focus.
>> 
>> On 15/01/2021 12:07 pm, Peter wrote:
>>> Something I am not understanding here.
>>>
>>> On a form
>>> I have a tableframe with 10 records and 1 defined field "fld"
>>> Then on the tablefame's CANARRIVE event I have "view(fld)"
>>>
>>> I have one undefined field
>>>
>>> When the form opens the undefined field has focus
>>>
>>> Now for the part I do not understand
>>> When I click say the fourth row of the tbf view shows the data of the

>>> fourth row.
>>> Considering that my code is in the "CANARRIVE" event shoul dit not 
>>> show the fld for the first row?
>>>
>>> Another experiment after clicking the 4th row
>>> I click the undefined field to move focus off the tbf
>>> I then click on the 7th row and again the view statement showed the 
>>> value for the 7th row instead of the 4th row as I expected.
>>>
>>> How do I get the value of the current record of a tableframe before it

>>> gets focus? Thanks for any thoughts.
>>>
>>> Peter
>> 


Copyright © 2004 thedbcommunity.com