I'm sure we have all seen this from time to time! We run our newly compiled program only to have it disappear all of a sudden for no apparent reason. We search and search and search... Finally we find, using whatever debugging methods we choose, that the program goes down when it assigns a value to a variable. Doesn't make any sense at all until we, hours later, realize that the darn variable is a REFERENCE variable! Yep, we accidentally hit the "Reference" checkbox on the column property window.

This looks all so simple and happy, doesn't it?

But there is a deadly problem lurking on that window that is so easy to overlook!

Do you see what it is?

No?

Look again!

The "Reference" checkbox!

In the past years I have probably lost more time to this than anything else and it is nobody's fault but my own!

It happens once in a while and that is the problem. If it happened every day I'd expect it, but it happens perhaps every 3 months or so.

I'm still not sure what I do to accidentally check it! The hot key for it is Alt-F and I'm very used to very quickly hit Alt-F-S to save. Years ago I found that key combination to be easier and more universal than Ctrl-S for Save so I stuck with Alt-F-S and I'm wondering if that's what I'm accidentally doing. Or maybe I accidentally click on it. Don't know.

Whatever the reason is, every so often I check the "Reference" checkbox and it's always when I'm implementing something new. So I, rather logically, assume that it is whatever new I'm adding, not that new variable I just added. After all, what in the world could go wrong when creating a simple variable? As it turns out, quite a lot can go wrong;)

So what happens when you try to assign the "July 31, 2009" date value to a reference variable? Chances are very good that the program is going to fall over in a dramatic way - no GPF, no nothing. It just disappears! It is unlikely that the value 76186 is pointing to anything useful!

It would be nice if a warning message was implemented in Clarion 7 as an option so that it would warn when the Reference checkbox was checked when creating or modifying a variable with something like: "Are you sure you want to create a Reference variable?" or "Are you sure you want to change "Loc:FromDate" into a Reference variable (&Loc:FromDate)?" It would save me some time and definitely some frustration when I accidentally check the "Reference checkbox"!

Happy bug hunting:)

Arnor Baldvinsson

6

Dave Harms, the editor of Clarion Magazine, published an article appropriately titled The future of Clarion.NET (subscription required).

To quote Dave: "Six years ago this month, at the only Florida DevCon of the decade, SoftVelocity's president Bob Zaunere announced Clarion.NET, the company's upcoming flagship product for Microsoft's .NET framework. "

Dave's conclusion is "Yes, Clarion.NET has a future, but at present it's not a very bright one. There's no AppGen yet, and past performance suggests that even if one does appear shortly it will take a long time before it is usable, particularly for newer technologies such as WPF."

So where is Clarion.NET?

From my perspective Clarion.NET doesn't exist. I bought a license a couple of years ago or so (don't remember exactly) and nothing much has happened since. I have not even bothered downloading the new builds. There is no application generator, no templates, just an IDE and a Clarion# compiler. I can just as well use Visual Studio and compile in C# or VB.NET. To me there are only two reasons to use Clarion#: Support for TPS files and queues. On the other hand, I don't want TPS files in .NET and from what I understand, collections and LINQ in .NET can easily be used instead of queues. So the advantages of Clarion# for me just aren't there.

Will SoftVelocity ever deliver Clarion.NET? I don't know. The product was developed outside of SoftVelocity and it feels like there is no communication about it. SoftVelocity deletes any threads from the ClarionSharp newsgroup that queries into the status of Clarion.NET. No information at all escapes except what SoftVelocity posts on their blog-site, the last one from just over a month ago, showing one screen-shot from the data pad and one screen-shot from the "Embed interface" which quite frankly is not looking like anything that is going to materialize anytime soon.

The silence of Clarion.NET

It is a well known secret by now that the Clarion.NET product was developed by Arcadia, a company in St. Petersburg, Russia. Arcadia has long experience in software development in Scandinavia. The contract was supposed to start in mid-2004 and take 4.5 years (or 500 man months) with a team of 10 developers. I don't see anything wrong with this, but something has definitely gone wrong in this relationship and one has to wonder if this project is dead. The absolute lack of public communication from SoftVelocity regarding Clarion.NET is worrisome - the silence is indeed deafening.

