Doc Day #

Didn't get that much work done today, but I did finish the documentation and the default glyph set for Glypher. I also sent final version of the new clip2icns (1.5) and Glypher (1.0) to the beta testers, and unless major issues show up they will be released Monday.

clip2icns Reloaded #

Today I worked on redoing the interface for clip2icns. Until now the insertion dialog was modal, and after you inserted an icon it would get dismissed. So if you were trying to put more than a few icons into the same file it would get very annoying, since you had to keep choosing the file, and go to the proper ID in the menus. So I made the dialog movable (using the experience I gained from the Icon Browser in Icon Mangler), and made it so that the dialog would stay there until you clicked on the close button. Now when you want to insert more than one icon you can move switch back and forth, and not have to select the file every time, since the insertion dialog stays open. I also combined this dialog with the extraction one, since they shared 90% of the resources. Finally I added two more preference options, dithering (used when making the lower bit depths) can be turned on and off, and there is a setting to remember the last selected ID in the pop-up menu. Even though I added all these features, the source code is now 400 lines smaller (and I replaced the ugly macro that I was using for handling refreshes in the dialog with a much nicer function). I wish this could be done for all programs :p

I am the bitch of user feedback #

Uploaded a new development version for feedback, and i've got a few bugs reported already:
- cursor changes even when application is in the background: fixed by checking first if the current process is the front one
- old style icons aren't displayed properly in the Icon Builder: fixed, i hadn't updated the code in the old style loader for setting the available sizes properly.
- mask display turns black if the depth is thousands, not millions: not fixed, but I think I know what I need to do
- open command doesn't do anything: can't reproduce on my machine (could be tied in with a similar bug I had while I was working on clip2icns, which I also couldn't reproduce at home. unfortunately this was before I was writing my journal, so I have no record of I fixed it.)

Goodies in the Mail #

Had exams again, but I did receive the latest copy of MacTech and my first shipment of the Apple Developer CD Mailing. Among them are 6 CDs that contain MacOS 8.5 in most languages, so I installed the Japanese version. This should make testing with foreign systems much easier.

Mangler, Seeding #

There was a bug which caused the front-most window to be left enabled when the application was put into the background. This was because I had recently added a check to automatically enable the controls when the current was the front one. However, when a application is put into the background the window was still considered to be in the front. So I added another check, to compare the process serial number of the front app to the process SN of the current one.

I also tried the Apple Developer FTP Seeding Site, and downloaded Apple Share IP 6.1. The only problem was that I was limited to 3 connections, and the FTP client I used (Netscape Communicator) was using multiple connections, so after the download was finished my password expired. I wish I could of used Fetch, or another client which didn't use multiple connections, but Netscape's is the only one that can go through a proxy.

Then I worked on making Icon Mangler more robust. I've started with checking to see if there was enough memory when making a new editor, so that application doesn't simply quit when the creation fails.

More Power, Less Waiting #

Didn't have time to program on these days because I was preparing for the semester exams. However, my G3 upgrade card did get here, and I was able to tweak it up to 443 Mhz. Compile times are much shorter now.

Spotlight: Leak Locator #

Today I finished the transferring of depths, it simply required determining the source pixmaps and target pixmaps for all three sizes, and doing a CopyBits between them.

Then I fooled around with a pretty interesting product called Spotlight. It's supposed to aid you in finding memory leaks, access of unlocked handles, access of null pointers/handles, and other hard to track down but serious bugs. They have a demo version, which has all the features except it expires in a month. Using it requires no change of code, you simply point to the symbol map of your program (an .xSYM file that's generated by default by CodeWarrior) and then you run your program (albeit more slowly, since it has to log all the errors).

With this tool I found a bunch of handles I wasn't disposing, and places where I was accessing NULL handles. I also found a very weird bug with it. When saving the state for the first time the program is run, it uses up an extra 64K of memory, which are never disposed of. Using FreeMem() I added a check right before I called new and right after, and it said that it took up 70K. However if I added a check within the constructor of the drawingStateClass, it always said 6K. But I have no idea where the extra 64K are coming from, and why they only show up the first time...