Page: 0 ... 5 ... 10 ... 15 ... 20 ... 25 ... 30 ... 35 36 37 38 39 40 41 42 43 44 ... 45 ... 50 ... 55 ... 60 ... 65
SetWindowPos Changes Focus
Date: 12/2/2007
Occasionally when I call:
SetWindowPos(hWnd, NULL, x, y, cx, cy, SWP_NOACTIVATE|SWP_NOZORDER);
The focus unexpectedly changes to hWnd. This is annoying and I don't understand why this happens. Anybody care to shed some light on the inner workings of SetWindowPos?

This can be seen in Scribe when you select the root node of the folder tree and the focus disappears. I'm trialing some code that gets the current focus, calls SetWindowPos and then checks the current focus against the old focus, if it's changed it just resets it. But this is a ugly hack and I'd rather just fix the root cause.

It's also annoying users.
(2) Comments | Add Comment

GCC Is Unbelievable
Date: 7/2/2007
So I'm compiling and building Scribe and Lgi on Linux (SUSE 10.0, gcc 4.0.2 20050501) and it's crashing out with weird errors in the List class, which is one of the core container classes used by Lgi. After some hours I've isolated the issue, one of my destructors was not being called. Very weird, very very weird. So I single stepped through the code delete deletes the object and it jumps over to another source code file with a private class of the same name, and runs it's destructor instead of the local class.

So lets get this straight, in "GContainers.cpp" (part of
class Item
    Item() {}
    ~Item() { /* not called */ }
    void Delete()
        delete this; // call goes to wrong destructor
And over in the scribe binary there is a file ScribeLangDialog.cpp which implements the initial dialog where you choose the language:
class Item : public GListItem
    Item() {}
    ~Item() { /* called from inside GContainers.cpp */ }
And neither class is public outside their own file.

Is this normal? Is it legal?

Btw MSVC++ v6 gets it right.
(3) Comments | Add Comment

Date: 5/2/2007
Yes it's true Scribe is running on the Mac and to prove it here is a screenshot:

I've fixed a host of problems: font issues, line spacing, text layout, keyboard entry, clipboard support and international character glyphs.

You can't yet use it as your everyday mailer but it's getting closer everyday.

See how the fonts look bold all the time? Yeah I don't know how to fix that yet.
(2) Comments | Add Comment

Carbon/ATSUI fonts
Date: 1/2/2007
I mentioned I was working on the fonts in the previous entry and well I've got it almost all sorted out. I needed to use the CGContextRef from the kEventControlDraw event and plug it into the ATSU layout object. That fixed the kerning and anti-aliasing but broke the positioning. A few flips of the context's CTM and that was sorted out as well.

Then I turned on font substitution, a feature that you have to implement yourself on Windows and Linux and all the international characters magically appeared. Ohoooo Arhhhhh!

Finally all that is left is that all my text looks like it's drawn in a bold font. I'm retreiving the current system font and setting that up as the default application font, and I'm not setting the bold property... so I'm a bit confused over that one.
(0) Comments | Add Comment

Date: 29/1/2007
I created an xcode project for Scribe today. I'm really starting to get a handle on xcode's project system. Most of last week was just working out how to build a product into a shippable download. I'm refining that process this week.

To build Scribe the code required a bit of clean up. Most prominant was getting the scripting engine to build without using wide string literals, i.e. L"some string". That works on windows but not on Mac because the API is expect utf-16 and the compiler generates utf-32 string literals. Nice eh?

So I've got my Scribe project building and I ran it up for the first time. It got as far as the language selection dialog and all of the internation characters were missing. But the flags were there :) Then it asserted just after that so I didn't get to see the main window. Also the fonts look awful since I implemented GetSystemFont correctly. I must fix the global drawing context for ATSUI.

So the work continues.
(0) Comments | Add Comment

i.Ftp/Mac Changelog
Date: 26/1/2007
  • Dismal failure, doesn't find the Lgi framework properly.

  • Re-did my entire project file to get the private framework installed and working inside the app bundle.

Test3 (unreleased):
  • Help -> About crash
  • Help -> Help now works...
  • You can now close the Sceduling window.
  • Cmd-Q now works.
(0) Comments | Add Comment