![]() |
|
Get automatic notification of new items! RSS feeds are available for:
All blog entries
All new items, including blogs
Posted Friday, May 01, 2009 by Dave Harms
As seen in today's webinar, the next release of C7 will feature a C6 compatibility mode to retain the decidedly non-industry-standard behavior of being able to have controls that are declared inside a container control but display outside the container control. In that compability mode the designer asks if you want to move controls into/out of the parent (i.e. tab) control, as in C6.
Also of note, the Applications Pad is getting more toolbar buttons and is intended to be the primary way developers interact with APP and DCT files.
Posted Friday, May 01, 2009 by Dave Harms
Watching the webinar - Z just said there will definitely be a DevCon in 2009...
Now, he also said that it won't be until after there's a .NET AppGen, which he's previously indicated is 3-6 months away. I'm not sure there's quite enough time in the year for this, as to my mind a DevCon needs a good six months lead time.
UPDATE: Bob F certainly has DevCon on his mind, however. He just mentioned it again...
Posted Thursday, April 30, 2009 by Dave Harms
I had another report the other day of problems with FireFix printing source code as gibberish. This has come up before in the blog, but I've come across a suggestion that creating a new profile is a cure for certain FireFox printing problems.
Posted Monday, April 13, 2009 by Dave Harms
Among other things C7 RC2 now has two Run buttons. The prevous Run functionality (which calls MSBuild first to verify all the pieces are there) is now assigned to a "play" button which has a little lightning bolt added. The plain "play" button is now a Run the Startup Project button which calls the solution's EXE without doing any checks first. I'm delighted to report that this means my previous blog post about a simple Clarion app to RUN whatever program was passed to it, along with a Tools menu option to call the app, is now irrelevant.
What I neglected to mention in that blog post is that I also considered creating a batch file to run the solution's EXE directly, but batch files pop up console windows. My Clarion solution using RUN executed the EXE transparently.
But RUN isn't the solution to every problem. For instance, Brahn Patridge discovered some problems with the maximum length of parameters accepted by the template #RUN statement which he circumvented by writing out and executing a batch file. And that resulted in the annoying console window popup. Brahn eventually found a nifty tool called Hidden Start that executes batch files and console apps without displaying a window. Hidden Start is free, although a license is required for commercial distribution. Thanks for the tip, Brahn.
UPDATE: Mark Riffey tells me that AVG flags Hidden Start as a virus. As far as I can tell this is because Hidden Start can be used to run programs without the user receiving any indication that the program is running, not because there's an actual virus. But use appropriate caution.
Posted Monday, March 30, 2009 by Dave Harms
Here's a tip Russ Eggen posted in the beta newsgroup on setting up workspaces in C7 (reproduced here with Russ's permission):
My editor of choice (until recently <g>) is Textpad. It has one very nice feature I found I can't live without - workspaces. What this is you have a bunch of source files open (even if in different folders). You save the workspace like a regular file. When you open a workspace, all files opened are opened again. A marvelous shortcut to opening one file at a time. I use this for template coding, web sources (site code and shopping cart code), etc.
You could open each file in C7 on the start page, its opening one file at a time and you still have to contend with tab switching since the start page is no longer the current tab. Its slower than opening one file to open many files.
So this is how you can create a "workspace" in C7:
- Choose File/New/solution, project or application (or press Ctrl-Shift-N).
- Select SharpDevelop as the solution, for the type, select "empty solution".
- Fill in the name of the "workspace", in the folder you wish.
- You have only one item in the solution explorer. Expand this to show "solution items" - it is empty.
- Right-click and choose Add/Add item...
- Navigate to the folder you want, select one or multiple files and press open. The files are added there.
- Repeat #6 until you have loaded all the sources you want.
The "solution" is now on the Start page. When you restart or select the start page again, just open the "solution" and you can then open any file in it as you wish. You don't have to worry about build state since there is nothing to build, so nothing to change there.
There are limitations:
- It won't remember where in the file you were editing.
- The files won't open as the default, you have to open them.
If you are using code folding, it does remember that setting.
A few additional points came up in the ensuing discussion. You can run multiple instances of the IDE, so you can keep a workspace handy while you work on another app. The only issue I've noticed with multiple instances of the IDE is that the last one closed writes the recent projects list. So let's say you do the following:
Instance B will add the just-created solution to the recent projects list. In fact, before you exit instance A you can restart the IDE and see that project in the list. Now close B, then close A. Open the IDE again. The solution added by B will not be in the projects list, because instance A overwrite the list with what it had in memory.
Finally, you can always add files to your solution without necessarily compiling them. Just select the source file in the solution explorer, go to the Properties pad, and set the Build Action to None. Recent versions of C7 let you add "solution folders" to projects, and when you add files to these folders you are creating links to those files. I've used this feature to set up a Templates folder with links to template files I regularly edit. And since you can have multiple projects in a solution, it's easy to set up a project just for, say, frequently-edited templates which can then be attached to any solution where they are needed.
Posted Monday, March 30, 2009 by Dave Harms
After the latest beta (5225) release several developers asked for a Run button which would simply run the current project instead of building the application first. There is a Start without Debugger option (Ctrl-F5) but in fact this invokes an MSBuild task. Even if the EXE is already built MSBuild will verify that a recompile isn’t needed, and that can take some time on a big multi-DLL solution.
I decided to play around with the Tools menu to see if there was a way to produce a “run only” behavior, and I did find a solution. But SV has now said that a run only button will be in the next build, but in the event that you can’t wait for the next build of C7, here’s what you need to do to add your own “Run only” menu option.
It was Ben Dell who got me started on the Tools menu. He pointed out that it was possible to run customized MSBuild tasks that way. And if you can run an MSBuild task on a project, why not a task to run an EXE?
First, create a new Win32 EXE solution (not an APP - this will be a hand coded program) called, say, Launcher. Launcher.clw contains just this code:
PROGRAM
MAP
END
CODE
run(COMMAND())
Compile the code.
Next, in Tools | Options | Tools create a new external tool called something like “Run the current application”.
Set the command to your Launcher.exe
Set the arguments to "${TargetPath}" (the quotes take care of long file names, although they may not be necessary) and the working directory to ${ProjectDir}.
Now when you want to launch a program you just highlight it in the solution explorer and choose the “Run the current application” option from the Tools menu.
Posted Thursday, March 19, 2009 by Dave Harms
This was supposed to be Clarion# web app month at Clarion Magazine, but it's starting to turn into a combination of a web theme and an MSBuild theme. Steve Parker followed up last month's closing article on MSBuild with a treatise on multi-app solutions, and tomorrow you'll see a new article on how to use MSBuild to do multi-pass compiles on systems with circular calls (but of course, none of you actually have any circular calls, right?). We'll also have a review of the latest C7 build (5080) tomorrow. Is it almost ready for gold release?
Next week it's back to the Clarion# web app goodies, although there will be a few bits and bobs in there to appease the non-web, non-Clarion# folk as well.
Posted Thursday, March 12, 2009 by Dave Harms
Within the next couple of days I expect to post ClarionMag's first ever screencast. The subject is a small demo app showing how to do AppGen-based Clarion# web development right now, even without a Clarion# AppGen. The secret: a custom template chain we've specifically designed to create MVC web applications using Castle Monorail and NHibernate. What's MVC? It's an increasingly popular way to write testable, maintainable web applications. Even Microsoft has jumped on the MVC bandwagon (although their code is still pretty green).
I'm particularly excited about this template chain as it provides us with the technology we need to begin porting the ClarionMag web application from its current Java code base to Clarion#.
Don't let the small number of pages in this web application fool you - there's a lot packed into this little app. The home page isn't particularly complex, however; it simply gives you an overview of the application's capabilities.
Most of the goodies are in the browse page. There are two versions of this browse. The HTML version features column sorting, filtering (many kinds of filters are possible, although only insensitive LIKE expressions are shown here), and fast server-side paging which allows you to work with large result sets. The browse state is persistent; navigate to another page, come back to the page, and you see the same data as last time.

But HTML browses aren't that pretty, and getting the next set of data requires a distracting page refresh. So there's a sneak peek at an AJAX version of the browse created with the ExtJS toolkit. This browse isn't fully functional yet, nor is it integrated with the templates, but it does demonstrate the use of JSON requests to load a browse without refreshing the page. And it looks a lot nicer than an HTML browse, and behaves the way a browse should. We'll be doing more work with ExtJS components in the future.
There isn't any security on the browse, but there is on the form. It's a simple requirement - you only need to be logged in. So if you attempt to edit, insert or delete a record (from the HTML browse) and you're not yet logged in, you'll see a login page.
You can use the guest login or register your own user id. If you have Javascript enabled you'll see validation messages appear below incorrectly filled fields. (If Javascript is disabled, server-side validation still ensures correct data.)
Once you're logged in you're returned to the form where you can complete the desired changes.
There are several important caveats to this template chain.
First, it's most definitely alpha code, and there's a lot of work to be done.
Second, since the generated code uses the NHibernate ORM to talk to the database you're limited to supported SQL databases. Right now that list includes:
No TPS files there, and wouldn't hold my breath waiting for a TopSpeed NHibernate driver.
(Actually, you can still access TPS or other Clarion# drivers if you wish, you just can't take advantage of the automated validation and data binding, both of which are enormously useful on forms.)
Third, this template chain is not ABC or legacy Clarion compatible. You cannot use it to convert an existing application; you can only use it to create a new application. MVC web development is significantly different from Clarion desktop development, and while it may be possible to write these templates as an add-on, it really isn't practical.
I hope you'll find the upcoming screencast and an accompanying series of articles interesting and useful. Web development is a different beast from desktop development, and many of the issues I'll cover apply to non-MVC web development as well.
And even if you're not interested in doing your own web development you will benefit as a ClarionMag user, as this template chain forms the foundation for the next version of the Clarion Magazine web site....
Posted Wednesday, March 04, 2009 by Dave Harms
I'm working on a demo app for a series of upcoming articles on creating MVC web applications in Clarion#, and I needed some demo data. What, I thought, would be better than programmer jargon? So I grabbed a jargon glossary and set about converting it to a PostgreSQL table. Then I wrote a couple of stored procedures to randomly assemble these terms into test data.
Unfortunately, I keep wasting time actually reading the data. I mean, who can say with a straight face that Clarion programmers don't have baroque dinosaur religious issues....

Posted Thursday, February 26, 2009 by Dave Harms
There have been a number of Clarion-oriented print publications over the years, from newsletters to bound journals. The two best-known are Clarion Tech Journal and Clarion for Windows Journal. A few years back I realized I had most of the CTJ and CWJ issues, and a few old Clarion newsletters. So I decided to begin a collection.
Recently I got a couple of copies of something called the Clarion Developer's Forum, published by David King, from Randy Rogers. I don't recall ever hearing of this publication, and as far as I know the announcement issue and V1N1 are the only issues ever printed. And I've heard there were some UK newsletters as well, which I've never seen.
I'm missing most of the early issues of Clarion Software's newsletter. Larry Sand sent me an original 1987 color brochure and a copy of Volume 1, No 1 of the Clarion Call, which I presume later became the Clarion Developer newsletter (although the numbering doesn't seem to add up).
Have a look at the library page, and if you can fill in some of the gaps please let me know.
Copyright © 1999-2009 by CoveComm Inc. All Rights Reserved. Reproduction in any form without the express written consent of CoveComm Inc., except as described in the subscription agreement, is prohibited.
Clarion Magazine ISSN 1718-9942
One year: $159
(includes all back issues since '99)
Renewals from $109
Two years: $249
Renewals from $199