` Coding event handling for individual fields (Jim Kane) - 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: Coding event handling for individual fields
1998-10-25 -- Jim Kane
 
Newsgroups: comp.lang.clarion > ABC Edit in Place > I need to embed some code after one > of the edit variables are accepted. > I've tried dozens of places but can't > finf the right place. > Where ??? Roger: Use EditInPlace::YourVariable.TakeEvent. It's a little tricky because you have to update() the variable here is some sample code out of my ForKeeps archive. If you ever have trouble finding an old message, ForKeeps is for you! A quick search on Edit in place found: ---------------------------------------------------------------- Message retrieved by ForKeeps Message Archiver ---------------------------------------------------------------- Subject: Edit In Place embed From: Kane,Jim 73741,2774 To: Broll,Carl F. 76366,1256 Date: 30-Jul-98 Forum: CLARION/08 Design/Productivity MsgNo: 488512 (reply to 488510) ---------------------------------------------------------------- >> (CW4B ABC) I have a form with a listbox that uses edit in place. I want to modify one of the fields in the record based on other fields in the record and form before the record is saved. Can someone tell me how to put embed code right before the record is written to disk on an edit in place listbox? << In one case I had two fields, an inventory level and the delta or change in inventory level from the previous inventory. The general idea was when one was entered using EIP the other was calculated and displayed plus some colors where set for the browse line. Here is the embed for the delta EIP field: the key features are the events and doing the update(focus()) then just do what every you want to the browse queue variables and save the Q. EditInPlace::Loc:Delta.TakeEvent PROCEDURE(UNSIGNED Event) ReturnValue BYTE,AUTO ! Start of "Edit-In-Place Manager Method Executable Data Section" ! [Priority 5000] ! End of "Edit-In-Place Manager Method Executable Data Section" CODE ! Start of "Edit-In-Place Manager Executable Code Section" ! [Priority 2500] ReturnValue = PARENT.TakeEvent(Event) ! [Priority 7500] if returnvalue<>EditAction:Cancel and returnvalue<>EditAction:None then Update(focus()) loc:delta=brw1.q.Loc:delta !Update local variable if loc:delta<>0 then Loc:newQty=loc:curQty+loc:delta else loc:newQty=0 end brw1.q.loc:NewQty=loc:NewQty !update q variable If loc:delta or loc:newQty then brw1.Q.ite:ITEMN_NormalFG=color:red brw1.Q.ite:ITEMN_SelectedFG=color:red else brw1.Q.ite:ITEMN_NormalFG=color:none brw1.Q.ite:ITEMN_SelectedFG=color:None end put(brw1.q) end ! End of "Edit-In-Place Manager Executable Code Section" RETURN ReturnValue Jim Kane Team TopSpeed(Compuserve) String Search Template Set for Clarion(.DAT) Files http://www.bmtmicro.com/catalog/strsrch ForKeeps 3.5 Professional Extension WordSearch http://www.fkeeps.com ---------------------------------------------------------------- End Of Quote ---------------------------------------------------------------- --- Jim Kane


Today is April 18, 2024, 12:21 am
This article has been viewed 35121 times.
Google search has resulted in 49 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: