Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

jamdr

macrumors 6502a
Original poster
Jul 20, 2003
659
0
Bay Area
You see the advanced button in a lot of Tiger apps, including Mail. This was taken from Acquisition. Can anyone tell me how you can create that two-tone bar and resize widget?

set7bp.png
 

caveman_uk

Guest
Feb 17, 2003
2,390
1
Hitchin, Herts, UK
It's a bunch of custom controls. You'll probably need to subclass NSSplitView to get the thin divider line between the views (or see below) and the resize bar is either a stretched resizable NSImage (or three) or it may be drawn in code using Core Graphics. There's also an NSButton in there too.

I've not subclassed NSSplitView personally but I've used a free piece of code called RBSplitView which does allow you to draw custom dividers using a delegate method. It's actually a much nicer splitview implementation that the standard NSSplitView.

RBSplitView http://www.brockerhoff.net/src/rbs.html

the method you need to handle to draw a custom divider is drawDivider:inRect:betweenView:andView:
 

jamdr

macrumors 6502a
Original poster
Jul 20, 2003
659
0
Bay Area
Thanks for the info, that's what I suspected. To be quite honest, that seems like too much work and is not really worth it. I'm new to Cocoa and it continually surprises me how horrible the interface building tools are. Apple uses a lot of custom controls apparently (that admittedly look good) and expects developers to reinvent the wheel every time they want a similiar look (which they should becuase consistency is a GOOD thing!).

Interface Builder also really needs to support toolbar creation because it requires a whole lot of annoying and tedious code to do it manually. And they should make available the various shades of "polished metal" that appear in their own apps. I don't really want to touch the Obj-C issue and Apple's choice to drop support of Cocoa-Java, but Apple WILL lose developers if they don't come up with some answer to C#. Hopefully some of this stuff will appear in the next major version of Xcode because programming for OS X is a lot more annoying than it is on Windows. I feel like Microsoft has done A LOT for developers and Apple really couldn't care less.
 

logicat2001

macrumors regular
Apr 16, 2003
192
0
Minneapolis, MN
Hi jamdr,

I'm new to Cocoa and it continually surprises me how horrible the interface building tools are.
And that's probably because you're new to Cocoa. I'm constantly amazed by what I can accomplish with IB. It's really supremely elegant. Throw in Cocoa Bindings and I'm the happiest clam in the sea.

Apple uses a lot of custom controls apparently (that admittedly look good) and expects developers to reinvent the wheel every time they want a similiar look
First off, consider that the look and feel of many Apple applications are very deliberately branded. Of course they wouldn't want you to instantly create apps that could be confused for their own.

As for reinventing the wheel, the easiest solution is to get off the Apple-GUI bandwagon. Take what you get for free (which is quite a bit), use available third-party frameworks that provide the GUI functionality you can't live without, and only spend the additional dev time on those special bits that are truly important to the design of your app. Unless you're getting the new bits for free, don't assume you need to implement every new Apple GUI widget.

which they should becuase consistency is a GOOD thing!
Perhaps this was a concern ten or more years ago when many people didn't get enough time on a computer to recognize some standard conventions, but nowadays, I don't buy it anymore. In fact, there are so many different apps in common use (sometimes all open simultaneously) that I'm grateful for applications that provide a bit of visual context. I instantly respond appropriate to each app exactly because it looks different. I don't have to think twice about "what app is this and what was I doing?"

Interface Builder also really needs to support toolbar creation because it requires a whole lot of annoying and tedious code to do it manually.
Toolbars are super fast if you keep a template file, then copy and paste it into your new app. However, there are third-parties that have provided toolbar creation solutions.

And they should make available...I don't really want to touch the Obj-C issue...but Apple WILL lose developers if...programming for OS X is a lot more annoying than it is on Windows. I feel like Microsoft has done A LOT for developers and Apple really couldn't care less.
Kudos on having strong opinions. I stand diametrically opposed to these statements. Cocoa developers are some of the most productive and joyful programmers I've ever met (with the exception of anyone rolling Ruby on Rails... cover your eyes 'cause their smiles are so bright!)

