LiteStep Developer Journal Downloads News Archive Home Page

Contact me at :

15 July 99

I found the new site design in my e-mail early in the morning from Lowspirit. I like the new graphics a lot! It took me a while to get around to updating the site though as I was still trying to figure out a weird problem I had discovered while working with the paint routines in the popups. The problem had to do with having to use CreateCompatibleDC in the main paint routine and passing the handle on to the routine that actually did the painting. It worked only that way, if I tried to use CreateCompatibleDC in the subroutine that did the painting, it would work only the first time. I finally decided not to bother with it and instead, posted to Usenet in the hope of hearing from somebody who knew what the problem was and modified my site and uploaded the stuff.

Majestic One, whom I've known since the days I first got involved in LS, was the only one to respond about including personal stuff in the Developer Journals and he had an interesting comment - he asked me to put the personal stuff in a different colour and that's what I'm going to do. So if you don't like the personal stuff you can just skip it :-)

So to start off the personal stuff, here are some tidbits <g> I had been meaning to post my resume on some web boards for a while now as I'm looking for a job and I finally decided to do it today. I got on the MonsterBoard and it was only when I came to the resume submission that I found out how much work I really had to do. The submission form said that I could submit HTML and so I decided to cut-and-paste from my web resume and when I did so, it didn't look good at all. This turned out to be because I'd used the Save as HTML feature from Word :-) So I had to sit down and reformat everything! The good news is that half an hour after posting my resume, I heard from a prospective client and I have a scoping out interview tonight! Talk about fast results!

I then decided to do some more work on LiteStep. Joseph Blough had sent me the modified popup sources for implementing alpha-key navigation whereby you can press an alpha-key to navigate to the next popups item which starts with that letter. I merged his changes the biggest of which was the introduction of a new method to discover the next item that starts with a particular letter. I changed the name he'd given to the method <g> but here is his code:

int Popup::AlphaNav(char chSearchChar, int nStartPoint) {
	const menuItem* SearchPopup = safeItem(0);
	nStartPoint = (0 > nStartPoint) ? 0 : nStartPoint;
	int nIndex = 0;
	int nFirstMatchIndex = -1;
	if (NULL == SearchPopup)
		return -1;

	//Go through the list once. If we encounter the character 
	//before reaching nStartPoint, then record that occurence 
	//as nFirstMatchIndex.  If the nStartPoint isn't -1, then 
	//we skip that item
	while (SearchPopup != NULL) {
		if (nStartPoint != nIndex) {
			if (SearchPopup->name[0] == chSearchChar) {
				if (nIndex < nStartPoint) {
					if (-1 == nFirstMatchIndex) {  
						//Only grab the first match in the list
						//FirstEarlyMatch = SearchPopup;
						nFirstMatchIndex = nIndex;
					} else
						return nFirstMatchIndex;
				} else
					return nIndex;
		//SearchPopup = SearchPopup->next;
		SearchPopup = safeItem(nIndex);
	} //End while loop
	return nFirstMatchIndex; //If we get here, then there were no matches past the starting point.  Either FirstEarlyMatch will be NULL or a menuItem pointer

I discovered on compilation that the code works fine unless you hit an item with a submenu because then the popup focus changes to the subfolder. This was a problem I had with the original popups as well and needed a check for that particular condition. As I am in a hurry to attend to a few personal things (such as getting ready for the scoping out interview tonight <g>) I decided to release the source and binaries as they stand now and do the changes tomorrow.

14 July 99

Yes I know I'm late again :-) Sorry about not updating for two days but I hope you'll understand that real life situations sometimes do take over. Anyway, that is neither here nor there because you aren't here to read about my personal life or what's happening with finding a new job or any other such stuff (actually, if that kind of thing interests you, do let me know and I might start another journal for that <g>) so let's get onto coding stuff.

When I released the last binary, a lot of people complained about the fact that it seemed to have broken the popups somehow. I later found out that the popups broke only if you didn't have NoPopupTransparent in your Step.Rc - in effect, disabling transparency. I traced the problem to a simple change I'd made by introducing the following code into the destructor for the BitMP class:

if (region) {
	region = NULL;

I commented out the above section and the popups work fine! I still have no idea as to why that particular segment should cause the popups to misbehave and don't have the time at the moment to look into it either. So am releasing the new binaries with the above code commented out so that you can once again have a working version of the core stuff :-) I will keep on the track of the bug though ...

Just received some code in the mail to reimplement alpha-key navigation for the popups. I'd been intending to do this myself as the feature was there on the old popups before I rewrote them but it's good somebody else did the work for me as that will save me the work :-) Expect that to appear in tomorrow's binaries though as I'm tired and this will probably be the last thing I do for the day.

    Nedstat Counter

Site Design by : Lowspirit