Archive

Archive for December, 2008

Update on EMS, SPIC and that elusive Splitter Bar that does not exist…

December 14th, 2008 Steven Harrison No comments

Well I got the splitter bar working, very nicely as well, I’ll post a better write up about it at some point as at the moment I’m back at work and looking at some very ugly decorations (why do companies insist on putting decorations up in a multi-cultural office???).  EMS and SPIC have been going though some interesting changes over the last couple of days, one major change is in the debug level code, I’ve simplified the process and now I’ve only got 5 main levels (Normal, Flow, Warning, Error, Information), 3 developer levels ( Developer output, Memory Allocations, XML Dev out), and 2 options to enable module and API logging – reducing the EMS log files a little in the process.

One major problem has been hit by a user of the system when it comes to the ECM integration, apparently it’s not working correctly, so I’ve had to create a special version of EMS just for him, and I’m hoping that the changes will help identify the issue that he is having.  I’ve left the changes in for the next couple of versions of EMS, mainly as the changes are for logging the data flow of the system, and basically they are logging information that I never thought I needed to monitor, a lesson learnt there – have a flow log call at the start of every function except the logging one of course :D .

SPIC is coming along nicely, I’ve spent the last week working on the splitter bar for this project and as I said it’s working almost the way I want it to, I’ve got a few additional items I want to change on it, but they can wait until SPIC is out the door.  One thing that I have noted is with spitter bars, or this could just be down to the way I have made mine to work, is that you need 4 windows to handle them, a parent window that contains the splitter bar and two other windows, these other windows could be a splitter parent or even the view windows for a document / view style window layout.  Even at this early stage of development I’ve been thinking about how the scheduling window at the bottom of the SPIC screen will look, and how it will give the user an idea of what skills they will be training over the next few hours / days / weeks / months, and I will be writing up a full thought process blog entry closer to the time that I do this.

Anyway back to the coding.

Categories: Coding, EMS Tags:

EMS, SPIC and that elusive Splitter Bar that does not exist…

December 3rd, 2008 Steven Harrison No comments

Well it’s been one of those things on my todo list, and here it is, an update on my blog about crap that I’m working on :D .

I’m finally getting back into coding full time (well full time as far as my free time allows) and I’m also enjoying the relaxing energies I seem to be getting from it, at one point after work I had to load up a first person shooter (Like Counter Strike, Team Fortress 2, etc) to get a nice relaxed level before I could start to code, but it got to the point where the time it too to reach this relaxed state took longer, until I stopped coding altogether and just played games, now I can just sit infront of VS C++ 2008 and code away (it might also have something to do with the monitor I purchased, a very nice 24″ wide screen with max res of 1920×1200 :) ).  Sometimes when coding frustrates me I load up my current choice of killing time and shoot some pilots, co-pilots, stewardesses and assorted back room staff in Left4Dead’s airport level and kill about an hour before I get back into the coding bug again – I just want to change the textures now and add some BA logo’s, or if anyone ever does a Heathrow T5 or JFK map I will download and have fun killing the zombies there.

As for my coding I’ve come to the relisation that Microsoft have made everyone lazy with the .NET framework, MFC and all the other frameworks that the compiler suppliers have provided, take the SplitterBar as an example.  The Humble splitter bar which allows you to view different sections of the same document in the same window or allowing you to change the size of subwindows inside the main window, does not actually exist within MS Windows platform API, and why should it since it’s only a bar that is easy to program right?  Wel yes and no, yes in theory it’s easy to code, but in practice it’s a lot harder that you first think.  I found a nice snippet of how to code a splitter bar on www.catch22.net, where he gives some code but not enough to just copy and paste, but enough to give you a pointer to create your own splitter bar code.  This is wher my current run of frustration is at, having got my splitter bar working on vertical bars, I thought yeah change a couple of lines of code, and viola a nice dual purpose splitter class… Or maybe not as the case goes…

I’m not infront of my code at the moment as I’m at work during a quiet period (Lunch break @ 3AM ftw) and writing this up.  Now as I said the vertical splitter bar is working great, i’ve still got a couple of tweaks to do, like set the minimum window sizes for the two panes, but it took me the best part of 9 hours to get it working correctly from scratch, and looking at the sample code that is provided by James Brown of catch22 software (his was horizonal, and the used a slightly different approach to mine and his bar went into the non client area of the window, which is something I do not want, so most of the time yesterday (to me it was yesterday, to you lot it would have been December 1st) was spent debugging / re-writing code that worked fine as long as I used the main window as the splitter bar window.

As I said I finally got the vertical bar working, now I’ve got the horizontal bar to work on, and it’s got a whole new approach to throw spanners at me.  The code *should* run correctly, and does, it’s just the splitter bar is a titles height out from where the mouse is, so I’ve got more debugging code to look forward to over my holiday.

Why am I talking about splitter bars, at this time in the morning? well it has to do with EMS, and that elusive SPIC module that I keep going on about, I’ve finally got off my big fat ass and started to code it correctly, and not only that but I’m using a nice framework for handling all the windows, when I say framework I basically mean a C++ class for the code and handling of the internal data for the windows while a win32 c style CreateWindow / WindowProc works in the background handling the messages from windows itself.  Again this is something that I found on catch22 – my new best book mark in firefox / google chrome and safari, my best bookmark in IE is still “close now” :D .  I’ll post a bit more on EMS and it’s modules as I get the chance as well as starting a few pages about other things here.

Categories: Coding, EMS Tags: