Page 1 of 4 123 ... LastLast
Results 1 to 10 of 40

Thread: DataChanged

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893

    DataChanged

    If I put a code into the datachanged method of a fielf, every time I change record, the code are executed...

    It is a bug?

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    "every time i change a record"? do you mean every time you navigate between records? If thats what you mean, yes, thats what it is supposed to do.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    Yes, sorry for my bad english... when I navigate between records..

    but in earlier versions of Lianja was not so ..
    I thought the "DataChanged" was performed if brought changes to the field ..

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    The datachanged delegate is called whenever the data has (or may have) changed. Navigating between records causes this to be called.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  5. #5
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    So now how do I insert the code to run every time I edit a field really?

  6. #6
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    in my case, I want to open a selection window if the code entered in a field is not correct ..

    In previous releases the "Date changed" method was not called when navigating through the records ..

  7. #7
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    The dataChanged delegate is called whenever you finish editing a field or navigate between records.

    The change delegate is called as you interactively edit fields.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  8. #8
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    I'm sorry, but I do not make much sense .. if a field in the data changed, I do a test that takes a long time, for each record I have to wait?
    if DataChanged field "price" I run the calculation of the field "amount" (price * quantity), but then I edit by hand the amount? if I navigate between records, the amount is recalculated ..

    for me, the date changed should not be called during navigation ..

    change the method, it is too interactive .. is called for every character, not in the validation of the field (lyke "valid" in VFP).

    the "validation" method in Lianja is not the same as VFP, is invoked when I "click" the "save changes" button in the toolbar, if I change the value of the field and I press "tab" is not invoked.

  9. #9
    Senior Member
    Join Date
    Feb 2012
    Location
    Rome - Italy
    Posts
    1,893
    How can I do?

    thanks

  10. #10
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,161
    Blog Entries
    22
    The "Data Changed" delegate is called whenever you navigate between records.

    The "Changed" delegate is called when you interactively edit data in a field on a form. if what you want is to verify that data entered and possibly popup a list of choices then that would better be placed as the validation in conjunction with auto suggestions.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us