|
|
|||
| Version
www.capesoft.com |
|||
| Contents | |||
|
|
Getting Started - some basics | ||
| Introduction [Suggested Reading] | |||
| Feature List | |||
| Installation Instructions [Suggested Reading] | |||
| Jump Start [Suggested Reading] | |||
| Examples | |||
|
|
Some More Detail | ||
| Capesoft's Messaging Features [Suggested Reading] | |||
| Using the Capesoft MessageBox Templates | |||
| General Info - for manual procedure adding | |||
| International Language Support | |||
| Relationship with other products [New in Version 1.53] | |||
|
|
Support | ||
| Frequently Asked Questions | |||
| Object Documentation | |||
| How to get Technical Support | |||
|
|
General Information | ||
| What the users are saying | |||
| Source Code Policy [Important] | |||
| Copyright and License | |||
| Distribution | |||
| Where can you get it | |||
| Version History [NB for existing users] | |||
|
NB:
Existing users upgrading from a previous version, should read all the Version
History notes of the subsequent versions as
well as the release notes for this version.
|
|||
Note: The MessageBox text is limited to 1024 characters.
![]()
| 1. | Run the supplied installation program. (You may have already done this, to get this far). |
Note: Please take note of the example applications
section of this doc to demonstrate
some of the features of Capesoft MessageBox.
![]()

Open your dictionary (of your application that you want to add MessageBox to) and import the MessageBox.txd that is found in the clarionx\3rdparty\libsrc directory.
Run the Template Utility 'ImportCSMessageBoxxxx' (In the 'Application' menu, select the 'Template Utility'). xxx meaning abc or leg (for legacy) depending on which template set you are using for this application (for multi-DLL projects - do this only on the data DLL).
Note the names of the 3 procedures added: ds_Stop, ds_Halt and ds_Message (these are the names of the 3 procedures that will be used for the stop(), halt() and message() functions).
On the Basic tab of the MessageBox Global Extension template select the corresponding procedure for each of the procedures required. So for the Message Box Procedure, select the ds_Message procedure.
For Multi-DLL applications:
There is only one application in each directory, except the Multi-DLL application example, which has all the applications for the multi-DLL in the one directory
The Examples are as follows (all apps are 32bit, stand-alone unless specified):| AppName | Feature Description |
| msgbox.app | 1. Illustrates the use of Messages, Stops and Halts using
the 'Capesoft MessageBox with Features' objects. 2. It uses the example tps logging file that is shipped with Capesoft MessageBox to log messages. 3. It uses graphics and text coloring on the message box window (Transparent Strings for the message text). 4. A Browse window to show the Log File. |
| Legacy Multi DLL | Illustrates the use of messagebox in a Multi-DLL application. Compile the rootdll.app, then the function.app, then the mainexe.app. |
| MesBox&HyperActive | 1. Demonstrates Capesoft MessageBox in conjunction with HyperActive functionality. |
| 1.1 | In your application's global template open the Capesoft MessageBox's Global Extension template and follow the steps 1.11 through 1.17 to activate the message logging. |
|
Note: If you want to have
more than one button on your message box and you want to use this
feature, then you must have a default button!!!
|

NB: Before continuing, at present Clarion does not support Icons on XP-type buttons. So if you use an icon on a button you will loose the XP type look (if you have a manifest file attached to this EXE) of the buttons.
Sometimes it can be handy to display an icon on a button instead of or as well as text. There are 2 ways of doing this:
1. Including the icon in the button parameter:
The button parameter will need to be a string, so you will not be able to use the Clarion Button equates when using icons on the buttons as well - using this method (more about this in method 2). You can use the Clarion Icon equates in the string though for the relevant icons. The icon equate or icon file must be enclosed in square brackets. If the filename is placed before the button text, then it will be positioned to the left of the button text, otherwise it will be placed to the right of the button text.

| 1. | In your Local Message Control Template you need to change the following options on the 'Features' tab: |
| 1.1. | You need to enter a variable for the Email details in the field provided. There is a field already supplied which you may use called EmailLink. |
| 1.2. | You need to enter an email address (use quotes or a variable).
If you want an addressee rather than a mail address to appear in the 'To'
field of the email, then you can enter the address as follows (for e.g..):
'Joe McRidgson <<joem@worldwidesupport.com>' |
| 1.3. | You can specify a descriptive subject line which will enable
the reader of the email to realise that the originator of the email is
the program.
|
| 1.4. | You can specify whether you would like MessageBox to automatically confirm whether the URL on the MessageBox (that is the hyperlink) is a web URL or not. If you check the 'Override Email if HyperLink is a web URL' checkbox then this will confirm if there is a 'www.' or a 'http://' at the beginning of the URL. If these strings are found at the beginning of the URL string, then the Email construction will be by-passed and the URL will be passed to the browser. |
| 2. | In your HyperActive Local Extension Template you need to set the URL of the Hyperlinked string. In the HyperActive Control list on the Hyperlink tab, select the ?HALink control and set the URL to the same variable that you set in 1.1. above (probably EmailLink). |
| 2.1. | The ThisMessageBox.HyperLink property (in step 3) should
be set to the text that must appear in the HyperActive string control
on the MessageBox. If this is left blank, then the Hyperlink will be hidden.
Thus (with the above template setup): ThisMessageBox.HyperLink = 'Mailto: Capesoft support' will yield the following message and email (when the URL is clicked):
![]() |

![]()
| 1.1 | Click the 'Global' button on the Application tree window. |
| 1.2 | Click on the 'Extensions' button on the 'Global Properties' window. |
| 1.3 | Click on the 'Insert' button on the 'Extension and Control Templates' window. |
| 1.4 |
Select the 'Activate_MessageBox' template from the list
of extension templates and click on the 'Select' button.
![]() |
| 1.5 |
Back at the 'Extension and Control Templates' window there
should appear the template with its details on the right.
![]() |
| 1.6 | Debugging: Check the 'Disable All Capesoft MessageBox Code' checkbox if you dont want to generate any Capesoft MessageBox code. This is useful if your app doesn't compile and you want to exclude all Capesoft MessageBox source when compiling. |
| 1.7 | Capesoft Functions to Use: If this is part of a Multi-DLL app, then jump to 1.26. Alternatively, select the Capesoft MessageBox functions that you require. For example, if you would like to use just the Messaging function, then uncheck the 'All' check box and check the 'Messages' check box in the 'CapeSoft Functions to Use:' group. |
| 1.8 | Once you've selected which functions you require, the object selection will be enabled. |
| 1.9 | Procedure Selection: Select a window procedure on which the message code will be populated. Use the 'Message Box Procedure' drop list to do this. You need to do this even if you do not require the 'Messages' function as the Stop and Halt functions require this procedure. |
| 1.10 | You will need to enter a Stop procedure name if you require the Stop function (and like-wise for the Halt function). |
| 1.11 | Select the object to use: You can either choose to use the 'Standard Clarion Message' objects, or you can use the 'CapeSoft Message Box with features' objects (see Capesoft's Messaging features). |
| 1.12 | ClarioNET support: If you have the ClarioNET global extension template added to this application, then the ClarioNET Support option will appear. Similarly for WebBuilder applications, you can enable the WebBuilder support in MessageBox. |
| 1.13 |
![]() Change to the 'Logging' tab to set up the logging options. Leave the 'Disable Logging' check box unchecked (if you require Message logging) and select a file from your dictionary for the Message Logging File. (see Importing the Message Logging File to use the file shipped with MessageBox) You can also leave this blank to use the default ASCII file ('c:\MessageBox.Log'). |
| 1.14 | Selective Logging: If you only want to log Stops and Halts, then you can check the 'No Logging for Messages' check box. Similarly for only logging Messages, check the other two check boxes, etc. |
| 1.15 | If you want to turn message logging on at program startup, then check the 'Automatically Log Messages' check-box. |
| 1.16 | Fields: You can equate some fields in your file to the Capesoft MessageBox Fields if you require them in the entry fields supplied. These fields are optional, and are there because we find them useful. You can create extra fields if you would like to and populate them with your own info. You can use the object embed in the PrimeLog method. These fields are not available if you are using the default ASCII file. |
| 1.17 | Record Limits: You can limit the logging file if you want to. You can either limit it by Date or Count. Select either from the 'Limit By:' drop list box. If you are using the default ASCII file, then you will not be able to limit it. |
| 1.18 | If you selected to limit the file to Date, then you can select how far back you want to store records. The limiter is in days, so any messages logged more than this 'limit' ago will be deleted. If you selected to limit the file to Count, then you can select the maximum amount of messages to be stored in the log file. The messages will be logged until the limit is reached, when the oldest record will be removed every time a new message is logged to the file. You can use a variable if you like, although you must be sure to set the variable before the first message()/stop()/halt() is called. |
| 1.19 |
Go to the 'Features' tab if you selected to use the 'CapeSoft Message Box with features' objects then you will be able to tweak the template to suite your needs on the 'Features' tab. If you don't require logging, then you can check the 'Disable Logging' check box. This will save you the time of having to create the Logging file in your dictionary (see Creating the Logging File). All the other features will be available as and when you require them, simply by setting the respective properties. |
| 1.20 | Remember Features: You can remember Some, All or None of the feature settings by checking/ unchecking the respective check boxes. If you check the 'Remember xxx' check box, then this property becomes static and you need to manually reset the activating property when you do not require it. Alternatively, the property gets cleared after the message box is displayed. |
| 1.21 | When the TimeOut feature is used, you can display a counter to indicate the time left before the TimeOut occurs. Check the 'Display TimeOut Counter' checkbox to set this property by default. You can set this feature on at any time using the ShowTimeOut property. |
| 1.22 | You may want to display a vertical bar in your Message windows. You can use || double vertical bars and check the 'Allow Double Vertical bars to be displayed as a bar' checkbox in order to display a vertical bar. Otherwise, || will mean two line breaks in your message text. |
| 1.23 | Dont Show This Again Settings: You can choose whether you would like to store the DontShowThisAgain setting in an INIFile or the windows registry. If you selected the Registry, then you can set the Registry sub-folder (inside the HKEY_LOCAL_MACHINE\SOFTWARE) which will contain the status of the DontShowThisAgain for your messages. There is also an option to select 'Other' and enter your own Registry sub-folder in the field provided (use quotes for constants or a variable name). |
| 1.24 | If you selected an INIFile then you can set the INI file which will
contain the status of the DontShowThisAgain for your messages. It was
previously set to 'CSMesBox.ini', so existing programs should retain this
setting. Appame.ini will be the name of your application file, or you can
use the existing default or the win.ini file. There is also an option to
select 'Other' and enter your own ini file in the field provided (use
quotes for constants or a variable name).
You can set the INI Section which will contain the status of the DontShowThisAgain for your messages. It was previously set to 'CS_Messages', so existing programs should retain this setting. Application will be the name of your application file, or you can use the existing default or the command that was used to start the application (This is useful for DLLs used with different EXEs so that you can retain different settings for the different EXEs). There is also an option to select 'Other' and enter your own section name in the field provided (use quotes for constants or a variable name). |
| 1.25 | You can enter a HotKey to create a GPF if the Message window is open. This is particularly useful when you have a infinite loop with a stop in it, or you want to debug using GPF Reporter. |
| 1.26 | |
| 1.27 | If this is a Multi-DLL application and you want to define the Capesoft MessageBox code in this DLL and export it to the other DLLs and EXEs (i.e. this is the data DLL), then check the 'Export Capesoft MessageBox data defined in this DLL'. If you've checked this, then you'll need to fill in all the relevant settings (1.7 - 1.26). |
| 1.28 | |
| 1.29 | If you would like the default language to be a language other than English, then you can enter an Initial Translation File. This should include the path() if the file is not in your windows directory. |
| 2.1 | In the application window, select your message box window procedure and click the 'Properties' button. |
| 2.2 | In the 'Procedure Properties' window, click the 'Window' button. |
| 2.3 | Click the 'Control Template' item in the 'Populate' menu. |
| 2.4 |
Select the 'CSMesBox_MessageBoxControl - Capesoft MessageBox
Controls' template, and click on the 'Select' button.
![]() |
| 2.5 | To edit the control properties, quit and save from the window editor and click the 'Extensions' button on the Procedure Properties window. |
| 2.6 | Select the 'Capesoft MessageBox
Controls' template and change to the 'Appearance' tab to edit the following: ![]() |
| 2.7 | You can check the 'Make Buttons Flat' for flat buttons on the message window. |
| 2.8 | You can check the 'Transparent Strings' to make the message text (DontShowThisAgain checkbox, Timer notifier and the Hyperlink string - where used) transparent. This is useful if you are applying Wall paper to the window. |
| You can check the 'Transparent Buttons' to make the message buttons transparent. This is useful if you are applying Wall paper to the window, although transparent buttons are not supported by manifest files in Windows XP. | |
| 2.9 | You can check the 'Centralize the text on the window' check box in order to center the message text (other wise the text is left justified). |
| 2.10 | On the Icons Tab:
Default Icon: You may enter a default icon for the messages that don't have icons. If you are using ClarioNET and you would like to make use of icons in your message windows, then you need to enter a default icon. This will ensure that message()s without icons have the default icon assigned to them. You cannot use an equate for a default icon when using ClarioNET and WebBuilder as the equates are not supported by ClarioNET and WebBuilder. You can enter Default icons for the buttons as well. Use the fields in the Default Button Icons group to stipulate the icons for each button equate. |
| 2.11 |
On the
'Features
Tab':
If you would like to maintain the status of the GlobalRequest and GlobalResponse variables (on by default), then you can check the 'Preserve GlobalResponse and GlobalRequest' checkbox on the Advanced tab. The diagram below shows the ABC ErrorClass name (in the
global properties) on the left and the field where you should fill this
in in the MessageBox control template on the right. The procedure name
is only available in ABC applications.
![]() |
| 2.12 |
Clarion 5.5 (and
higher) users
only. If you would like to maintain the Procedure name in your GlobalErrors
class then you need to check the 'Maintain the Procedure name in the ErrorClass'
checked. Checking this checkbox will ensure that the procedure name, from
which the message/stop/halt was called, remains the procedure name in the
ErrorClass. Alternatively, the name of your MessageBox window will be the
name that appears in the procedure name of the ErrorClass. If you checked
this checkbox then you need to enter the correct name in the 'Global Error
Class name' field. The default is 'GlobalErrors', which is what is normally
used. If you have a different name for your global ErrorClass (see on the
'Global Objects' tab in your 'Global Properties') then you need to match
that name here.
Note: Checking this will also mean that the FromProcedure property is set with the procedure that is currently active. This means that you will be able to log the procedure name from where the Message() command was called. If you would like to display the procedure and application name that called the Message() function, then you can check the relevant checkboxes. This will place the Procedure and/or application name in square brackets in the title bar. |
| 2.13 | If you would like to display the calling Application name, then check the 'Display the Application name calling the message' checkbox. This useful in a Multi-DLL application (or Multi-EXE), also so that the message is automatically identified with your application. |
| 2.14 | HyperActive users only. If you would like to be able to mail your message as a support facility, then you can set this up on the 'Features' tab. (more details) |
| 2.15 | Click 'OK' a couple of times to return to the Application window. |
| 3.1 | In the application window, select your Stop source procedure and click the 'Properties' button. |
| 3.2 | In the 'Procedure Properties' window, click the 'Extensions' button. |
| 3.3 | Click the 'Insert' button on the 'Extension and Control Templates' window. |
| 3.4 |
Select the 'CSMesBox_ActivateStop - Capesoft Stop' template,
and click on the 'Select' button.
![]() |
| 3.5 | Click 'OK' a couple of times to return to the Application window. |
| 4.1 | In the application window, select your Halt source procedure and click the 'Properties' button. |
| 4.2 | In the 'Procedure Properties' window, click the 'Extensions' button. |
| 4.3 | Click the 'Insert' button on the 'Extension and Control Templates' window. |
| 4.4 |
Select the 'CSMesBox_ActivateHalt - Capesoft Halt' template,
and click on the 'Select' button.
![]() |
| 4.5 | Click 'OK' a couple of times to return to the Application window. |


| 5.1.1. | The 'Active' check box will activate the 'DontShowThisAgain' check box feature. |
| 5.1.2. | The 'Value' field sets the length of the Timeout for the message. The time out value is in One Hundredths of a second. So for an 8 second time-out, set the value to 800. You can also enter the name of a variable. |
| 5.1.3. | The 'File:' field indicates the wavfile to be played when the next message is opened. You must use quotes for a string, alternatively you can use a variable. |
| 5.1.4. | The 'Enable' check box will enable message logging. You must not have disabled this feature in the Global Extension Template. |
| 5.1.5. | The 'x:' field entry is used to set the amount of messages that must be skipped. |
| 5.2. | The 'Remember' check box is used to set the Static attribute for the feature. The SkipNext feature is by nature a static feature, so it has no Remember check box. If you set the Static Attribute on in the global extension |
| 5.3. | 'Clear checkbox' will place code to clear both the static and the active properties. |
| 6.1. |
In your application window, select the 'Template Utility'
item from the 'Application' menu in the window menu bar.
![]() |
| 6.2. | Select the ImportCSMessageBoxABC or the ImportCSMessageBoxLegacy (depending on whether this is a legacy or ABC application) to import the 3 procedures. |
![]()
| 1.1 | In the Application Tree window, select the 'New' item from the 'Procedure' menu. |
| 1.2 | In the window that appears enter a name for your window (like MyMessageBox) and click the OK button. |
| 1.3 | In the 'Select Procedure Type' window that appears, select the 'Window - Generic Window Handler' and click the Select button. |
| 1.4 | Click the 'Window' button in the Procedure MyMessageBox Properties screen that appears. |
| 1.5 | Select the 'Window' option in the list that appears (the object will do all the fancies - so the bare minimum is all we need) and then click OK. |
| 1.6 | You don't need to do anything in the window that appears, but it is advisable that you set the Font to the Font you require. You can also add a wallpaper to the background of the window. If you add wall paper, then it is advisable that you check the 'Transparent Strings' check box on in the MessageBox Local Control Template that you will add just now. You can quit the window editor, as the template and objects will do the rest. |
|
Note: You must get the
following prototype (1.6) in your Message Window's prototype correct!!!
|
| 1.6 | In the Prototype field enter the following prototype (with parameters): (STRING MessageTxt,<STRING HeadingTxt>,<STRING IconSent>,<STRING ButtonsPar>,UNSIGNED Defaults=0,BOOL StylePar=FALSE),UNSIGNED,PROC It is essential that this prototype is correct. |
| 1.7 | In the Parameters field, enter the same string for the parameters (leave
the return definition off). For example: (STRING MessageTxt,<STRING HeadingTxt>,<STRING IconSent>,<STRING ButtonsPar>,UNSIGNED Defaults=0,BOOL StylePar=FALSE) |
| 1.8 | Check the 'Declare Globally' checkbox. |
| 1.9 | Enter a variable in the 'Return Value' field. This should be a variable of type 'UNSIGNED'. |
| 1.10 | Click the OK Button to exit the window. |
| 1.1 | If you're in the Application editor, then quit it and from the File menu, select the Open item. Select your dictionary in the file dialog box (you will probably need to change the 'Files of type' drop list to 'Dictionary (*.dct)') and click the 'Open' button. |
| 1.2 | In the dictionary editor, click the 'Import Text' from the File menu. |
| 1.3 | Select the MessageBox.txd file that is found in the clarionx\3rdparty\libsrc directory. |
| 1.1 | In the Application Tree window, select the 'New' item from the 'Procedure' menu. |
| 1.2 | In the window that appears enter a name for your window (like MyStop or MyHalt) and click the OK button. |
| 1.3 | In the 'Select Procedure Type' window that appears, select the 'Source - Source Procedure' and click the Select button. |
|
Note: You must get the
following prototype (1.4.1 for Stop or 1.4.2 for Halt) in your Stop/Halt
Procedure's prototype correct!!!
|
| 1.4.1 | In the Prototype field enter the following prototype (for the Stop
function): (<string StopText>) It is essential that this prototype is correct. |
| 1.4.2 | In the Prototype field enter the following prototype (for the Halt
function): (UNSIGNED Level=0,<STRING HaltText>) It is essential that this prototype is correct. |
| 1.5.1 | In the Parameters field (for the Stop function), enter a parameter
for each field in the prototype (i.e. there must be 1 parameter). For example: (<string StopText>) |
| 1.5.2 | In the Parameters field (for the Halt function), enter a parameter
for each field in the prototype (i.e. there must be 2 parameters). For example: (UNSIGNED Level=0,<STRING HaltText>) |
| 1.6 | Check the 'Declare Globally' checkbox. |
| 1.7 | Click the OK Button to exit the window. |
It is really useful to be able to add your own code to some of the MessageBox objects. You can derive these locally (i.e. for this application only), by going to the Global Embeds and selecting the Capesoft MessageBox | ThisMessageBox and the name of the method that you want to derive as follows (where the Init method has been derived):

The above embed point is really useful for setting variables and
properties, before initialising MessageBox. In each method you will find 3 (or
perhaps 4) embed points: a Data, Before the Parent Call and After the Parent
call embed point. If the template generates code after or before the parent
call, then there will be an extra embed point to enable you to place code on
either side of the parent call as well as on either side of the template
generated code.
![]()
| 1.1 | You can start with a default translation file if you don't want to start your program with the default in English. You can do this in the global extension (in your EXE if this is a multi-DLL project). |
| 1.2 | If you are supporting multiple
languages then you can change the language at run-time using the TranslationFile
property. You should have one translation file for each language that your
program will use. For example: case Selected_Language of 'English' ThisMessageBox.TranslationFile = path() & '\English.trn' of 'Brazilian Portuguese' ThisMessageBox.TranslationFile = path() & '\Brazil.trn' of 'Spanish' ThisMessageBox.TranslationFile = path() & '\Spanish.trn' else if FileDialog('Select Translation File',ThisMessageBox.| TranslationFile,'Translation Files|*.trn|All Files|*.*',16) . end |
| 1.3 | When you run your program
and call a message/stop/halt, the translation file will be created (if it
is non-existent) as an ini-type file. There will be a section for the button
text and one for miscellaneous other text as follows: [MessageBox_Buttons] Button:OK=OK Button:Yes=&Yes Button:No=&No Button:Abort=&Abort Button:Retry=&Retry Button:Ignore=&Ignore Button:Cancel=Cancel Button:Help=&Help [MessageBox_Text] StopHeader=Stop StopDefault=Exit? HaltHeader=Halt TimeOutPrompt=Time Out: DontShowThisAgain=Don't Show This Again LogTimer=Timer |
| 1.4 | Once the entries are
placed in the ini file, you will need to edit these with a text editor.
Example: Button:Cancel=Cancel would appear in the text file as the default text for the Cancel button. To change the text to Portuguese edit as follows: Button:Cancel=Cancelam |

If you have a thread manager (e.g. UBeaut) installed, then by default only one copy of your message window can run. So if you happen to have a message window open and then call it from another thread, it will return immediately. This can have tragic results if the user's being asked to confirm some major action.
You will need to disable your thread manager on your MessageBox window. If you are unsure as to how to do this, you will need to contact your Thread manager supplier.
My app seems to hang when a Message() appears. What's wrong?
I'm getting Compile Errors
| 1.1 | If I get an error in my logfile, it GPFs without warning when I log a message. How do I inform my users of this? |
| Answer: |
The problem is you can't use your message() function to report the
error (as it is open already). One solution is to not use the MessageBoxHalt()
function and call the halt if you encounter an error in this instance.
This will ensure that the user is given some feedback when the program
exits (after all - the program is about to GPF in any case).
Thus:
If errorcode() then halt(,'There
is a problem with the MessageBox file...') .
!For Legacy
If access:<MessageBoxFile>.Errors.SaveErrorCode then halt(,'There is a problem with the MessageBox file.') . !For ABC - Clarion5 and C55 If you are using Clarion 6 then: If access:<MessageBoxFile>.Errors.Status.V.SaveErrorCode then halt(,'There is a problem with the MessageBox file.') . !For ABC - Clarion6 You can put this code in the embed point - ThisMessageBox|InsertLog|(4) After the Parent Call and generated code. Alternatively, if you are using the LimitLogFile feature, you must put this check in the ThisMessageBox|LimitLog|(4) Before Generated Code, as the LimitLog method is called before the above embed point is reached. Note for ABC users: Unfortunately the writers of the ABC classes have deemed it beneficial (for reasons best known to them) to make the Errors class a protected property. You need to remove the PROTECTED attribute of the Errors property and the SaveErrorCode property in the ErrorClass. You can do this in the abfile.inc and the aberror.inc header files. |
| 1.2 | I am having a problem with logging. Nothing is being logged to my logfile. What could I be doing wrong? |
| Answer: |
You need to check that you:
1. are in fact using your own stop - check that the 'Functions
To Use' options group on the Basic tab of your MessageBox Global Template
has either the 'All' Checkbox checked or the 'Stop' checkbox.
2. have selected the 'Capesoft MessageBox with features' object
on the Basic tab of your MessageBox Global Template.
3. have not disabled MessageLogging (on the Features tab of your
Global MesageBox Template).
4. have either checked the 'Automatically log messages'
on the Features tab of your MessageBox global Extension template your
you have set the ThisMessageBox.LogMessages = 1 at the beginning of your
program.
5. have checked the 'Remember logging' on the Features tab of
your MessageBox global template.
6. have all the checkboxes cleared in the Selective logging group
on the Features tab of your global template.
7. have specified your file as the logging file on the LogFile tab
of your messageBox global template.
if you have checked all these and are still not logging:
8. Do a scan of your source routines for ThisMessageBox.LogMessages
= 0 to make sure that the logging is not being turned off.
if you have checked this and are still not logging:
9. Place a trial stop in your code and set the ThisMessageBox.LogMessages
= 1 immediately before this. If this is the last step and you can see
the stop being logged, then your static property has not been set for
logging, or has been cleared at some point.
|
| 1.3 | I'm trying to use the logging feature in my Message/stop/halt functions but it GPFs when the window closes. |
| Answer: | You've probably checked the 'Disable Logging' check box in the Global Extension Template, but you're setting the logging feature flag. You need to uncheck this 'Disable Logging' check box in order to allow you to use and activate the Logging feature. |
| 1.4. | If I set my MessageLog file to Current/DataDir(Messagebox.log) I can't find it. |
| Answer: |
The ASCII message file name is set in the Init method of the MessageBox
class. If you're only setting your path after the call to the
ThisMessageBox.Init, then the logfile will be placed in whatever path
your application started in.
Example:
GlobalErrors.Init(GlobalErrorStatus)
INIMgr.Init('.\msgbox.INI', NVD_INI) ! Configure INIManager to use INI file DctInit
!You need to set your datapath here
!CapeSoft MessageBox init code ThisMessageBox.init(1,1) !End of CapeSoft MessageBox init code SystemParametersInfo (38, 0, lCurrentFDSetting, 0) ! Configure frame dragging |
| 2.1 | How do I add information to the log about where the message box was invoked from (i.e. the procedure that called it)? |
| Answer: |
You can do this in C5.5 or later and is only available in ABC
applications.
1. In the MessageBox procedure - extensions - Capesoft MessageBox
Controls template, go to the 'Advanced' tab and check the 'Maintain the
Procedure name in the Error Class'.
2. If you are using a table in your dictionary to log the messages,
then make sure that you have a field in your MessageBox logfile to store
the Procedure name in it (setup in the MessageBox Global Extension
template - in the Logging tab)
|
| 2.2 | I want to just log all/some of the Clarion Messages without displaying them. How do I do this? |
| Answer: | There's a
DontShowWindow Property property in the 'CapeSoft Message Box with features'
class, which (if set) will just log the message without displaying it.
This is easy in Clarion5.5 (and above) if you are using ABC methods: 1. Turn off Remember logging in the Messagebox
Global Extension Template. case ID
|