Claw Capabilities
Q. Why should someone purchase Claw instead of getting another vendor's Windows Ada package? Some of those claim to have a GUI builder that's integrated with the compiler.A. Here are the primary advantages of Claw over the other stuff:
- Portability. Claw is compiler-independent. If your project is based on Claw, you are less likely to be stopped dead by compiler bugs. You can switch to a different compiler and move forward.
- All Ada. Claw was designed from the ground up to be an Ada interface. Claw was designed with the sort of reliability that Ada programmers expect. "List-o-pragma" interfaces don't check arguments, don't raise exceptions, and so on.
- All of the documentation is written for Ada users, and it is intended to be complete. That is, it is not necessary to refer to any other documentation in order to construct your programs. Most of the other vendor's libraries are documented by referring to Microsoft's documentation, which of course requires being able to read C and to translate the information.
- Object-Oriented. Claw is object-oriented through and through. Programming is accomplished by extension; inheritance and finalization are used throughout. Object-orientation allows Claw to manage user-defined objects as well as the ones that it defines. The interface that other builders use is not object-oriented.
- The Claw builder is better, and is improving with every new release. It is designed to encourage users to build good Ada and good Windows programs from the start. It includes knowledge / management for the data structures of your application. (This makes it particularly useful for adding user interfaces to existing code). It also includes the connections between the various windows that make up your application, and supports simulating those connections. For instance, if you want a button push to pop up a dialog, the Claw builder will generate the code for that and support simulating it. Finally, it enforces a strict separation between programmer-written code and the builder generated code, so that it should never be necessary to look at the generated code (because of errors or misbehavior), and regeneration of the code can be accomplished at any time. We're used other builders that were limiting in important ways. Unlike them, the Claw builder supports working on multiple windows at a time. In addition, the Claw builder supports generating dialogs and menus both as code and using templates. If your application will need to be localized, especially by another organization, you will need to use templates.
- Technical Assistance. See how long it takes for a human to answer your questions with any of the behemouths. Then call us at 800-722-3248 [608-245-0375 if overseas] from 12-8 Central.
- Price is a final consideration. The Personal Edition Combo is available for just $295, and it includes both Claw and the Janus/Ada 95 compiler. If you already have our compiler you can get the Claw Personal Edition for just $195. And once you buy from us, you will be able to update your package to the latest and greatest for about $100 regardless of how many releases you skip.
Q. I am not a Windows programmer, but I would like to write Windows applications in Ada. Will Claw allow me to do anything in Ada 95 that a Windows programmer can do, or do I still need to learn the Windows architecture and Win32 API?
A. The long term goal for Claw is to be able to do almost anything possible in Windows. (There are of course some capabilities which are of doubtful value, and those will continue to be omitted).
Claw 1.3 supports most GUI functions of Windows. There are other useful capabilities outside of the GUI which aren't supported in this version (Multimedia, ODBC, DirectX, etc.)
In that portion of the GUI functions supported, you can build programs using only Claw and its documentation. Nothing else (other than an Ada compilation system) is required. Of course, you may find it helpful to refer to other Windows documentation, but it is NOT required.
The Claw architecture is similar to Window's for obvious reasons, so it probably is helpful (but again, not necessary) to understand the Windows architecture while using Claw. You should not need to understand anything about Win32 itself unless you need some advanced capability not supported by Claw.
Q. I have just installed Rational Apex for NT, and was looking at the Claw Introductory version that comes with it. What does the full version have that the intro doesn't have?
A. All of the Introductory versions contain the same functionality, so this answer applies to any Introductory version of Claw, whether it came with Rational Apex for NT, Aonix ObjectAda for Windows, or was downloaded from our website.
The full Claw includes many more packages supporting most of the GUI functionality of Windows. A quick comparison of the source shows that the demo has about 90 source files totaling 2.5 Megabytes; the full version (for Claw 1.3) has 169 source files totaling 5.6 Megabytes. Important functionality like the File Open dialog are supported only in the full Claw. It also includes many additional sample programs (there are about 45 in the full Claw). The documentation for the full Claw includes a printed manual, on-line tutorials, and reference documentation for the claw packages. And last, but by no means least, the full builder is included, without the nagware splash screen and support for additional controls such as list boxes.
Q. Could you explain the difference between the personal edition and "regular" edition of Claw?
A. The personal edition only includes the support for a single compiler, and has an install tailored to that compiler. For instance, the Apex personal edition automatically creates the subsystems and views to contain Claw and its examples. The generic edition contains support for all of the compilers supported, and a generic install. That means you have to set up Claw for your compiler by hand. The generic edition makes it easier to change to a different compiler (including one that hasn't been created yet), so it decreases risk, especially for long-running projects.
Installing Claw for GNAT
Q. We recently installed Claw for GNAT. The install appeared to complete properly, but there were only a couple of files in the Claw\Source directory. What is wrong here?A. One thing that could have happened is that Gnatchop was not able to run properly for some reason. Since the install cleans up the original files after installation and chopping, a failure to chop properly would leave your source directory empty and example directory partially empty. The setup program verifies that it can find and run Gnatchop, but it has no way to verify that the running actually works. Gnatchop is just a batch file which calls other programs, and a problem with one of the other programs would go undetected. In this case, we suggest the following remedy:
Open a command window.A. Also, some versions of GNAT come with a Gnatchop.Bat that doesn't run on Windows 95. To fix it, simply load it into your favorite editor and resave it. This changes the line end characters to the <CR><LF> pairs that Windows 95 is expecting.
Set up GNAT to run in the command window. Verify that Gnatchop actually functions and writes result files.
Insert the Claw installation disk, and type A:Setup to run the setup program (assuming your floppy disk is A: ).
Install normally.
Q. I have just installed the CLAW Introductory version. When I compile it with GNAT, I get various errors. What is wrong?
A. By default, GNAT uses its static elaboration model, rather than the dynamic model defined by the Ada language. Recent versions of GNAT reject some Claw packages for this reason. The problem can be solved by forcing GNAT to use the Ada elaboration model by using the -gnatE option on all compiles.
Downloading the Introductory version
Q. I've tried to download the CLAW Introductory version. Everytime I download it, it's a different size. And when I run it through WinZip to decompress it, it tells me that it apparently is not an archive file.A. I suspect that you have (or your browser is) trying to download the file as a text file instead of a binary one. We have made that mistake ourselves. If you tried downloading it using a FTP program, sending the command "Binary" before sending the "Get" command usually does the trick.
Claw Serial Number
Q. Your support people asked me for my Claw serial number when I called. I don't know it, how can I find it?A. The serial number is always found on the label of the first floppy disk or on the card with the CD key. If the product was purchased directly from us, you'll also find it on the invoice.
However, we know most users put those things away immediately. Therefore, we've also provided an easy way to find out the number. Simply open the Claw Builder, and select "About Claw Builder" from the "Help" menu. You'll find your serial number in the box.
This won't work if you have received a beta or patch version of the builder from us; in that case the serial number will appear as RRS1-00000. In this case, you'll have to go back to the original disks.
Errors using Bitmaps
Q. I've created a program using bitmaps using the Claw Builder. When I run the program, it raises Windows_Error. What's wrong?A. This is a common problem. (And you don't need to be using the builder - or bitmaps - to run into it.) The most likely problem is with the resource file for your program.
The resource file (generally ending with .RC) contains data related to your program. Among other things, it defines the bitmaps and icons for your program. You might wonder why this is a separate file. Supposedly, it is separate so it can be changed without changing the rest of the program. Practically, hardly anybody takes advantage of this capability. So we think its purpose these days is primarily to frustrate developers and justify the price of support contracts.
The resource file is compiled a by a tool called the resource compiler. The resource compiler generally is included in your compilation system - it is not part of Claw. The exact steps needed to compile resource files depend on the compiler you are using, and are described in the Claw manual.
The Windows linker does not check for missing or out-of-date resource files. Therefore, such programs can be compiled and linked. However, when the program tries to use something in the resource file, it will raise Claw.Windows_Error (to represent a Windows failure not detected specifically by Claw). Often, the Windows error code will be 0 (no error!), which will further confuse matters.
Thus, we recommend that you ensure that the resource file is properly compiled and linked with your application if you are getting unexplained Windows_Errors, especially if the errors occur from a bitmap, icon, menu, or dialog creation operation.
Helpfile errors
Q. Whenever I click on help or on the question mark in a dialog box, I get "Cannot find Cbuild.Hlp. Do you want to find this file yourself?". I can find the file manually and help will work. But if I do this again, it asks the same question again.A. This occurs when you use a restricted user account on a newer Windows system. In the past, Windows set a registry key to find the file after the first attempt, but that no longer works. You can manually set the registry key:
- Log in as an Adminstrator.
- Run Regedit.
- Navigate to HKEY_LOCAL_MACHINE/Software/Microsoft/Help.
- Select "New/String Value" from the menu.
- Name the new value "cbuild.hlp".
- Set the value to the path where CBuild is installed.
- Close Regedit.
Q. Whenever I click on a help file, Windows produces a message that it cannot display the file. I'm using Windows 7. What can I do?
A. The majority of the Claw documentation is currently in the form of .HLP files which can be accessed through the Claw builder. Recent versions of Windows (starting with Windows Vista) don't include the program needed for reading these files. Microsoft makes it available as a free download, see http://support.microsoft.com/kb/917607 to find the download link for your particular version of Windows.
Q. I have just installed Claw 1.1, and the help files do not appear to work properly. Can you help?
A. There is a bug in the help that shows up on some systems and not others. It causes the help to dump you directly into a "Find" screen when you click on ClawHelp or ClawHlp in the explorer. If this happens to you, just let Find make its index. A single topic will be displayed; just click on "Display", and you'll be transported to the opening page.
A more permanent fix is to download the corrected ClawHelp.Cnt file from our web page. Install this into your \Claw\Help directory. Then, clicking on ClawHelp will take you to an appropriate table of contents. (Once you've done this, always enter help via ClawHelp, not via ClawHlp).
Of course, the best fix of all is to upgrade to Claw 1.3. Contact us for details on doing that at info@rrsoftware.com.