` 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  

ABC: Conditionally use form or edit in place
1998-11-11 -- Jim Defabia
 
Newsgroups: comp.lang.clarion The ABC templates make this easy to do. I wrote an article for Clarion Online (Jan 1996 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. HTH, Jim DeFabia Graham Harris wrote in message <36495ba7.48196074@tsnews.clarion.com>... >Folks, > >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. > >Is there any way of having a single browse with both EIP and >form-based editing?


Today is November 23, 2024, 2:23 am
This article has been viewed 35370 times.
Google search has resulted in 162 hits on this article since January 25, 2004.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: