` 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  

Templates: Template to open file
1998-09-09 -- John Hickey
 
Newsgroups: topspeed.products.c4 Editors note: Please note that some lines may wrap in the template code. Here's one of those little Templates to make your lives easier :) Save the code below as OPENCLS.TPL in your Template directory, and register it. This contains 2 Code templates you can add to the front and back of your Source embed. It will open all the files in your OTHER FILES listing and then close all the files. Your Source embeds might look like this: Data Section Processed Code -Open Files In Source Procedure -SOURCE -Clsoe Files In Source Procedure Should work in both ABC and Legacy.... have fun! =Snip Here========================================= #TEMPLATE(OpenCloseFiles,'Open/Close Files In A Source Procedure'),FAMILY('ABC'),FAMILY('CW20') #!Copyright 1998, POSitive Software Company, All Rights Reserved #!Written By John Hickey #!Not For Resale! Distribute Freely! #CODE(OpenFiles,'Open Files In Source Procedure') #! #FOR(%OtherFiles) #CASE (SUB(%CWTemplateVersion,1,2)) #OF ('v2') IF %OtherFiles::Used = 0 CheckOpen(%OtherFiles,1) END %OtherFiles::Used += 1 #OF ('v4') Relate:%OtherFiles.Open #ENDCASE #ENDFOR #!--------------------------------------------------------- #CODE(CloseFiles,'Close Files In Source Procedure') #! #FOR(%OtherFiles) #CASE (SUB(%CWTemplateVersion,1,2)) #OF ('v2') %OtherFiles::Used -= 1 IF %OtherFiles::Used = 0 THEN CLOSE(%OtherFiles). #OF ('v4') Relate:%OtherFiles.Close #ENDCASE #ENDFOR =Snip Here========================================= >On Wed, 09 Sep 1998 16:27:46 -0500, Chris Moore >wrote: > >>Why does the SOURCE procedure not open the files for you? It allows you >>to select 'Other' files but it doesn't open them for you. What is the >>best method to open them in Source procedures?


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



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: