Quote Originally Posted by abligh View Post
OK so that sounds like the source of the ImageMagick problem. I wonder why wxMacExecute needs convert to be a bundle.
Yeah, I have 6.18 installed with Fink, but I haven't gone and tried to get the two working yet.

You mentioned bundles -- I ran the executable outside the bundle. Trying to run it from within the bundle simply didn't work.

It does whatever wxWidgets does with a wxMDIWindow on the Mac (at the moment). This isn't intended to be a permanent proposition...
I hope I didn't sound rude; I sometimes come off as more acidic than I intend over text. I just mean that the Mac will need its own set of rules for that, as MDI is the one thing that doesn't port. Photoshop's a good example-- MDI on PC, but it uses those... weird window types (the ones that are only visible when the program has focus, I forget the name right now) for everything else.

I also assume that the people behind Xara already know this. ^_^;

Yes that's odd, especially as other people have got the icons working on the Mac. What happens is a script called buildresources.pl is run which makes a zip file (called "resources.xrs") containing all the png files. This is then converted to an .h file (don't ask) with an array of all the bytes in the zip file and bound into the executable. wxWidgets contains a VFS like thing (wxFileSystem) which can be used to load files from it. Somewhere or other this process is failing. However, the resource file itself is clearly being build OK, because the xrc (XML) for the bar definitions is in there (also loaded through the wxFileSystem) as are the strings. Somewhere or other the bitmaps (only) are failing to load. The relevant file is wxOil/camresource.cpp if you want a poke around.
That's really interesting... Stranger still, I changed PRELOAD_BITMAPS to 1 in cameresource.cpp and the program now loads and exits properly. I also seem to have some icons loading:

http://ministryofdoom.org/cloud/xara...ome-icons1.jpg

I get the message "No handler found for image type" twice now on each startup; that's a new one.

If I mouseover the icons, the icons appear perfectly, though. That wasn't the case before, so for whatever reason the issue is in the generation of those grey icons.

I'm going to keep playing. One more note that should be added to the Mac notes -- the project file comes with ZeroLink turned off, and turning it on actually seems to make the program load faster.

Oh, now that the debugger is loaded, the crash when clicking on the canvas comes from wxWindowBase::ScreenToClient(), at DoScreenToClient(). I think I'll leave that one alone for a moment; if you don't click, the program allows a graceful exit.

If you crash the program out, on subsequent reloads it always crashes in CCamApp::HandleKeyPress (camelot.cpp line 1311). This continues happening until you either relink the program or close and reopen XCode. I think it also happens when you hit run, but then switch immediately to another program before Xara has a chance to load.

Oh, and since you're the same Alex who wrote this code, I can't thank you enough for how beautiful and well-commented it is. This is the first time, ever, for me where I downloaded an open-source project and was able to step through the program flow without some sort of Rosetta stone. (Especially one written by a commercial software vendor.) Kudos! A lot of it's over my head, and I've only used wxWindows once before, but it's still very followable with grep and a cup of coffee. ^_^