Based on materials presented in Clarion Live webinar #80. Thanks Arnold and John for the opportunity, I look forward to hearing about what people come up with!

What is an addin?! – http://wiki.sharpdevelop.net/SharpDevelopGlossary.ashx

Add-in – (aka. plugin, component) The add-in is the basic building block of the SharpDevelop component model. An addin is defined by an .addin XML definition file, and typically one (or more) Assemblies.

Since the Clarion 7 IDE is based on SharpDevelop you can get a lot out of the existing documentation and source that is available. One trick to remember though, when compiling your assemblies for use in the Clarion IDE make sure your references are pointing the those core assemblies not the SharpDevelop 2.2 ones!

First, for the impatient, jump right in with some examples!

These are just the ones available at the moment. Subscribe to the RSS feed or bookmark a link to the addins category for future updates!

Helpful SharpDevelop links

 

Downloading the (SharpDevelop) source

 

SoftVelocity material

While there isn’t much around there certainly is some. See the help for these topics.

  • Customizing the Command Line Interface (ClarionCL.EXE)
  • User’s Guide to ClarionCL.exe

Also of interest might be a search in the help with the term “reflector”.

 

Helpful tools

  • Reflector – http://www.red-gate.com/products/reflector/
  • A .Net IDE (I have not yet tried writing an addin using Clarion# though I suppose it should be possible!)
  • A text editor with a good multiple file search capability.

 

Choose your IDE

  • Visual Studio – Not necessary but certainly a nice IDE to work on .net code!
  • SharpDevelop – Either v2.2 for authenticity or the latest beta seems to work fine too.

 

SharpDevelop source

Not necessary but very useful for learning. You could probably learn most of what you need from the docs and Reflector but having the actual source (well… a close match in most cases) can be good. (See above for links to the source downloads)

SharpDevelop also comes with an addin project to get you started but it is really little more than a directory structure.

 

Compiling SharpDevelop

This is optional but if you are building and testing a generic addin, something that doesn’t use any of the clarion assemblies then it is one option. The main advantage you get is that you can run the IDE in debug mode with output to a console renderer.

 

Enable debug output for the Clarion IDE

  • Edit the file "\Clarion7\bin\clarion.exe.config"
  • Underneath this line:
    <appender-ref ref="ColoredConsoleAppender" />”
    add this 
    <appender-ref ref="FileAppender" />
  • If you want, you can also add this:
    <appender-ref ref="OutputDebugStringAppender" />

A file called "SharpDevelopLog.txt" will be generated in your clarion.exe directory and/or you can capture the output using something like DebugView from Sysinternals.

The IDE uses Log4Net to produce this, it looks like a nice tool. I like how they use methods for the different log levels rather than a parameter or something. Simple but makes the code very readable: Logging.Info(‘message’), Logging.Debug(‘message’), etc…

http://logging.apache.org/log4net/

 

 

-brahn