` Printed Icetips Article

Icetips Article



ABC: Checking if a form record has changed
2002-05-26 -- Geoff Spillane
 
Newsgroups: comp.lang.clarion

Hi Johan,

If you are using ABC methods then -

  • Hide the Ok button.
  • Create another button and call it something appropriate like Exit or whatever.
  • In the Event:Accepted embed of the ExitButton place code like this:
      ! Check to see if any changes
      IF ~SELF.Primary.Me.equalbuffer(SELF.saved)
        CASE MESSAGE('The Record has Changed|'|
                                      &'Do you wish to Complete Change?',|
                                       'Change Decision',|
                                      ICON:Question,'&Yes|&No',2 )
          OF 1
                    My action code here
                    POST(EVENT:Accepted,?Ok)
          OF 2
                    POST(EVENT:Accepted,?Cancel)
        END ! Case structure
      ELSE
                    POST(EVENT:Accepted,?Cancel)
      END ! If structure

Best Regards,
    Geoff Spillane




Printed November 21, 2024, 10:11 am
This article has been viewed/printed 35401 times.
Google search has resulted in 16 hits on this article since January 25, 2004.