Re: [Obj-C] if (self) vs. if (self != nil)

2012-02-26 Thread Karl Goiser
If you use double parentheses, you won’t get the warning: if ((self = [super init])) { } ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-a

Re: ObjC's flat and all-exported namespace, help!

2011-11-10 Thread Karl Goiser
On 10/11/2011, at 12:04 PM, Ian Joyner wrote: > It's the old I have a hammer so everything looks like a nail, but in C++'s > case it's I have a programming language, so everything gets put in that. We > really need to get away from that kind of thinking about programming > languages and get ba

Re: ObjC's flat and all-exported namespace, help!

2011-11-09 Thread Karl Goiser
Your first option looks better to me! :-) All I’m saying is that Objective C is a very mature language now and if it has been able to get by without adding this extra layer of complexity, why introduce it for an edge case to address a situation where people are expecting it to act like C++? Ap

Re: ObjC's flat and all-exported namespace, help!

2011-11-09 Thread Karl Goiser
euse various support classes for multiple bundle > products, so when the host loads our products this issue surfaces. > > And yes, this thread does belong on the objC list and will be moving it there > (I didn't realize there was a objC list when I originally posted). >

Re: ObjC's flat and all-exported namespace, help!

2011-11-08 Thread Karl Goiser
I think there is another solution that doesn’t involve making the language more complicated: I would complain to the suppliers of the bundles with conflicting class names. They know they are delivering into an environment with a flat namespace. It is up to them to defend against this sort of p

Re: ARC and Singletons

2011-08-02 Thread Karl Goiser
Hi Greg, Is that wishful thinking or a hint about the future? :-) All I have to say is: yes please!! Regards, Karl On 03/08/2011, at 5:43 AM, Greg Parker wrote: > On Aug 1, 2011, at 9:02 PM, Kyle Sluder wrote: >> if we had class storage (which in practice would be no different from >> stat

Re: ARC and Singletons

2011-08-01 Thread Karl Goiser
eton pattern is a fix for inadequately designed languages. Karl On 02/08/2011, at 2:02 PM, Kyle Sluder wrote: > On Mon, Aug 1, 2011 at 7:14 PM, Karl Goiser wrote: >> Wow, class methods finally get the tick of approval! Only 30+ years after >> being specified in the

Re: ARC and Singletons

2011-08-01 Thread Karl Goiser
Wow, class methods finally get the tick of approval! Only 30+ years after being specified in the Smalltalk standard.. Forget about singletons: they are just a workaround for not having class methods/variables. Each class is a single object that exists for the life of the application therefo

Re: Does anyone else dislike Xcode 4?

2011-07-24 Thread Karl Goiser
I think that we need to differentiate between the new features that could easily have been put into Xcode 3, and the changes that have been made (to my mind) to wreck a great UI. Schemes and Git and the like do not justify the damage… Why would I want to see Interface Builder objects when I am

Re: Does anyone else dislike Xcode 4?

2011-07-24 Thread Karl Goiser
Hi David, On 25/07/2011, at 8:44 AM, David Duncan wrote: > On Jul 24, 2011, at 3:34 PM, Karl Goiser wrote: > >> So, I tried the trick with behaviours, assigning debugging to a special tab. >> Sure it seems to work, but it doesn’t. I still get debugger panes crowding

Re: Does anyone else dislike Xcode 4?

2011-07-24 Thread Karl Goiser
How many debugger windows/panes do you want open at a time? I can tell you how many I want and need: 1. I can only debug one app, why should I have 7? All interfering with my editing? I have tabs containing the current set of files that I am editing. Every one of them has an open debugger p

Re: BOOL value in Dictionary

2008-11-23 Thread Karl Goiser
The issue is that a boolean value is not numeric, but the denotation of truth or falsehood. If you take boolVar to represent the proposition that "Socrates is a man", then saying: if (boolVar == YES) is equivalent to: if ("Socrates is a man" == YES) This is obviously a correct expression

Re: Problems when putting a window between desktop and desktop icons

2008-10-27 Thread Karl Goiser
Dear Markus and others, This is a problem that I have had with an application of mine, iCalViewer, which displays a window on the desktop. What happens is that you can find a window level which draws the window under the desktop icons and over the desktop itself. However, at that level,

Core Animation/Layers and Borderless Windows

2008-04-16 Thread Karl Goiser
Hello, I'm creating a borderless window whose content view uses Core Animation... When I do this, the window is drawn without any shadow no matter the alpha of the content. - a borderless window with a normal view draws the window's shadow. - a normal window with a content view which use

Core Animation - Modifying CAConstraints

2008-03-13 Thread Karl Goiser
Hello Cocoaers, I have a situation where I want to re-order sublayers of a layer which are positioned using CAConstraints. Is this at all possible? The constraints array property of a CALayer is declared as: @property(copy) NSArray *constraints; Which tells me that I can't modify the array

Re: CATextLayer metrics

2008-02-29 Thread Karl Goiser
Thanks Scott and Bill! On 01/03/2008, at 3:42 AM, Scott Anguish wrote: CATextLayer is largely a convenience class. It provides text features, but very little flexibility. You can easily subclass CALayer and create your own text layer that uses NSFont, complex text layout , and all the fam

CATextLayer metrics

2008-02-28 Thread Karl Goiser
Hello Cocoa people, With traditional Cocoa text drawing, it is possible to determine the size of a piece of text ahead of time with methods like NSString's sizeWithAttributes: or with NSCell's cellSizeForBounds:. These methods allow the determination of the width of some text, or the num