Login
`
Templates, Tools and Utilities
|
||
Icetips Article
Back to article list
Search Articles
Add Comment
Printer friendly
Direct link
Par2: How To Determine The Record Successfully Insert When Press OK Button 2005-01-04 -- Maarten Veenstra > The Insert is actually done by the .TakeCompleted method (in the form).
> So in the .TakeCompleted method, after the parent call, test the value that
> was returned by the parent call.
If I may expand on that:
When the form is called for Change and nothing was changed
when the [Ok]-button was pressed, TakeCompleted will return
RequestCompleted but nothing is written to disk!
You must check Primary.Me.EqualBuffer() to determin if
there is an actual write. However, when this form is called for
Delete, EqualBuffer() will tell you nothing has changed but
the record -was- deleted from the file.
So, my complete code is:
IF SELF.Response = RequestCompleted AND | !Check for real changes
(NOT SELF.Primary.Me.EqualBuffer(SELF.Saved) OR SELF.Request = DeleteRecord)
!Action! - do something
END
Today is November 21, 2024, 3:57 am This article has been viewed 35257 times.
|
|