How to tell when a table field has changed

Bill Vlahos bvlahos at mac.com
Mon Oct 20 01:48:11 EDT 2008


Jan,

Thanks. It looks like it sends the revUpdateCellValue message whenever  
a cell changes (like when pressing tab or return) not just when the  
value changes. Unfortunately, without the pOldText value I can't tell  
if it changed or not.

Maybe you were thinking of a different message that only sends when  
the value changes? If not, I'll report the pOldText value missing as a  
bug.

Bill
On Oct 19, 2008, at 10:11 PM, Jan Schenkel wrote:

> --- Bill Vlahos <bvlahos at mac.com> wrote:
>> How do I tell when the contents of a table field
>> have changed?
>>
>> It doesn't seem to generate a closeField message
>> which is what I
>> really want.
>>
>> Recipe (Rev 3 IDE. Mac OS X 10.5.5)
>> 1. Create a table field
>> 2. Set the script to:
>> on closeField
>>    put "Close Field"
>> end closeField
>>
>> on exitField
>>    put "Exit field"
>> end exitField
>>
>> 3. Edit the contents of the field or even click off
>> the field. Nothing
>> is put in the message box.
>>
>> Bill Vlahos
>>
>
> Hi Bill,
>
> The tricky part is that the table field is not the
> target of the closeField message - instead, it's sent
> to the temporary field that is created as a 'cell
> editor' in the 'revTable' frontscript.
> What makes this even more complicated, is that this
> 'cell editor' field is actually deleted by that
> frontscript before the 'closeField' is passed on to
> the message path.
> However, not all is lost, as the 'revTable'
> frontscript will actually send out an undocumented
> message if a cell has changed:
>  revUpdateCellValue
> pObject,pXcell,pYcell,pOldText,pNewText
> Looking at the frontscript, I wouldn't count on the
> 'pOldText' parameter though - it looks like that got
> lost in one of the changes to the frontscript.
>
> HTH,
>
> Jan Schenkel.
>
> Quartam Reports & PDF Library for Revolution
> <http://www.quartam.com>
>
> =====
> "As we grow older, we grow both wiser and more foolish at the same  
> time."  (La Rochefoucauld)
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list