Starting something new

In the beginning of 2010 I decided to write off my investment in Clarion.NET and not have any expectation of it ever being released. This was actually a relieving decision as it transferred me out of a black hole that the Clarion.NET world had become and into the very exciting other .NET world! I went from negative to positive:) My commitment to the other .NET development environment was further strengthened as I started thinking about what benefits there would be to use Clarion.NET - and I found the benefits were precious little.

While I would miss some of the Clarion functions and syntax, I have done enough programming in both C and PHP to be able to embrace the syntax structure and case sensitivity of C#. I also have some BASIC programming in my background, BASIC being the first computer dialect I learned almost 25 years ago, so I would be Ok with VB.NET. I will blog later on what the initial pros and cons of C# vs VB.NET are for me.

Don't get me wrong: Just looking at all the stuff that is available for all the different options in .NET is an absolutely daunting task! But at the same time, it is energizing and fills me with optimism about programming because I see all those things that I can do! There are all those tools and products available in the .NET world for just about every conceivable task. And the millions of articles and blog posts about the various technical aspects are out there, too. Thousands up on thousands of detailed examples on sites such as Code Project. All right at my fingertips, ready for me when I need them.

What about Icetips products?

Does my decision to move to Visual Studio instead of Clarion.NET affect my support for Clarion as a desktop programming environment? Absolutely not! I will continue to work actively with Clarion, support my Clarion third party products, and add to those products, for a long time to come. I have absolutely no intention to stop using Clarion for desktop development, but I'm simply not waiting for Clarion.NET any more.

Considering Visual Studio

If you are considering looking into .NET - and in my opinion you should - you can download the free Visual Studio 2010 Express version right now and start playing with it! For the time being, I'm not sure what exactly the limitations are in the Express edition, but it looks like database access is limited to SQL Server Express and Access databases. Which admittedly should be just fine to start with, although it will not give you much freedom in accessing your existing databases unless they are in either of the supported formats.

The Professional Edition costs $549 if I'm reading things correctly. You can compare the various commercial versions to see what is included in each one. I have the BizSpark package from MS which is free to start, is valid for 3 years and costs $100 at the end and it includes a license for VS 2010 Ultimate so I'm good to go.

Learning .NET

The really cool thing about Visual Studio and .NET is that there are more resources available out there than any one of us can even imagine! As an example here is just one tutorial website for Windows Presentation Foundation at http://www.wpftutorial.net/

So where does this leave you? Where do you stand? What are you looking to get out of programming in .NET? What do you want to accomplish? Food for thought...

I have not done any .NET work yet. My plan is to start easing into it in the next month or so. I have some small stuff I can start with. Setting up a mySQL .NET provider, hooking up to my remote database and creating a browse using WPF will be my first step. I'll see if I can glue all the pieces together to make one browse app. I'm going to start messing with ASP.NET, set up a domain to test with online and see how it works. Then I'll take it from there. What are you going to do? Think about it:)

Starting the journey

In the coming months I will be taking a journey, studying .NET, experimenting with it and learning how to use it. I will blog about my experiences and perhaps I can help you along on your journey. I will shortly be setting up a new domain that I will use exclusively for exploring ASP.NET and SilverLight, which are my primary targets for .NET at this moment. I will also be exploring WPF, like I said, for some in-house programs, which quite frankly will mostly be to cut my teeth on WPF and desktop programming in .NET. My plan is to have something that connects to a database up and running before September 20!

Arnor Baldvinsson

1

I am really excited about starting to dig into Visual Studio 2010 and learn to work with .NET. I'm in the design phase for two "Software as a Service" (SaaS) products that I am going to do in ASP.NET. I'm also looking at creating a couple of small administration applications for myself using Windows Presentation Foundation. Those will be desktop applications (not web based) and will connect to our online mySQL database. Eventually they will be replacing parts of Clarion software that I have been using to maintain this database.

To get a nice test platform for VS2010 and MS SQL-Server 2008 I decided to set up a virtual machine with Windows 7 Ultimate 32 loaded on it. I had a ready made Windows 7 virtual machine, so I cloned it. It only had Clarion 6 and Clarion 7 on it and was only set up for 16GB disk size. The first thing I did was use the VMWare Disk Manager to increase the disk size to 32GB as I figured I would need some extra room.

I had asked around for what would be the best and most appropriate order to install VS2010 (Visual Studio 2010) and SQL Server (2008). It didn't seem that the order made a difference: one developer had installed VS first then SQL, so I decided to do that. Got VS 2010 installed without a problem. Did a full update of Windows 7, which took hours to complete.

Then I started installing SQL Server 2008. Windows 7 immediately showed a compatibility error and suggested to either get a newer version or immediately update SQL Server after installing. Since I was already installing I decided to go ahead and install it. During the installation I got an error and ignored it and everything seemed to be ok, except it didn't install the SQL documentation. Ok, so I figured I'd update Windows and it would update SQL Server. That did not happen and I decided to get the most recent version which is SQL Server 2008 R2. Downloaded it, which took awhile, because it is a 4.2GB download!

At this point I realized that I had made some mistakes along the way. I had completely forgotten to create snapshots of the virtual machine as I did the installs. Now that I wanted to go back, I could only go all the way to the beginning, which was from the day before! I had spent hours on installing VS2010 and SQL Server as well as Windows updates, so I was not happy about having to start over.

This time, after SQL Server R2 had downloaded, I snapped the virtual machine back to its initial state and started over. First Windows updates. Snapshot. Visual Studio. Snapshot. Everything was good, except this took me the better part of a day with all the Windows updates. The Windows updates just took forever - partially because at some point the installer had opened a window with some options and it appeared *behind* the installer. So it sat there for an hour or so, apparently working, but was in fact waiting for input on that other window behind it. 😉

I installed SQL server R2 and now I got even more errors than with the original 2008 install! The install ran very slowly and in the end, there were multiple errors. Worst of all, it had completely skipped all of the management tools!

Back to square one. Square two actually, as now I did have the Windows updates to start with. Now I decided I was going to change tactics and install SQL Server 2008 R2 first and then VS2010. Started with SQL Server and now it installed without a glitch and was much faster, probably took less than half the time it had taken before! This was finally done at 4AM, Tuesday morning. I took a snapshot and went to bed!

When I got up I picked up where I'd left and started installing VS2010. Everything went without a single hiccup. Once VS2010 was installed, I took a new snapshot and went on with doing Windows updates since I realized that I probably hadn't finished with them at the snapshot I had gone back to. That took another two hours, so I was not completely done with this until about 3PM on Tuesday.

If you plan on installing those two, make sure that you can roll back in case things do not go right! My advise, based on my experience, is to install SQL Server 2008 R2 before you install VS2010.

Arnor Baldvinsson

Even with all the wealth of information on the internet at our fingertips, sometimes it becomes a real challenge to find a solution to what seems to be a relatively simple problem.

For some upcoming work in Build Automator I wanted to be able to send keystrokes to a program. It somehow doesn't sound all that challenging, but I have spent the better part of today trying to come up with a solution. I have read hundreds of posts on multiple forums about this and have discovered that there are far more people that ask for this solution than those that even understand the problem, let alone who can give an intelligent answer. So far I haven't found a single post that solves it, lot of posts that give a hypothetical answer that looks like it should work, but doesn't, at least not in my case.

I have been successful in sending letter keystrokes to the editor window in NotePad, but trying to send something like Alt-F or Ctrl-O completely fails. So I'm putting this on the shelf for now even though I hate walking away from this, but I can't take more time on trying to find the solution at this point. Sometimes in programming, just like in poker, you have to know when to hold them and know when to fold them!

I got the Utilities build out last night while I was babysitting SQL Server 2008 R2 install and Visual Studio 2010 install. That was an interesting experience and I will blog about it tomorrow! I need to get some work in for my clients this week and next week I will be working on our products. I will also put in some work on the Icetips website which we have been working on behind the scenes for a while. Sue is re-doing almost every single page and it will be a very welcome update to the site!

Arnor Baldvinsson

Have you ever had a computer day where you put in something like x = 2+2 and then x turns out to be 352,648,137? Well, I had one of those days todayB)

