Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Mar 27, 2006, 09:17 PM   #1
jamdr
macrumors 6502a
 
jamdr's Avatar
 
Join Date: Jul 2003
Location: Bay Area
How can I create this interface effect in IB?

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?

jamdr is offline   0 Reply With Quote
Old Mar 28, 2006, 02:16 AM   #2
caveman_uk
Guest
 
caveman_uk's Avatar
 
Join Date: Feb 2003
Location: 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:
caveman_uk is offline   0 Reply With Quote
Old Mar 28, 2006, 10:47 AM   #3
jamdr
Thread Starter
macrumors 6502a
 
jamdr's Avatar
 
Join Date: Jul 2003
Location: 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.
jamdr is offline   0 Reply With Quote
Old Apr 5, 2006, 05:05 PM   #4
logicat2001
macrumors regular
 
Join Date: Apr 2003
Location: Minneapolis, MN
Hi jamdr,

Quote:
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.

Quote:
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.

Quote:
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?"

Quote:
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.

Quote:
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
logicat2001 is offline   0 Reply With Quote
Old Apr 6, 2006, 11:04 AM   #5
jamdr
Thread Starter
macrumors 6502a
 
jamdr's Avatar
 
Join Date: Jul 2003
Location: 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.
jamdr is offline   0 Reply With Quote
Old Apr 6, 2006, 11:04 AM   #6
Soulstorm
macrumors 68000
 
Soulstorm's Avatar
 
Join Date: Feb 2005
Quote:
I feel like Microsoft has done A LOT for developers and Apple really couldn't care less.
You have no idea....

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.
Soulstorm is offline   0 Reply With Quote
Old Apr 6, 2006, 11:36 AM   #7
logicat2001
macrumors regular
 
Join Date: Apr 2003
Location: Minneapolis, MN
jamdr, thanks for conversating.

Quote:
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.

Quote:
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.)

Quote:
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
logicat2001 is offline   0 Reply With Quote
Old Apr 6, 2006, 08:14 PM   #8
mdriftmeyer
macrumors 68020
 
mdriftmeyer's Avatar
 
Join Date: Feb 2004
Location: Pacific Northwest
Quote:
Originally Posted by jamdr
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?

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.
mdriftmeyer is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
How can I create this file? zoliky Community Discussion 1 May 30, 2010 04:54 PM
how can I achieve this eclipse effect in pregnancy photography please swanseastu Digital Photography 3 Mar 9, 2010 07:53 PM
how can i create or define chord in a song mahmudpilot Mac Applications and Mac App Store 2 Jul 7, 2009 01:22 PM
How can i create this? yummyapple Digital Video 3 Aug 29, 2008 02:44 PM
Automator Experts: How can I create this workflow? 66217 Mac Applications and Mac App Store 0 Apr 23, 2008 03:48 PM


All times are GMT -5. The time now is 06:23 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC