` Switching between EIP and form entry (Jim DeFabia ) - 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  

Par2: Switching between EIP and form entry
1998-11-12 -- Jim DeFabia
 
>I have a browse where sometimes I'd like to be able to EIP the few >fields displayed, while other times I need the form to do it properly. > >As soon as I enable EIP in the IDE, the browse goes 100% EIP and I >can't seem to get to the form. The ABC templates make this easy to do. I wrote an article for Clarion Online (Jan 1998 vol. 1 # 6) detailing the steps to set this up. If you are a subscriber, you may want to read this back issue. If not, here is the short version of what you need to do: First, look at what a Browse Procedure does when the user calls for an update. It calls a method named something like BRW1.ThisWindow.Run. The method takes a number as a parameter. This number is the value of the BRW1.AskProcedure property. In other words, if you enable Edit-In-Place _and_ specify an update procedure, you have two-thirds of your work already done. Set the BRW1.AskProcedure Property to 0 (zero) and you have Edit-in-Place; Set it to >1 (One) and you call your update procedure. The steps: 1. Select the Browse procedure, and press the Properties button. 2. In the UpdateButton section of the Procedure Properties window, check the Use Edit in Place box. Make sure an update procedure is specified. 3. Embed the code to set the default update action to call the form. In the Window Manager Method - Init - BYTE() embed point embed the following code. Leave the Priority set to Default (4000). BRW1:AskProcedure = 1 ! note that a 1 calls the form--the default action we want 4. Embed the code to set the action of a double-click to use edit-in-place. In the Browser Method Executable Code Section- Browse on using BrowseClass - TakeKey - BYTE() embed point embed the following code: IF RECORDS(SELF.ListQueue) AND KEYCODE() = MouseLeft2 BRW1.AskProcedure=0 END (Set the Priority to First or 0. It should precede the generated code. ) 5. Finally, embed the code to set the action back after an edit (either from a form or from an edit-in-place. In the Browser Method Executable Code Section- Browse on using BrowseClass - ASK-BYTE(request), BYTE embed point embed the following code: BRW1.AskProcedure = 1 This is important. It resets the value to call the form. Set the Priority to Last or 10000. It should follow generated code. 6. Compile and run the application. Call the browse procedure and notice the behavior-a double-click gets you edit-in-place and any other method of calling an update gets you the form.


Today is November 21, 2024, 3:46 am
This article has been viewed 35199 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: