REQUEST A DEMO

Tag: cbbatch

Extracting ClearBasic code

October 11, 2011 In Clarify, it’s pretty easy to extract one (or a few) Clearbasic code module from the database using CBEX or UI Editor. But on occasion, it’s useful to be able to extract *all* the CB code. It’s not easy to do that with the baseline Clarify tools.   When diving into a customer environment, either to help re-create their environment locally, or to evaluate porting the CB code to a web-based application, it’s nice to have all the code available at once.   It’s also nice to have access to the baseline (Clarify-defined) CB code – which allows us to use baseline functions, as well as mine that code for useful tips and undocumented methods.   We have a of of scripts and utilities that we use here at Dovetail. One of them is a script to extract ClearBasic code –…

ClearBasic cbbatch tip: Display the line number of the most recent error

September 27, 2011 After over a decade of doing ClearBasic coding, I’m still learning new things.   Today, Marek pointed out the Erl function, which returns the line number of the most recent error.   Within the Clarify Client, if you use the –debugCB option, you’ll get the line number of the last CB error, so it’s pretty easy there.   But in cbbatch, it doesn’t tell you the line number. Error message, no line number   For example, I have a simple cbbatch script that I’ve coded with an error.   Notice how it tells me the error, but it doesn’t tell me *where* the error is.   Let caveman debugging commence. Ugh. More error details   Now, lets add a simple error handler.   At the beginning of my routine, I add an On Error statement: On Error Goto ErrorHandler   And then at the end of…