I have a hunch that you're mixing up the frustration you feel learning lots of new stuff, with the tools you're using. Hang in there, dig around the WWW or your local scene to find other Cocoa programmers that can provide help in the areas that interest you, and hunker down to learn it. It'll take a while, but go ahead and take on Cocoa + Obj-C + Cocoa Bindings + XCode/IB ( + CoreData if you're feeling really sparky). As you grok the pile you'll find yourself swimming in a wonderfully elegant toolset to develop with.

FWIW, this is all my personal opinion and YMMV.
Best,
Logicat
 

jamdr

macrumors 6502a
Original poster
Jul 20, 2003
659
0
Bay Area
Thank you for the response logicat2001, you gave me a lot of good feedback. First off, I forgot to mention that IB is easily one of the best GUI tools I've ever used. I just wish it could do a little more.

I found your comments on app branding to be very interesting. It makes sense to give your software a distinctive look and feel. I'm not asking Apple to add Garage Band plastic wood support to IB. However, I still think that certain widgets that are used in just about every piece of Apple software, including the Finder, should be standard. One of these things is the advanced button, another is the search filter, another is the resize widget. It just seems to me that Aqua has evolved since the release of Tiger but IB is still stuck in the Panther brand of Aqua.

As far as my comments on Obj-C, I just plain don't like it. Yes, part of it is that I'm new to the tools and language, but the syntax is just cumbersome and annoying, and to someone who is used to C++ style syntax it is hard to look at and debug. Maybe I will get used to it but I really don't even want that to happen because it will never be my primary language (C++ and Java will be) and I don't want that syntax to start looking weird to me. I just think it would behoove Apple to continue to support and improve the Cocoa-Java bridge, or come up with an alternative, instead of dropping it altogether.
 

Soulstorm

macrumors 68000
Feb 1, 2005
1,887
1
I feel like Microsoft has done A LOT for developers and Apple really couldn't care less.
You have no idea.... :D

I couldn't care less for a company that still supports "void main()" in their developer tools.

Also, when I compare Visual Basic to Applescript studio, I feel as if I compare a recent Mercedes model with a 1970's car.
 

logicat2001

macrumors regular
Apr 16, 2003
192
0
Minneapolis, MN
jamdr, thanks for conversating.

Obj-C...syntax is just cumbersome and annoying...hard to look at and debug
I thought the exact same thing at first, until the first time I had to rework six month old code. It's so verbose and explicit that it's practically self-documenting. Super-helpful for long-term projects but frustrating for quick, one-off programs.

The nicest thing about it IMHO, is how unlike straight C/C++, Perl, PHP, etc. it seems. In the same way that GUI's add context, the language syntax instantly gets me to shift mental gears. I always know when I'm coding in Cocoa.

I don't want that syntax to start looking weird to me.
I've been working with Ruby, and truthfully, most programming languages I learn look weird at first. However, the more I work through, the faster and simpler they all seem. Ruby, for example, is a dream. (Didn't mean for that to rheeme.)

when I compare Visual Basic to Applescript studio, I feel as if I compare a recent Mercedes model with a 1970's car.
...shudder... It is a 1970's car.

Best,
Logicat
 

mdriftmeyer

macrumors 68040
Feb 2, 2004
3,810
1,985
Pacific Northwest
jamdr said:
You see the advanced button in a lot of Tiger apps, including Mail. This was taken from Acquisition. Can anyone tell me how you can create that two-tone bar and resize widget?

set7bp.png

Why don't you use Inkscape.app and make the damn button in it and export it to PNG and then convert to TIFF.

Interface Building Tools aren't designing the window themes, they are the glue to make the visual interface abstractions between methods and targets actions.

How the syntax is foreign makes no sense. It makes it quite clear that the receiving object on the left will be the recipient of the messages on the right. Instead of attempting to be a left to right language like English it actually arranges it more right to left.

target <--action vs. action-->target.

It's not wonder Germans don't have much trouble programming in ObjC and Cocoa APIs.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.