` Checking if a form record has changed (Geoff Spillane) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

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



Today is April 26, 2024, 5:56 am
This article has been viewed 35120 times.
Google search has resulted in 16 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: