Monday, September 26, 2005

Ooh! We are where the flies are...

Cocoa is not designed for programmatically generating dialogues. It fact it makes life really awkward. Cocoa co-ordinates are based on a bottom left origin, like a graph. This means that you have to work out how big your dialogue is in advance, so you have to work out were the first (i.e. top) control has to go.

Another example is the button, what does a OSX button look like. It that lozenge shape thing right, well no, a plain default NSButton is a bezelled rectangle like everyone else. There's an example from postGenesis, the Cancel button is a default NSButton, The OK button has had the message setBezelStyle sent to it to make it a 'proper' OSX button.

Now, I'm a bit old fashioned, I like to at least know how to build a dialogue from scratch. I never used a GUI designer in BeOS, I made sure I could do it in VB (a work thing), but with no real documentation silly little things like this just make it plain awkward.


Post a Comment

Links to this post:

Create a Link

<< Home