Re: Best way to make Finder/Mail style toolbars?

2014-03-09 Thread jonat...@mugginsoft.com
On 9 Mar 2014, at 04:08, Jens Alfke wrote: > > Is there some setting I’ve overlooked that will give the toolbar this visual > style without my having to wrap all the items? Or is this really the way to > do it? > Unfortunately I think this is the case. What I have done in the past is to cre

Re: Best way to make Finder/Mail style toolbars?

2014-03-09 Thread Kyle Sluder
> On Mar 8, 2014, at 8:08 PM, Jens Alfke wrote: > > I want my Mac app's toolbar to look like the ones in the Finder and Mail, > with each item drawn as a framed button. So far the only way I’ve found to do > this is to give each NSToolbarItem a custom view that’s an NSSegmentedControl > with

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-09 Thread Bill Cheeseman
On Mar 7, 2014, at 12:40 PM, Aaron Tuller wrote: > Is this by any chance a 32-bit app? No, it is Standard Architectures (64-bit Intel)(x86_64). The offending code is in a custom framework of mine installed in /Library/Frameworks, also Standard Architectures. No ARC -- everything is old fash

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-09 Thread Bill Cheeseman
On Mar 7, 2014, at 2:42 PM, Greg Parker wrote: > The arclite glue library is supposed to add that method at runtime if it does > not exist. > > Perhaps arclite is not being linked in somehow? The machinery for linking > arclite is complicated and I forget what it is supposed to look like in

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-09 Thread Greg Parker
On Mar 9, 2014, at 4:09 AM, Bill Cheeseman wrote: > On Mar 7, 2014, at 2:42 PM, Greg Parker wrote: >> The arclite glue library is supposed to add that method at runtime if it >> does not exist. >> >> Perhaps arclite is not being linked in somehow? The machinery for linking >> arclite is compl

NSDecimalNumber queries

2014-03-09 Thread jonat...@mugginsoft.com
I require to use NSDecimalNumber extensively. When creating NSDecimalNumbers it is advised not to use the NSNumber subclass initWithXXX methods: http://www.cocoabuilder.com/archive/cocoa/227178-question-on-estimating-arraywithcapacity.html#227253 I presume that this still applies. To me it would

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-09 Thread Bill Cheeseman
On Mar 7, 2014, at 10:49 AM, Jens Alfke wrote: > On Mar 7, 2014, at 4:54 AM, Bill Cheeseman wrote: > >> However, when I run it on Mac OS X 10.7 Lion, I get a runtime error claiming >> it encountered an invalid argument, namely, the unrecognized selector >> -objectAtIndexedSubscript:. The NSAr

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-09 Thread Bill Cheeseman
These are the two framework class methods that were called: + (void)initialize { if (self == [PFUIElement class]) { // Accessibility API bug workaround support. isFixedMenuActionBug = ([self QSWStandardizedOperatingSystemVersion] >= versionMenuActionBugFixe

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-09 Thread Ken Thomases
On Mar 9, 2014, at 7:21 AM, Bill Cheeseman wrote: >NSArray *versionComponentStrings = [versionString > componentsSeparatedByString:@"."]; > static unsigned long sBCDSystemVersion = 0; >SInt32 majorVersion = ([versionComponentStrings count] >= 1) ? > [versionComponentStrings[0] intV

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript? SOLVED

2014-03-09 Thread Bill Cheeseman
I just realized that there is a bug in my +QSWStandardizedSystemVersion method that explains the crash. The fault is NOT the -objectAtIndex: message. It is instead the 3 versionComponentStrings[x] subscripted messages, which of course compile to -objectAtIndexedSubscript:. I was thinking of ver

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-09 Thread Bill Cheeseman
On Mar 9, 2014, at 8:31 AM, Ken Thomases wrote: > On Mar 9, 2014, at 7:21 AM, Bill Cheeseman wrote: > >> NSArray *versionComponentStrings = [versionString >> componentsSeparatedByString:@"."]; >> static unsigned long sBCDSystemVersion = 0; >> SInt32 majorVersion = ([versionComponentSt

Re: NSArray's objectAtIndex compiles to objectAtIndexedSubscript?

2014-03-09 Thread Bill Cheeseman
On Mar 9, 2014, at 8:31 AM, Ken Thomases wrote: > On Mar 9, 2014, at 7:21 AM, Bill Cheeseman wrote: > > The above three lines use the new-style array subscripting syntax (e.g. > versionComponentStrings[0]). That's the source of the crash, since that > support is not available in your deployme

Re: NSDecimalNumber queries

2014-03-09 Thread Gary L. Wade
The class NSDecimalNumber can already handle arithmetic operations. Look up its documentation directly. -- Gary L. Wade (Sent from my iPhone) http://www.garywade.com/ > On Mar 9, 2014, at 4:34 AM, "jonat...@mugginsoft.com" > wrote: > > I require to use NSDecimalNumber extensively. > > When cr

Re: Best way to make Finder/Mail style toolbars?

2014-03-09 Thread Lee Ann Rucker
> From: "Kyle Sluder" >> On Mar 8, 2014, at 8:08 PM, Jens Alfke wrote: >> >> I want my Mac app's toolbar to look like the ones in the Finder and Mail, >> with each item drawn as a framed button. So far the only way I’ve found to >> do this is to give each NSToolbarItem a custom view that’s a

Re: Best way to make Finder/Mail style toolbars?

2014-03-09 Thread Michael Starke
On 09 Mar 2014, at 19:03, Lee Ann Rucker wrote: > >> From: "Kyle Sluder" > >>> On Mar 8, 2014, at 8:08 PM, Jens Alfke wrote: >>> >>> I want my Mac app's toolbar to look like the ones in the Finder and Mail, >>> with each item drawn as a framed button. So far the only way I’ve found to >>>

Re: Best way to make Finder/Mail style toolbars?

2014-03-09 Thread Jens Alfke
On Mar 9, 2014, at 11:11 AM, Michael Starke wrote: > I'm creating ToolbarItems for myself in code and use NSButton, NSPopupButton > and NSSegemtedControl. They look like this just by setting the view on the > NSToolbarItem: ... > I do nothing special, so I'm wondering why yours don't line up.

RE: Best way to make Finder/Mail style toolbars?

2014-03-09 Thread Julius Oklamcak
> What does the code you're using look like? (Also, are you on 10.9?) The following works for me from 10.6 to 10.9 (I've left out code that creates an NSSearchField, NSPopUpButton and NSTextField controls - all look the same): - (NSToolbarItem *)toolbar:(NSToolbar *)toolbar itemForItemIdentifier: