Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Paradox > Re: changevalue...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 12 Topic 1375 of 1400
Post > Topic >>

Re: changevalue and newvalue

by Jeff Shoaf <jeffshoaf@[EMAIL PROTECTED] > Jun 7, 2008 at 01:39 PM

Are you directly updating the field on the other form? If so, you could 
get the ping-pong affect and end up w/ a stack overflow. I'd recommend 
updating the other form's table via a tCursor instead of through the 
field on the form. ChangeValue only fires when the field is updated via 
the form - it doesn't fire if the table is updated directly.

Craig wrote:
> Jeff and Fred,
> Thanks for your help. I used Jeff's at this point because of the
simplicity. 
> Fred's suggestion, however, may come in handy. With the two fields, if I

> change field 2, field 1 changes. Suppose I want the reverse to also
happen? 
> I am concerned that it will go back and forth.
> Craig
> 
> "Fred Z" <fredzcalgary@[EMAIL PROTECTED]
> wrote in message 
>
news:c1fcac80-c199-4d9f-afae-e5d0302f3955@[EMAIL PROTECTED]
>> You could use the reason method with the following example taken
>> directly from Pdx help.
>>
>> The following example assumes that a form contains a multi-record
>> object bound to the Orders table, and that the ****p_VIA field is a set
>> of radio buttons. Assume also that the form is in Edit mode. The
>> newValue method for ****p_VIA displays a message indicating why
>> newValue was called. When the form opens, the Reason will be
>> StartupValue.
>>
>> ; ****p_VIA::newValue
>> method newValue(var eventInfo Event)
>> ; show why the newValue method was called
>> msgInfo("newValue reason",
>>    iif(eventInfo.reason() = StartupValue, "StartupValue",
>>    iif(eventInfo.reason() = FieldValue, "FieldValue", "EditValue")))
>> endMethod
>>
>> When the user scrolls through the table or clicks the nextRec button,
>> the Reason will be FieldValue.
>>
>> ; nextRec::pushButton
>> method pushButton(var eventInfo Event)
>> action(DataNextRecord)    ; this triggers a newValue for ****p_Via
>>                          ; with a Reason constant FieldValue
>> endMethod
>>
>> When the user chooses a different radio button on ****p_VIA or clicks
>> the changeRadio button, the Reason will be EditValue.
>>
>> ; changeRadio::pushButton
>> method pushButton(var eventInfo Event)
>> ORDERS.****p_Via = "US Mail"    ; this triggers a newValue for ****p_Via
>>                               ; with a Reason of EditValue
>> endMethod
>>
>> Or, if you want to test for the change in a tableframe try
>>
>> method action(var eventInfo ActionEvent)
>> var
>> vActionID smallint
>> endvar
>>
>> vActionID=eventinfo.id()
>>
>> if vActionID=DataPostRecord or vActionID=DataUnlockRecord {plus maybe
>> a test to see if the record actually changed}
>> then
>> ............your code here
>> endif
>>
>> Good luck 
> 
>
 




 12 Posts in Topic:
changevalue and newvalue
"Craig" <cra  2008-06-07 08:18:24 
Re: changevalue and newvalue
Jeff Shoaf <jeffshoaf@  2008-06-07 10:48:47 
Re: changevalue and newvalue
Fred Z <fredzcalgary@[  2008-06-07 07:56:25 
Re: changevalue and newvalue
"Craig" <cra  2008-06-07 12:32:42 
Re: changevalue and newvalue
Jeff Shoaf <jeffshoaf@  2008-06-07 13:39:13 
Re: changevalue and newvalue
"Craig" <cra  2008-06-07 13:59:05 
Re: changevalue and newvalue
Bill McCray <McCrayBil  2008-06-07 16:30:44 
Re: changevalue and newvalue
Jeff Shoaf <jeffshoaf@  2008-06-08 09:36:02 
Re: changevalue and newvalue
Jim Hargan <contact@[E  2008-06-08 10:33:34 
Re: changevalue and newvalue
Jeff Shoaf <jeffshoaf@  2008-06-08 17:10:02 
Re: changevalue and newvalue
Bill McCray <McCrayBil  2008-06-08 18:11:03 
Re: changevalue and newvalue
Jim Hargan <contact@[E  2008-06-07 15:15:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Aug 21 21:31:40 CDT 2008.