` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

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

Par2: Determining a record has changed
2000-02-17 -- Dennis Evans
 
The WindowManager TakeCompleted method uses a routine called ChangeAction. The routine compares the record buffer before the update method is called. If there has been no change in the record the update method is not called, if the record has changed the update method is called. So, I would use the Update method, after the parent call. if RetunValue = Level:Benign do you stuff end Any value other than benign indicates an update error. The main point is the update method is only called when the record buffer has changed. To catch an OK press on a form and determine whether the record was changed or not: From the ChangeAction routine, CODE LOOP SELF.Response = RequestCancelled SETCURSOR(Cursor:Wait) UnChanged = SELF.Primary.Me.EqualBuffer(SELF.Saved) IF UnChanged Error = 0 ELSE Error = SELF.Primary.Update(CHOOSE(SELF.HistoryKey)) END This line tests the the buffer if the buffer has not changed the EqualBuffer method will return a true value, the update method is not called. The buffer is stored in the PrimeUpdate method, some thing some where is changing a value in the record buffer if the update method is being called. I use this technique in a similar manner and works here, even with the Ok pressed


Today is May 6, 2024, 11:32 pm
This article has been viewed 35116 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: