Ask Dr. DePhobia - Questions and Answers about Clarion

by Jim DeFabia

Published 1999-05-01    Printer-friendly version

Q:Sometimes when I'm working on an application everything will work except one procedure, which will prevent the app from compiling. It would be nice to be able to flag that procedure so the compiler would ignore it and compile so I can test the rest of the app and come back to the faulty procedure another time. Can you help?
A:Yep. And, I can share this template with you. Just add it to the offending procedure and you can omit it anytime you like. I hope you find it useful.

Copy the text to a text file and name it <something>.tpl in your template directory. Then register the template. Once registered, you can add it to any procedure to OMIT the procedure. There is a checkbox to specify whether or not you want to omit the procedure. There is also a prompt to specify the message to display when the procedure is called.

Image6.gif

#TEMPLATE(OmitAProcedure,' Omit A Procedure '),FAMILY('ABC')
#!----------------------------------------------------------------
#! Omit A Procedure (to allow you to compile when a proc is hosed)
#! By Jim DeFabia (EMAIL: Error! Reference source not found.)
#! For Clarion Online subscribers only
#! Do Not redistribute without permission from Author
#!
#!----------------------------------------------------------------
#EXTENSION(AllowOmit,'Enable this procedure to be OMITted'),PROCEDURE
#BOXED('Allow Omit Settings')
#PROMPT('Omit this Procedure',CHECK),%OmitFlag,DEFAULT(1)
#PROMPT('Message Display',@s40),%MessageToShow,DEFAULT('Procedure disabled')
#ENDBOXED
#AT (%DataSection,''),FIRST
#IF(%OmitFlag)
  CODE
  MESSAGE('%MessageToShow')
  OMIT('!endomit*')
#ENDIF
#ENDAT
#AT (%LocalProcedures,''),LAST
#IF(%OmitFlag)
  !endomit*
#ENDIF
#ENDAT

Q:Doctor, I have three BrowseBoxes on a window, and my toolbar buttons only work for one of them. Can the toolbar work for each browse, and if so, how?

-Confused in Cleveland-

A:We'll talk about Cleveland later, but I can help with your toolbar issue now. The answer requires two steps for each BrowseBox:

First, you must check the Accept Browse control from toolbar box on all three browses (on the Actions tab).

Image7.gif

Next, you must set the target for the toolbar control to the selected browse. There is a control template which allows you to set this easily.

In the Window Formatter, double-click on the first browsebox, and find the Control Events, <list control>, Selected embed point.

Press the Insert button, then select the SelectToolbarTarget code template.

Image8.gif

You are prompted for the target. Select this browse box from the drop-list, then press the OK button.

Image9.gif

Repeat for the other two BrowseBoxes and your ToolBar will handle them all.

Q: Is it possible to have a list box display data in the reverse order of a key without creating a key in descending order?

A: Without being too condescending, I can tell you descending orders are a snap.

Merely specify No Key on the BrowseBox, then specify the key components in the BrowseBox's Additional Sort Fields with a minus sign in front of each. This allows you to display in reverse key order with no code.

For example, if you wanted to display the Order file in reverse Date order, you would type : -ORD:Date in Additional Sort Fields. If you have more than one key component, separate each with a comma.

Printer-friendly version

Reader Comments

Posted on Thursday, November 22, 2001 by jorge martins

Hello  
   
 He/she/you helps Urgent  
   
 I am developing an application, to a house   
commercial, in Clarion 5.5ee already updated and I am   
using the templates abc.  
 In a browse and through a button of ýimpressýo of   
ticketý, acciona a procedure report that prints the same   
ticket receipt in a printer star sp200 for pos, of   
paper roll and matricial,que also has your drv   
installed in the pc.  
   
I already read in the list of the printer fiscal bematech, and of the   
your alone dll that the star only has 1 it cribs drv, and on the   
template lineprint () that registei,mas don't already know in as   
to implement correctly in spite of already to have read the help of the   
lineprint, mainly to print header, footer,   
detail, etc. With PRINTER{PROPPRINT:Device}   
= ' Generic / Text Only'! SET TO ASCII DEVICE,   
it is gotten to only print that the ticket is completely   
caused confusion, in spite of in the preview to be everything correct.  
   
 In summary, I am hung by a procedure that is   
essential for the application that is already concluded.  
   
Thankful for all the help that you/they can supply me and if   
possible step by step.  

 

Posted on Monday, November 26, 2001 by Dave Harms

Jorge,

The Dr. Dephobia series is part of the Clarion Online archives, and the last of this series was published over two years ago - I don't expect you'll get a reply. Your best bet is to post in the SoftVelocity newsgroups at news.softvelocity.com

Dave

 

Posted on Wednesday, January 16, 2002 by Chirag Sukhadia

Sir,
I am developing my commercial applications in VB6,
I heard about Clarion recently, I would like to know how it will be beneficial to migratre from Vb6 to Clarion.
I am located in India,Gujarat,Ahmedabad. I also do not have any resource from where i can get Development Kit.
Please send me the details on my email at your earliest

Chirag Sukhadia
slsscs1@yahoo.com

 

Posted on Wednesday, January 16, 2002 by Dave Harms

Chirag,

The Dr. Dephobia series is from the Clarion Online archives, and was originally published several years ago on another site, so you probably won't get a reply from the author. I recommend you visit the SoftVelocity newsgroups at news.softvelocity.com - you can ask about VB6-Clarion migration there, and I'm sure you'll get a number of responses.  

Dave

To add a comment to this article you must log in.

 
 

Search

 

Advanced Search
Topical Index

Related Articles

Subscribe to
ClarionMag

One year: $169

(includes all back issues since '99)

Renewals from $119

Two years: $269

Renewals from $219

More Info

Subscribe Now!

ClarionMag Blog

RSS Feeds

Updates via Email

Enter your Email


Powered by FeedBlitz

Quick Links