My client asked me to do some work with his program - extracting a database for a new user. This is a SQL Anywhere database with replication and he needed to add a new replicated database to the system. This was something that we originally had left behind, meaning to get back to it at later time and that later time just never came. The process isn't complicated, but the extracted database needs some massage after it's extracted. I had originally done this with batch files, simplest way as you just construct the sql files and then pass the name to the dbisql.exe command line tool. But I had some other batch files there and managed to execute the wrong one and I'm glad I wasn't working on a live database and that I had backups as it deleted the database!

So I decided to write a nice little program to act as a shell for this process and make it nice and easy to go through and do the extraction and all the little stuff that was needed around it. And that's when my day turned really interesting and things would work in the most mysterious ways! But in the end I prevailed and got most of it done tonight, with some minor work left for tomorrow morning and some clean up. On the positive note, this gave me an idea and most of the code for a simple product that fits well within the Icetips Utilities.

I also got some product related stuff sorted out. I have all the products in version control now, as well as some other non-product related projects so that is all coming along very nicely.

For those who are looking around in the world of .NET, I Discovered what looks to be a very nice tool for Visual Studio at DawliaSoft called Sculpture. It uses model driven code generation. It is open source so it is free but the models are about $99 each, but you can also buy bundles, see their price list They have some video tutorials which look good, but the audio is pretty bad. The company is based in Egypt and the speaker has a bit of an accent although I didn't have a problem understanding him. It is better to download the wmf files rather than watch the videos online.

Tomorrow will be a great day!:)

Arnor Baldvinsson

I have my Clarion REDirection file set up so that all generated files are created into sub-folders from the application folder. This makes the application folder clean, as no generated files are created there. In my version control setup, I decided to exclude those folders so that I do not version control the generated files.

I don't see a reason for it since I'm version controlling the .app files. For this I need to set Tortoise to ignore the files. I do that via the properties on the project root, by using the svn:ignore property and set it to ignore all my folders, using both the upper and lower case variations! Works fine, but this only ignores the files and doesn't remove them from the repository.

After some digging around, I found that since TortoiseSVN does not have a full command line interface for SVN available, they have made an exe that you can use to execute certain SVN functions directly via the TortoiseSVN interface. This is documented in Appendix D of the TortoiseSVN documentation, which is about Automating TortoiseSVN.

To make things easier for me I created a bat file to do the removal of the folders from version control.

"c:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:remove /closeonend:1 /path:"z-backup"
"c:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:remove /closeonend:1 /path:"z-clw"
"c:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:remove /closeonend:1 /path:"z-inc"
"c:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:remove /closeonend:1 /path:"z-lib"
"c:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:remove /closeonend:1 /path:"z-obj32"
"c:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:remove /closeonend:1 /path:"z-source"

Note that the statements above will wrap. This takes care of removing the folders and then I commit and I'm back in business. I just move this RemoveSVN.bat file from one folder to the other when I need to use it and this makes it much quicker to go through this process when dealing with multiple folders.

There is an option to put multiple paths on the /path: parameter, like:

REM "c:\Program Files\TortoiseSVN\bin\TortoiseProc.exe" /command:remove /closeonend:1 /path:"z-backup*z-clw*z-inc*z-lib*z-obj32*z-source"

but I ran into problem with it where it would lock the folders, requiring to execute the "Cleanup" action on the folder to unlock it. I'm not sure why that happened, but it does not happen when dealing with the paths individually.

Version control actions are on my drawing board for Build Automator and my plan is to have it supporting at least TortoiseSVN/SVN before the end of 2010 and perhaps MS Team Foundation Server 2010. If you are using a different version control system and would like to see it supported by Build Automator please let me know:)

Arnor Baldvinsson

Version control systems have a reputation, at least in my mind, for being complicated, difficult to manage, difficult to implement, difficult to use, the list of difficulties goes on! So why on earth would I want to implement this stuff?

One of the most frustrating parts of development for me has always been the risk of breaking something, and spending hours rolling back and sometimes not be able to completely roll back. Then you have to restore from backup, and lose hours or even days of work - because at some junction in the development design I took the wrong turn for whatever reason (I'm sure I'm the only one who ever does that;). Then I find that I ended up on a dead end street going nowhere.

A well implemented and well functioning version control system can completely eliminate this risk. It will allow you to go digging into whatever blind alley of programming that you want, and make sure that you can come back to the real world without a scratch.

Many developers look at version control as being only for developer teams, where more than one developer is working on the same piece of program at the same time. While most good version control systems support exactly that, that is not their primary goal. Their primary goal is to make sure that you can, without risk, save your work and create copies of your work and roll back to any revision that you want, without losing anything. They enable you to pull out a two year old source file to check something, or pull out a whole system from last year, compile it and run it to see how your project looked a hundred builds back.

I currently have 20 products that I'm putting into version control (no, I didn't quite finish getting them all set up over the weekend). That is a total of 25,627 files in 2,599 folders! They include all the current Icetips products, some old products that I have not worked on for quite some time, and some new ones that are in development. I also have some in-house projects in there, too, that I work on from time to time and want to have the freedom to experiment on. With the safety net of version control, I am protected from myself. 😉

That is exactly what version control is about for me: Freedom to experiment without risk. Version control allows me to commit my project, create a branch and experiment on that branch. Note that Subversion/TortoiseSVN uses the term "commit" for saving the local files to the repository, which is the database with all the projects and all the revisions of the projects. Other version control systems also use the term "check in" about committing changes to the repository.

For example, I have been experimenting with some code for our OutlookBar. To do that, I make sure that my OutlookBar product folder is committed to the repository and then I right click on it and select "TortoiseSVN | Branch/Tag..." What this does is make a copy of my current project into a "branch". See the screen shot above.

I think a small tutorial on terminology is in order before I go any further. From the start you will hear references to Trunk, Branches and Tags. It took me a while to figure out what those things were and how they worked. Not necessarily because it was complicated, but just about every reference to those terms that I found did not explain them at all or did not explain if they are something that you create or the version control system should create for you.

The Trunk, Branches and Tags are simply folders inside the version control that make it easier to deal with versioning. If you are using Subversion/TortoiseSVN, it is up to you to create those folders in the root of the repository. See the screen shot above with the structures I have now set up for Build Automator. I have not created any Tags or Branches yet, so those folders are empty. When you create the repository, you should create those 3 folders.

The Trunk folder is where your current development version resides. This is what will become your next public release. This is where you copy files from to tags and branches.

The Branch folder is where you create branches of the trunk to work on without disturbing your trunk. This is where you create your experimental code, try things out, play like a pig in a pool of mud, do what ever you want to do without risking your precious code in the trunk! You simply copy your trunk there by using the "TortoiseSVN | Branch/Tag..." menu option. Use a descriptive name, like "Testing sub-classing in WindowsClass" for the branch.

The Tags folder is for your builds when they are done. Once you create a new build (hopefully using Build Automator and SetupBuilder:)) this is where you copy your trunk using the "TortoiseSVN | Branch/Tag..." menu option. Just like for the branches, you just pick the Tags folder instead of the Branches. As with the branches you should use a descriptive name for your tags, like "Build 1.2.1234, 2010-08-23" for a tag to give a good indication of what it is.

So in essence the tags are what you had, the trunk is what you have and the branches are what you will have! Actually pretty simple when you think about it! Once you have created the branch, you check it out to your working folder and work with it and commit to it. When you are done with your experiments, and if everything has gone well and you are satisfied that your new code is good, you can then merge your changes back to your trunk or basically copy the branch back to the trunk.

TortoiseSVN provides merge tools that can merge code for you and show you differences between files. It cannot merge binary files, so you cannot merge Clarion app files. To work with Clarion apps, you must work with TXA files and export them and import them to Clarion. For what I need, I'm not going that far at this time (I probably will sooner than later, though). For more information about how to deal with TXA and version control I strongly suggest you watch Rick Martin's webinars from Clarion Live. See my first blog about the version control for links to the webinars.

I will be away for most of this week and will resume my blog on Friday, August 27. Tomorrow I am going to Redmond for a .NET user group meeting where they will be demonstrating the new Microsoft LightSwitch - and the LightSwitch project manager will be there. Tuesday through Thursday the whole clan is going camping for the first time! For those of you who like photos and don't follow me on Facebook, please take a look at my online photos at http://arnor.zenfolio.com/ I will post some photos there when I get back!

Arnor Baldvinsson

Success! I have version control successfully implemented and have set up two of my largest projects, Build Automator and a client project. I will spend the weekend setting up the rest of my products, which are simple compared to the compiled projects, and get more familiar with TortoiseSVN.

I ended up uninstalling the VisualSVN Server and I'm only using the SVN Server. I had originally decided to put my development environment into version control, but ended up deciding against it. I have been using two builds of Clarion 6.3, 9053 and 9058. The reason for 9053 was a bug in some of the SQL drivers in 9058 that caused it to crash if file structures with MEMO files where used. For that I used the ClaSwitch program from Lee White at Clarion add-ons. It is a fantastic program and made it possible for me to deal with this - before I was using .bat files to handle this! Ugh!!! The program, just like my bat files, renames folder to "Clarion6". In my case I had Clarion63-9053 and Clarion63-9058. ClaSwitch would then rename the selected one to Clarion6 and run Clarion. This combination, I found out was just too risky as you might easily check out the wrong version into the Clarion 6 folder and mess things up or check out 9053, later run ClaSwitch and switch to 9058 and commit and now your 9053 repository has got files from 9058 and you really have a real problem on your hands!

In fact, that was exactly what happened today, and I ended up corrupting my 9053 install beyond fix (I don't think it helped that I was up to past 4am this morning working on this and back at it less than 6 hours later;), so I just took the plunge and moved everything to 9058. I had removed memos from all SQL tables as I did not need them in the Clarion program at all. Everything is working now, with just 9058 and I can move on:)


I did discover one interesting thing today in regards to adding folders to the ignore list. What I discovered is that the list is case sensitive. For example, the folder names I use for generated files are z-clw, z-inc, z-obj32, z-lib etc, but sometimes Clarion 6 decides to create them as upper case, i.e. Z-CLW, Z-INC, Z-OBJ32 or Z-LIB. After experimenting with my client project and compiling it I realized that the Clarion IDE was now creating the folders using upper case and the .clw and .inc
files were being listed as un-versioned, when they should have been ignored. So I added Z-CLW and Z-INC to the list and the files disappeared from the list of un-versioned files!

Just adding files or folders to the ignore list is not enough. The files or folders also have to be deleted via the TortoiseSVN menus, see screenshot on the left. This removes them from the repository and once you commit the changes, the folders will be market as ignored. Note that Explorer does not always seem to update the icon overlays so the icons may indicate that the folders have been deleted and Explorer may even complain about them not existing if you select them and only them clean up after itself. There is a "Clean up" option on the menu which also refreshes the icon overlays.

So I'm happy with where I've got this, had hoped it wouldn't take this long, but I'm definitely getting there! I will spend the weekend setting up the rest of my product projects, all of which are considerably simpler than what I have set up so far, although some of them have a lot of test apps and projects that I do want to keep in there, but now I have a much better grip on how to ignore folders, etc.

Tomorrow I'm going to write up a bit about why I felt so compelled to dive into version control! Stay tuned and be good - I'm off to bed!

Arnor Baldvinsson

Apparently my brain kept working on the redirection problem that I blogged about yesterday as when I woke up the morning I had a good clue what the problem was: Long path names. That turned out to be at least big part of the problem. However, it was not quite that simple, it never is! I didn't have time to do a complete research into the problem and nail down everything, but here is my findings and theories.

It appears that the compiler has issues finding files if the path to them includes pathnames that are more than 8 characters long. For example:

C:\Dev\Prod\Utilities\Src

causes problems, but

C:\DEV\PROD\UTILIT~1\SRC

does not cause a problem. But like I said, that is just part of it, as:

C:\Dev\Prod\XPTheme\Src

also caused problem. Either the problem is that there were other paths in the *.INC
line that use long path names (and there were) OR the compiler didn't grasp somehow that

C:\DEV\PROD\XPTHEME\SRC

is a short path name! I'm not sure which it is and didn't have time to figure it out.

Using a macro for any part of the path fixes the problem completely. For example, I created this macro:

DEV=C:\Dev

and then used

%DEV%\Prod\Utilities\Src

and there was no problem at all. So using the macros somehow makes the IDE correctly interpret the path name and probably convert it to a short path and the compiler is happy. When I had cleaned everything up, I ended up with just two macros being defined in my C60EE.ini:

Prod=C:\Dev\Prod
Dev=C:\Dev

I also came to a final consensus on the folder structures I'm using, which seems to be working pretty well so far. The Dev folder has 3 folders now:

C:\Dev\Prod Products. Each product has its own subfolder so it can be easily added to version control. This way the entire product folder can be checked out and committed.
C:\Dev\Projects Non product projects. This folder contains client projects, in-house projects and anything that cannot be classified as a product, free or commercial.
C:\Dev\Source Other sources. This is basically a catch all folder for anything that doesn't directly belong in either of the above. Currently it holds templates and classes that I use in some of my own apps, but are neither a product or a project on their own, nor do they belong to a specific product or project.

With the structure in place I spent most of today copying and moving files from my old structure to the new one and test compiling various projects and products in both Clarion 6.3.9053 which I use for one client project, and Clarion 6.3.9058, which I use for pretty much everything else.

So tomorrow will be the day that I convert all my editor projects to work with the new folder structure as well as my Build Automator scripts. Then I will get this on to a virtual machine and test the structure with Subversion to make sure that it holds up for the version control!

Arnor Baldvinsson

I have spent most of the last week or so getting Subversion version control and TortoiseSVN up and running on our network. I will blog about that experience later, but to cut a long story short I have come to the realization that I have to change the folder structure that I use for my projects and products. They just don't work well for version control at all!

For about 10 years or so I have used a pretty good structure, that goes something like this:

C:\Clarion\Apps\C63\Products\Automator
C:\Clarion\Apps\C63\Products\AutomatorDLL
C:\Clarion\Apps\C63\Products\Utilities
C:\Clarion\Clarion6
C:\Clarion\Shared\LibSrc\Automator
C:\Clarion\Shared\LibSrc\Utilities
C:\Clarion\Shared\Templates\Automator
C:\Clarion\Shared\Templates\Utilities
C:\Clarion\VC\Automator

Rather than being separated by products or projects, the folders are separated by over all contents, such as Apps, Shared, etc. Apps are then first separated by what version of Clarion they are being compiled in, then if they are projects (which are in-house projects), products or client projects.

The problem with this is that the separation of products is at the very lowest level of the folder structure, where as for version control, it should be as close to the top as possible so you can check out and commit the entire folder tree for all realted product or project files at the highest possible level. So I have decided on structure like this one:

C:\Clarion\Clarion6
C:\Dev\Prod\Automator\Apps\C63\Automator
C:\Dev\Prod\Automator\Apps\C63\AutomatorDLL
C:\Dev\Prod\Automator\Apps\VC\Automator
C:\Dev\Prod\Automator\Src
C:\Dev\Prod\Automator\Tpl
C:\Dev\Prod\Utilities\Apps
C:\Dev\Prod\Utilities\Src
C:\Dev\Prod\Utilities\Tpl

This way I can for example check Build Automator out at C:\Dev\Prod and it will work with everything related to that product.

This of course requires a lot of changes to all sorts of files, such as the redirection files (RED files), Build Automator scripts, Editor projects, etc. Definitely not a walk in the park and as I'm kind of feeling my way around this it's very, very different from the way I have worked for many years and the older the dog, the slower it is to pick up new tricks:)

I expected the RED file to be relatively easy, but it has proved to be one of the most challenging; for a reason I'm not yet sure of.

Clarion allows you to set up "macros" in the C60EE.INI file as shortcuts to the folders. This is done in the [Redirection Macros] section in the INI file like this:

Shared=C:\Clarion\Shared
SharedTpl=C:\Clarion\Shared\Templates
SharedImg=C:\Clarion\Shared\Images
SharedIco=C:\Clarion\Shared\Icons
SH_Automator=C:\Clarion\Shared\LibSrc\Automator
SH_Catalyst=C:\Clarion\Shared\LibSrc\Catalyst
SH_CCS=C:\Clarion\Shared\LibSrc\CCS
SH_Files=C:\Clarion\Shared\LibSrc\Filesandstuff
SH_Magic=C:\Clarion\Shared\LibSrc\Magic
SH_Other=C:\Clarion\Shared\LibSrc\Other
SH_Previewer=C:\Clarion\Shared\LibSrc\Previewer
SH_Utilities=C:\Clarion\Shared\LibSrc\Utilities
SH_Xplore=C:\Clarion\Shared\LibSrc\Xplore
SH_LibSrc=C:\Clarion\Shared\LibSrc

My corresponding Redirection file entries looked like this:

*.clw=.\Z-CLW ; .; .\CLASSFILES; %ROOT%\LIBSRC; 
  %ROOT%\3RDPARTY\LIBSRC;%SH_AUTOMATOR%; %SH_CATALYST%; 
  %SH_CCS%; %SH_FILES%; %SH_MAGIC%; %SH_OTHER%; 
  %SH_PREVIEWER%; %SH_UTILITIES%; %SH_XPLORE%;
  %SH_LibSrc%\PowerOffice

*.inc=.\Z-INC ; .\CLASSFILES; %ROOT%\LIBSRC; 
  %ROOT%\3RDPARTY\LIBSRC;%SH_AUTOMATOR%; %SH_CATALYST%; 
  %SH_CCS%; %SH_FILES%; %SH_MAGIC%; %SH_OTHER%; 
  %SH_PREVIEWER%; %SH_UTILITIES%; %SH_XPLORE%;
  %SH_LibSrc%\PowerOffice

This works great and no problems with this at all.

But what I found today was that my changes for *.clw files and *.equ files (Equate files) as well as *.trn seem to work just great, the same cannot be said for the entry for the *.inc files! Currently I have this in my new Redirection file:

*.clw=.\Z-CLW ; .; .\CLASSFILES; %ROOT%\LIBSRC; 
  %ROOT%\3RDPARTY\LIBSRC; C:\Dev\Prod\Automator\Src; 
  C:\Dev\Prod\Utilities\src; C:\Dev\Prod\Checkbf\src; 
  C:\Dev\Prod\ITMB\src; C:\Dev\Prod\ITME\src; 
  C:\Dev\Prod\ITML\src;  C:\Dev\Prod\Outlookbar\src; 
  C:\Dev\Prod\PowerToolbar\src;C:\Dev\Prod\Previewer\src; 
  C:\Dev\Prod\SQLBrowse\src; C:\Dev\Prod\Taskpanel\src; 
  C:\Dev\Prod\WinFix\src; C:\Dev\Prod\XPlore\src; 
  C:\Dev\Prod\XPTheme\src

*.inc=.\Z-INC ; .; .\CLASSFILES; %ROOT%\LIBSRC; 
  %ROOT%\3RDPARTY\LIBSRC; C:\Dev\Prod\Automator\Src; 
  C:\Dev\Prod\Utilities\src; C:\Dev\Prod\XPTheme\src

This works without any issues for the *.clw (as well as the *.equ files, which I'm not showing here) but not so for the *.inc files! The compiler simply will not find *.inc files in the Automator, Utilities and XPTheme folders (there are several more, but I'm concentrating on just those to start with).

However, if I create a macro for the C:\Dev\Prod\Automator\Src and C:\Dev\Prod\Utilities\src paths, and use that macro in the Redirection file, everything compiles without a problem! I.e.

[Redirection Macros]
BA=C:\Dev\Prod\Automator
UT=C:\Dev\Prod\Utilities

*.inc=.\Z-INC ; .; .\CLASSFILES; %ROOT%\LIBSRC; 
  %ROOT%\3RDPARTY\LIBSRC; %BA%\Src; %UT%\Src;

Since I had set up macros for all the *.inc folders last time I guess I never ran into this anomaly before, or maybe that was why I had created all those macros - just can't remember!

Bottom line is that if something weird happens in your redirection file and it doesn't seem to work, try to create a macro in the INI file and see if that helps! Note, that in order to create the macros, you MUST close the Clarion IDE! In the INI the macro does NOT include the %, i.e. BA defined in the INI becomes %BA% when used in the Redirection file.

Arnor Baldvinsson