I think there's a problem in the documentation for NSComboBox

2009-10-07 Thread Rui Pacheco
Hi, I was implementing the data source for an NSComboBox when I noticed something wasn't right with the documentation: There is a page in the combo box programming topics that lists which methods a combo box data source should implement. This page was last modified in 2002: http://developer.apple.

Re: I think there's a problem in the documentation for NSComboBox

2009-10-07 Thread Graham Cox
On 07/10/2009, at 9:14 PM, Rui Pacheco wrote: So, were the data source methods available before 10.6 (I want my app to run on 10.5) and the data source reference is wrong or was the conceptual page for the combo box updated but not the revision date? Did anyone used the data source method

Migrating screensaver to 10.6 (Snow Leopard) produces erratic behavior

2009-10-07 Thread Gabriel Zachmann
I am trying to migrate my screenaver to Snow Leopard. Everything is working fine under 10.5, of course. So I just moved the project over to a machine with 10.6, and made the following settings in the project settings: Architectures = Standard (32/64 bit Universal) Base SDK = Current Ma

Re: I think there's a problem in the documentation for NSComboBox

2009-10-07 Thread Thomas Clement
On Oct 7, 2009, at 12:22 PM, Graham Cox wrote: the only way to know for sure is to have some knowledge/memory/a copy of earlier documentation, which is useless for newbies (and those of use whose memories would rather not accrete that sort of knowledge) wanting to target < 10.6 Or you can

stringWithCString:length deprecation

2009-10-07 Thread Torsten Curdt
Hey folks, I am in the middle of cleaning up code and moving it to 10.5+ 64bit. For most things it's quite straight forward, but one of the deprecations to get rid of is: stringWithCString:length cString must not be NULL. cString should contain characters in the default C-string encoding. This

Re: stringWithCString:length deprecation

2009-10-07 Thread Graham Cox
On 07/10/2009, at 11:00 PM, Torsten Curdt wrote: But that doesn't look like a real replacement. Shouldn't there be a stringWithCString:length:encoding What am I missing? Pointers? Comments? Suggestions? My guess is that in deprecating this they also took the opportunity to remove an API

Re: stringWithCString:length deprecation

2009-10-07 Thread Scott Thompson
But that doesn't look like a real replacement. Shouldn't there be a stringWithCString:length:encoding What am I missing? I think what you're missing is: - (id)initWithBytes:(const void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding; Scott _

Re: Constructive Criticism

2009-10-07 Thread Jonathan Dann
- (id) init { if(self == [super init]){ Year = 0; orignalYear = 0; } return (self); } In addition to the other comments regarding calling super, you don't need to initialize instance variables to values like 0, 0.0, NO, nil,

Re: Mouse move messages sent to both superview and a subview

2009-10-07 Thread Oleg Krupnov
It seems that not only mouseMoved, but all mouse events, such as mouseDown, mouseUp, mouseDragged etc. are delivered to both superview and subview. How do I force the mouse events to be delivered to only the subview? On Tue, Jul 21, 2009 at 7:07 AM, John C. Randolph wrote: > > On Jul 19, 2009, a

Remove NSToolbar close button

2009-10-07 Thread Zephyroth Akash
Hi, Is it possible to remove/hide the close button of a NSToolbar ? Zephyroth ___ 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-admins(at)li

NSAttributedString always returns NO for -isEqualToAttributedString with attachments present?

2009-10-07 Thread Jim Correia
The documentation for -[NSAttributedString isEqualToAttributedString:] says: Attributed strings must match in both characters and attributes to be equal. It doesn't mention attachments at all. Consider the following code: attributedString is the input string, and it may contain image

Re: NSLayoutManager and best override point for temporary attributes

2009-10-07 Thread Keith Blount
Hi Ross, Many thanks for the suggestion. >> I tried saving the edited range of text in the text storage and then >> having my layout manager check this from: >> >> -textStorage:edited:range:changeInLength:invalidatedRange: >> >> Then my layout manager adds temp attribs in this method. Turns out

[iPhone] In App Purchase Voodoo?

2009-10-07 Thread James Lin
Hi all... This may sound kinda weird... I've been trying to code In-App Purchase into my app. and this afternoon i've finally succeeded to the point where I can make a purchase and have the app restore return my in-app item. and it then asks me for itunes account to make a purchase...I've g

Re: Triggering a Method when a Core Data Property is Altered.

2009-10-07 Thread Volker in Lists
Hi, you call addObserver on that CoreData object - which is a regular NSObject descendant anyway. So just as for every other NSObject you want to observe a property of. In case of CoreData objects you have to deal with it differently than with objects you create your self in your code 8an

Memory corruption when moving from 10.5 to 10.6

2009-10-07 Thread Gabriel Zachmann
Dear list, I am trying to make my screensaver work under 10.6. However, it seems to me that under 10.6 there is memory corruption going on somewhere somehow. I've set the "garbage collection" flag in XCode's project settings to "supported". Otherwise, I haven't changed anything in my code.

Re: Triggering a Method when a Core Data Property is Altered.

2009-10-07 Thread Volker in Lists
hi, which Kyle told you has nothing in common with a managedobject nor was it clear how that code was used. You have to call addObserver on the managed object and add the object that has to observe as observer. It really depends on your setup where to add what best. There exist a couple o

Re: NSAttributedString always returns NO for -isEqualToAttributedString with attachments present?

2009-10-07 Thread Douglas Davidson
On Oct 7, 2009, at 6:12 AM, Jim Correia wrote: The documentation for -[NSAttributedString isEqualToAttributedString:] says: Attributed strings must match in both characters and attributes to be equal. It doesn't mention attachments at all. Consider the following code: attributedStrin

Re: app delegate +initialize

2009-10-07 Thread Matt Neuburg
On Tue, 6 Oct 2009 23:30:02 -0700, John Baldwin said: >I put an NSLog statement at the beginning and end of the +initialize >method to track when it gets called on the test machine. This might not help, but I would suggest trying some other method of confirming that +initialize is being called. T

Strange Core Data problem after upgrade

2009-10-07 Thread Rui Pacheco
Hi, I upgraded to 10.6 midway through a project and bugs appeared where there was none previously. I am now seeing the error "Failed to call designated initialiser on NSManagedObject class '' " when I created an object on the MOC or when I fetch an object for editing. Step by step debugging showed

strange localization issue

2009-10-07 Thread Rick C.
hello, i have a project that is localized into multiple languages with the main language being english. i did this in the pre-xib days where you could open the nibs without xcode. in my project i only have english but i duplicated the english nib into my other languages and everything actuall

Re: Problem using filewrappers under snow leopard

2009-10-07 Thread Eagle Offshore
Oops, I misspoke. I am doing it "right" AFAICS. Here's the whole method - (NSFileWrapper *)fileWrapperOfType:(NSString *)aType error: (NSError**)errPtr { int i, count = [_songs count]; NSMutableDictionary * fileWrappers = [NSMutableDictionary dictionaryWithCapacity:count + 1];

Re: Triggering a Method when a Core Data Property is Altered.

2009-10-07 Thread Volker in Lists
Hi. Is this any better? See bewlo, and in addition: Did it work? It shouldn't have worked :-/ On NSManagedObject side: According to Apple the initWithEntity should not be overridden (http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CoreData/Articles/cdCreateMOs.html )

Re: Strange Core Data problem after upgrade

2009-10-07 Thread Volker in Lists
Hi, problem A: have you made sure you have set the class in the data modeler correctly for that ManagedObject? When googling for your error message I do receive such problems that were fixed by setting the proper custom class name. Cheers, Volker __

Re: Problem using filewrappers under snow leopard

2009-10-07 Thread Ken Thomases
This isn't related to the bug you're asking about, but it's gone by twice, so I need to comment on it: On Oct 7, 2009, at 11:33 AM, Eagle Offshore wrote: return [[NSFileWrapper alloc] initDirectoryWithFileWrappers:fileWrappers]; This is a leak. The caller is not expecting to receive ow

Re: Constructive Criticism

2009-10-07 Thread Derek Chesterfield
On 6 Oct 2009, at 22:48, Alastair Houghton place.net> wrote: Oh, and since I'm in the dot-syntax-is-evil camp, s/self.year/[self year]/g in Bill's code :-D :-D Just an aside, but does either syntax got optimised by the compiler (GCC or LLVM). Obviously it can't in all cases, but this see

Re: Triggering a Method when a Core Data Property is Altered.

2009-10-07 Thread Volker in Lists
Hi, awakeFromFetch is only called when the object is loaded from the persistent store (=fetched). So all newly inserted objects are not observed. this might be one reason for not getting triggered for rows 2/3 if they were not fetched but created. Otherwise I have no idea why it doesn't

Re: Triggering a Method when a Core Data Property is Altered.

2009-10-07 Thread Kyle Sluder
Folks, Would you mind keeping this discussion either on- or off-list? It's kind of like listening to half of a telephone conversation. :-) --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mo

Re: Constructive Criticism

2009-10-07 Thread BJ Homer
On Wed, Oct 7, 2009 at 10:53 AM, Derek Chesterfield wrote: > > > On 6 Oct 2009, at 22:48, Alastair Houghton > wrote: > > Oh, and since I'm in the dot-syntax-is-evil camp, s/self.year/[self >> year]/g in Bill's code :-D :-D >> > > Just an aside, but does either syntax got optimised by the compil

Re: Triggering a Method when a Core Data Property is Altered.

2009-10-07 Thread Joshua Garnham
Hi, That works now, Thanks Very Much!!! Josh. From: Volker in Lists To: Joshua Garnham Cc: cocoa-dev@lists.apple.com Sent: Wednesday, 7 October, 2009 18:04:59 Subject: Re: Triggering a Method when a Core Data Property is Altered. Hi, awakeFromFetch is only c

Re: [iPhone] Application running for the very first time...

2009-10-07 Thread Steve Christensen
On Oct 1, 2009, at 10:57 PM, James Lin wrote: Thank you for the code snipet, but I am confused at the logic here... the following code will be executed EVERY time the program runs, right? NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] initWithCapacity:10]; [dictionary se

Re: Constructive Criticism

2009-10-07 Thread Alastair Houghton
On 7 Oct 2009, at 18:19, BJ Homer wrote: On Wed, Oct 7, 2009 at 10:53 AM, Derek Chesterfield wrote: On 6 Oct 2009, at 22:48, Alastair Houghton > wrote: Oh, and since I'm in the dot-syntax-is-evil camp, s/self.year/[self year]/g in Bill's code :-D :-D Just an aside, but does either synt

Re: [iPhone] Application running for the very first time...

2009-10-07 Thread Marco S Hyman
On Oct 7, 2009, at 10:33 AM, Steve Christensen wrote: In that case if ([[NSUserDefaults standardUserDefaults] boolForKey:@"PIFirstRun"] == YES){ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"PIFirstRun"]; //first run [user

Re: app delegate +initialize

2009-10-07 Thread Jens Alfke
On Oct 6, 2009, at 11:30 PM, John Baldwin wrote: When the application crashes on launch, there is no record of the +initialize method being called. When the application launches successfully, there is a record of the +initialize method being called. I haven't been following the whole thr

Re: Strange Core Data problem after upgrade

2009-10-07 Thread Kyle Sluder
On Wed, Oct 7, 2009 at 9:25 AM, Rui Pacheco wrote: > I am now seeing the error "Failed to call designated initialiser on > NSManagedObject class '' " when I created an object on the MOC or when I > fetch an object for editing. Step by step debugging showed that what seems > to generate the error i

NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread David Reitter
What is the easiest way to get my customized NSAlert to allow multiple key equivalents for its buttons? For instance, I'd like to assign not just the default Command-D to "Don't Save", but also another key with which my users are very familiar. I think it might be possibly to replace the

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread Kyle Sluder
On Wed, Oct 7, 2009 at 10:58 AM, David Reitter wrote: > What is the easiest way to get my customized NSAlert to allow multiple key > equivalents for its buttons? You're probably going to need to stop using NSAlert and start using your own window as a sheet. Then you should be able to override -s

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread Jens Alfke
On Oct 7, 2009, at 10:58 AM, David Reitter wrote: What is the easiest way to get my customized NSAlert to allow multiple key equivalents for its buttons? I think the best way is to create your own alert panel in a nib and run it modally. That way you have total control — you can set your o

EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Gabriel Zachmann
I think I have constructed a minimal example which shows at least one instance of the memory corruption under 10.6 I am struggling with at the moment. It is a stand-alone Cocoa app with just an NSView and one CALayer and an animation on it, that gets replaced every few seconds. The relevan

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread David Reitter
On Oct 7, 2009, at 2:09 PM, Jens Alfke wrote: I think the best way is to create your own alert panel in a nib and run it modally. That way you have total control — you can set your own window delegate to handle key events, for example. I had a similar solution beforehand but gave up on it b

Re: Constructive Criticism

2009-10-07 Thread Bill Bumgarner
On Oct 7, 2009, at 9:53 AM, Derek Chesterfield wrote: Just an aside, but does either syntax got optimised by the compiler (GCC or LLVM). Obviously it can't in all cases, but this seems an obvious case where it could be replaced by an assignment. Message sends can never be optimized away by

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Stephen J. Butler
On Wed, Oct 7, 2009 at 1:13 PM, Gabriel Zachmann wrote: > - (CALayer *) makeImageLayer: (NSString *) img_name inRect: (NSSize) size > { >// [snip] >    CGImageRef cgImage = CGImageSourceCreateImageAtIndex( sourceRef, 0, NULL > ); >// [snip] >    imgLayer.contents = (id) cgImage; >// [s

Re: [iPhone] Application running for the very first time...

2009-10-07 Thread Steve Christensen
On Oct 7, 2009, at 10:47 AM, Marco S Hyman wrote: On Oct 7, 2009, at 10:33 AM, Steve Christensen wrote: In that case if ([[NSUserDefaults standardUserDefaults] boolForKey:@"PIFirstRun"] == YES){ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"PIFirstRun"];

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread Kyle Sluder
On Wed, Oct 7, 2009 at 11:19 AM, David Reitter wrote: > window = (MyNSAlert*)  [window clone]; What is this -clone method? > That way I could get NSAlert to do all the layout and prepare the window, > but then take over and roll my own? No, because even granting the existence of this -clone met

Alert prompts for BetterAuthorizationService

2009-10-07 Thread Todd Heberlein
In Apple's BetterAuthorizationSample application pressing the "LowNumberedPorts" button brings up a window to authorize yourself. It includes the following text to explain why you are authorizing yourself: "You must be authorized to open low-numbered TCP ports. Type your password to allow B

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread David Reitter
On Oct 7, 2009, at 2:48 PM, Kyle Sluder wrote: On Wed, Oct 7, 2009 at 11:19 AM, David Reitter > wrote: window = (MyNSAlert*) [window clone]; What is this -clone method? I meant NSObject's -copy. Confused it with Java's clone method. That way I could get NSAlert to do all the layout and pr

Re: Alert prompts for BetterAuthorizationService

2009-10-07 Thread Olivier Palliere
Hi Todd, If you already installed your tool once and didn't change the kind of rights that it is using, then it is most likely in the /etc/ authorization file. If you remove your rights from there, re-installing your helper will recreate the rights with the new value. Olivier./. Molowa.c

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread Kyle Sluder
On Wed, Oct 7, 2009 at 12:01 PM, David Reitter wrote: > I meant NSObject's -copy.  Confused it with Java's clone method. NSWindow doesn't conform to NSCopying anyway, so -copy will just raise an exception because there is no suitable implementation of -copyWithZone:. > FWIW, the alerts are run w

Re: Strange Core Data problem after upgrade

2009-10-07 Thread Kyle Sluder
On Wed, Oct 7, 2009 at 12:13 PM, Rui Pacheco wrote: > Should override -initWithEntity:insertIntoManagedObjectContext: ? I would not recommend doing so. I was merely asking because it seemed like that might be what you are doing, and if it was I would advise against it. Also, please keep discuss

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread David Reitter
On Oct 7, 2009, at 3:12 PM, Kyle Sluder wrote: FWIW, the alerts are run with beginModalSessionForWindow and runModalSession. So I don't understand why you're so intent on using NSAlert if you're not using its -beginSheetModalForWindow:… convenience method? Oh, I use it. But because of the

Re: Alert prompts for BetterAuthorizationService

2009-10-07 Thread Todd Heberlein
On Oct 7, 2009, at 12:05 PM, Olivier Palliere wrote: If you already installed your tool once and didn't change the kind of rights that it is using, then it is most likely in the /etc/ authorization file. If you remove your rights from there, re-installing your helper will recreate the rig

feeble anti-aliasing

2009-10-07 Thread Colin Howarth
Hi, I'm doing some simple drawing (black Bezier curves and lines on a white background) to a custom view which inherits directly from NSView. In - (LensView*)initWithFrame:(NSRect)frameRect I have: [self translateOriginToPoint:NSMakePoint( 20.0, (frameRect.size.height / 2) ) ]; [self sc

re: Alert prompts for BetterAuthorizationService

2009-10-07 Thread Mr. George Warner
On Wed, 07 Oct 2009 11:51:37 -0700, Todd Heberlein > wrote: > In Apple's BetterAuthorizationSample application pressing the > "LowNumberedPorts" button brings up a window to authorize yourself. It > includes the following text to explain why you are authorizing yourself: > "You must be autho

Re: feeble anti-aliasing

2009-10-07 Thread Alastair Houghton
On 7 Oct 2009, at 21:11, Colin Howarth wrote: I'm surprised that the output on screen doesn't look better. Usually Quartz does an extremely good job... Are there any other settings I can adjust with regard to the anti- aliasing? (Not talking about flatness of Bezier curves here). Is this p

Re: feeble anti-aliasing

2009-10-07 Thread Colin Howarth
On 7 Oct, 2009, at 22:19, Alastair Houghton wrote: On 7 Oct 2009, at 21:11, Colin Howarth wrote: I'm surprised that the output on screen doesn't look better. Usually Quartz does an extremely good job... I know. That's why I'm confused. Are there any other settings I can adjust with regard

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Gabriel Zachmann
Thanks for the quick response. I am still a bit confused ... and, besides, I still get a core dump ;-( I think this is your problem right here. In a GC environment CALayer isn't going to retain its content, it stores a strong reference instead. First of all, how can I know that? (I'm asking s

Re: [Xgrid] GridMandelbrot Sample gone?

2009-10-07 Thread Stefan Wolfrum
Okay, here's the answer (thanks to Knut Lorenzen, author of the excellent (german) book "Mac OS X 10.6 Snow Leopard"): Apparently, starting with Snow Leopard Apple no longer puts the developer examples on the Snow Leopard Installation discs. :-( However, they (including the GridMandelbrot sample) a

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread David Duncan
On Oct 7, 2009, at 1:47 PM, Gabriel Zachmann wrote: I did that and there is one sentence that I don't understand at all: "CFMakeCollectable calls CFRelease, but has two supplementary features: [...]; second, it’s a no-op in a reference counted environment." Shouldn't that be "a no-op in a

Re: feeble anti-aliasing

2009-10-07 Thread Ken Ferry
On Wed, Oct 7, 2009 at 1:45 PM, Colin Howarth wrote: > On 7 Oct, 2009, at 22:19, Alastair Houghton wrote: > >> On 7 Oct 2009, at 21:11, Colin Howarth wrote: >> >> I'm surprised that the output on screen doesn't look better. >>> >> >> Usually Quartz does an extremely good job... >> > > I know. Th

Using Security framework to write self-limiting app without modifying /etc/authorization?

2009-10-07 Thread Piers Uso Walter
I am trying to write a self-limiting application (i.e. an application that asks for authorization before performing certain functions). I have reviewed the Security framework which seems to be intended for requirements like this, but fail to understand how this would work in my specific cas

Re: feeble anti-aliasing

2009-10-07 Thread Dave Keck
Try applying a 0.25 or 0.5 pixel shadow that's the same color as whatever you're drawing. (This technique has worked very well for me in the past for getting a smoother look.) Also, I've found that offsetting my drawing code by fractions of pixels can help, but usually in the opposite case where I

Re: feeble anti-aliasing

2009-10-07 Thread Colin Howarth
On 7 Oct, 2009, at 23:13, Dave Keck wrote: Try applying a 0.25 or 0.5 pixel shadow that's the same color as whatever you're drawing. (This technique has worked very well for me in the past for getting a smoother look.) I'll give it a go. In fact eventually I'll end up calculating what the va

Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Gabriel Zachmann
Thanks for your response. No. CFRetain & CFRelease continue to work the same regardless of GC. That is, the reference count field still exists, but Obj-C objects in GC start life with a 0 retain count and -retain/-release/- retainCount/-autorelease are no-op'd. CF objects still start life

Autorelease pool

2009-10-07 Thread Michael Süssner
I habe created a small shell programm using Cocoa Foundation class for test purposes. After my test program has passed successfully the drain method of the autorelease buffer is called and "sometimes" I get the following error: Program received signal: “EXC_BAD_ACCESS”. sharedlibrary apply-

Window maxSize different from setMaxSize ???

2009-10-07 Thread Bill Cheeseman
Can somebody explain this to me? It's on Snow Leopard 10.6.1: In my window controller's -windowDidLoad method (or -awakeFromNib): [[self window] setMaxSize:NSMakeSize(800, 800)]; [[self window] maxSize]; // --> {800, 856} -- Bill Cheeseman b...@cheeseman.name _

Re: Autorelease pool

2009-10-07 Thread Nick Zitzmann
On Oct 7, 2009, at 3:53 PM, Michael Süssner wrote: How can I track which object has already been release: You can't. Read up on the memory management rules; you've made a few mistakes in your code (assuming you're not using GC).

Re: Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Shawn Erickson
On Wed, Oct 7, 2009 at 2:48 PM, Gabriel Zachmann wrote: > Thanks for your response. > > No. CFRetain & CFRelease continue to work the same regardless of GC. That >> is, the reference count field still exists, but Obj-C objects in GC start >> life with a 0 retain count and -retain/-release/-retain

Re: Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Michael Ash
On Wed, Oct 7, 2009 at 5:48 PM, Gabriel Zachmann wrote: > Thanks for your response. > >> No. CFRetain & CFRelease continue to work the same regardless of GC. That >> is, the reference count field still exists, but Obj-C objects in GC start >> life with a 0 retain count and -retain/-release/-retain

Re: Autorelease pool

2009-10-07 Thread Shawn Erickson
On Wed, Oct 7, 2009 at 2:53 PM, Michael Süssner wrote: > I habe created a small shell programm using Cocoa Foundation class for test > purposes. > > After my test program has passed successfully the drain method of the > autorelease buffer is called and "sometimes" I get the following error: > Pro

Re: Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Dave Carrigan
On Oct 7, 2009, at 2:48 PM, Gabriel Zachmann wrote: So in other words, the purpose of CFMakeCollectable() is to decrease the ref-count to 0 in the GC world, and only there, is that correct? Not quite; it decreases the ref-count by 1 in a gc environment. Every CFRetain must be matched by a

Re: Autorelease pool

2009-10-07 Thread Dave Carrigan
On Oct 7, 2009, at 2:53 PM, Michael Süssner wrote: NSArray *vPolyArray = [NSArray arrayWithObjects: [[PolygonShape alloc] initWithNumberOfSides:4 minimumNumberOfSides:3 maximumNumberOfSides:7], [[PolygonShape alloc] initWithNumberOfSides:6 minimumNumberOfSides:5 maximu

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Gabriel Zachmann
Well, I did some more experimenting. Now I've got 2 issues ... First of all, I guess I should apologize, because my minimal example was not quite "minimal". There was one other layer, which I have removed now. Now the code sort of works in the GC world, *except* the memory footprint keeps g

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Stephen J. Butler
On Wed, Oct 7, 2009 at 3:47 PM, Gabriel Zachmann wrote: > In the doc of CALayer.contents it says > >   @property(retain) id contents > > Does a retained property always translate to a strong reference in a GC > environment? No, in GC a retain/release/autorelease always translates to a no-op. An "

[MEETING] CocoaHeads Munich tonight!

2009-10-07 Thread Uli Kusterer
Hi, CocoaHeads Munich, Germany will be meeting again tonight, Thursday 8 Oct. at 20:00 at the Park Cafe. Hope to see many of you there. -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com ___ Cocoa-

Re: Autorelease pool

2009-10-07 Thread Uli Kusterer
On 08.10.2009, at 00:12, Dave Carrigan wrote: Read and re-read the memory management rules until you start dreaming about them. Then you will start on the path to enlightenment :-) Wax on ... wax off. Wax on ... wax off. ... ... sorry, wrong kind of enlightenment. -- Uli Kusterer Sole

UITabBar & UIActionSheet

2009-10-07 Thread Mark Bateman
Hi, I have an app that uses a TabBarController and on certain of the tabbar items I want the user to be presented with a UIActionsheet even if the user presses the the same tab bar item that is currently selected. I have tried the viewwillappear method and that works only if i select an

Re: feeble anti-aliasing

2009-10-07 Thread Greg Guerin
Colin Howarth wrote: I don't know enough about what Quartz is doing. For instance, does it calculate the coverage of a pixel (i.e. the fraction covered) as a float and then use that times 255 for pixel values (for black on white) giving 256 steps. Or does it quantize down to 16 steps, for e

Re: Alert prompts for BetterAuthorizationSample

2009-10-07 Thread Jerry Krinock
On 2009 Oct 07, at 12:25, Todd Heberlein wrote: On Oct 7, 2009, at 12:05 PM, Olivier Palliere wrote: If you remove your rights..., re-installing your helper will recreate the rights with the new value. Ka-ching! Thanks a million! I was at my wit's end. BUT THEN on 2009 Oct 07, at 13:18

Re: UITabBar & UIActionSheet

2009-10-07 Thread Luke the Hiesterman
If you subclass UITabBar you can get the touches yourself and respond appropriately. Luke On Oct 7, 2009, at 4:03 PM, Mark Bateman wrote: Hi, I have an app that uses a TabBarController and on certain of the tabbar items I want the user to be presented with a UIActionsheet even if the us

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Gabriel Zachmann
No, in GC a retain/release/autorelease always translates to a no-op. An "id" or "SomeObject*" translates to a strong reference unless specifically marked as weak. So in the GC world, there is no difference between @property(retain) and @property(assign), is there? "If the object is in the g

Re: feeble anti-aliasing

2009-10-07 Thread Colin Howarth
On 8 Oct, 2009, at 01:19, Greg Guerin wrote: Colin Howarth wrote: I don't know enough about what Quartz is doing. For instance, does it calculate the coverage of a pixel (i.e. the fraction covered) as a float and then use that times 255 for pixel values (for black on white) giving 256 steps

Re: Cocoaheads Lake Forest (92630) meeting 9/8/2009 at 7 pm on Google Toolkit for Mac

2009-10-07 Thread Scott Ellsworth
On Wed, Oct 7, 2009 at 11:54 AM, James Gregurich wrote: > is the group meeting tonight? I haven't seen a notice go out. I had it scheduled for Oct. 14th - second tuesday. Does this work for you? Scott > > On Sep 8, 2009, at 8:54 PM, Scott Ellsworth wrote: > >> CocoaHeads Lake Forest will be me

[MEET] CocoaHeads-NYC tomorrow night, Thu 10/8

2009-10-07 Thread Andy Lee
Alex McAuley will give a talk entitled "The Wonders of kqueue." What can I say, the guy really likes kqueue. As usual: (1) Please feel free to bring questions, code, and works in progress. We have a projector and we like to see code and try to help. (2) We'll have burgers and beer afterwards.

Re: Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Clark Cox
On Wed, Oct 7, 2009 at 2:48 PM, Gabriel Zachmann wrote: > Thanks for your response. > >> No. CFRetain & CFRelease continue to work the same regardless of GC. That >> is, the reference count field still exists, but Obj-C objects in GC start >> life with a 0 retain count and -retain/-release/-retain

View Hierarchies for apps like Quartz Composer

2009-10-07 Thread Darren Minifie
Hi Everyone I've recently tried implementing a tool that functioned similar to Quartz Composer (the tool was for an entirely different purpose, and I did not know about Quartz Composer at the time). Basically, the user is presented with a canvas. On the canvas, the user can place squares that rep

Re: Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Clark Cox
On Wed, Oct 7, 2009 at 3:09 PM, Dave Carrigan wrote: > > For new code, the typical pattern is > > CFTypeRef obj = CFMakeCollectable(CFCreateType(…));             // no-op in > non-gc; releases and makes eligible for collection in gc > // ... > if ([NSGarbageCollector defaultCollector] == NULL) CFR

Reacting to UIBarButtonItem

2009-10-07 Thread Anthony Smith
I have a settings pane similar to Weather's settings pane. I have a Done button on the right hand side which needs to trigger a flip animation to get back to the main view. I'm having trouble getting the UIBarButtonItem to trigger. I've tried setting the target and action properties of UIBa

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Luke the Hiesterman
Target and action is the way to go. There must be an error in doing so, probably a typo in setting the action selector. Remember that colons are part of selector names Luke On Oct 7, 2009, at 5:25 PM, Anthony Smith wrote: I have a settings pane similar to Weather's settings pane. I have

Re: UITabBar & UIActionSheet

2009-10-07 Thread Henry McGilton (Boulevardier)
On Oct 7, 2009, at 4:35 PM, Luke the Hiesterman wrote: If you subclass UITabBar you can get the touches yourself and respond appropriately. Luke You can also set a delegate for the Tab Bar Controller and implement the - (void)tabBarController:(UITabBarController *)tabBarController didSe

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Anthony Smith
Here's what I'm doing. - (void)displayShuffleView:(id)sender { // Whatever here } - (void)viewDidLoad { [super viewDidLoad]; [doneButton setTarget:self]; [doneButton setAction:@selector(displayShuffleView:)]; } I'm not sure what's up. self is a UIViewCon

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Luke the Hiesterman
I'd verify that doneButton != nil. If you created this in a nib, you might have forgotten to wire it up. Luke On Oct 7, 2009, at 5:40 PM, Anthony Smith wrote: Here's what I'm doing. - (void)displayShuffleView:(id)sender { // Whatever here } - (void)viewDidLoad { [super view

debugging cursors

2009-10-07 Thread David M. Cotter
how do i tell the OS to stop setting my cursor to the beachball whilst stopped in the debugger? i'm debugging my cursor setting stuff and that makes it impossible ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requ

Re: Problem using filewrappers under snow leopard

2009-10-07 Thread Graham Cox
On 08/10/2009, at 3:33 AM, Eagle Offshore wrote: Oops, I misspoke. I am doing it "right" AFAICS. Here's the whole method - (NSFileWrapper *)fileWrapperOfType:(NSString *)aType error: (NSError**)errPtr { int i, count = [_songs count]; NSMutableDictionary * fileWrappers = [NSMutabl

Re: debugging cursors

2009-10-07 Thread David M. Cotter
okay what i *really* need to do is override the OS *ever* setting the cursor to arrow eg: [[NSCursor arrowCursor] set]; i want to override that. i need to tell the OS to knock it off. worst case i need a notify that the OS changed the cursor out from under me. On Oct 7, 2009, at 5:50

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Luke the Hiesterman
Make sure that your navBar's userInteractionEnabled property is set to YES. Luke On Oct 7, 2009, at 5:58 PM, Anthony Smith wrote: Hm, both seem to be fine. - (void)viewDidLoad { [super viewDidLoad]; if (doneButton != nil) { NSLog(@"NOT NIL");

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Anthony Smith
Yes, user interaction enabled is set in IB for the nav bar. On Oct 7, 2009, at 9:04 PM, Luke the Hiesterman wrote: Make sure that your navBar's userInteractionEnabled property is set to YES. Luke On Oct 7, 2009, at 5:58 PM, Anthony Smith wrote: Hm, both seem to be fine. - (void)viewDidLo

Re: CoreData async fetch request

2009-10-07 Thread Ben Trumbull
On Oct 6, 2009, at 8:29 PM, David Melgar wrote: Hello, Thanks for the response. Seems that its straying somewhat from my original question. Sure, your original question is that you have a serious performance issue, and you'd like to hide it from the user by adding threads. I'm proposin

Re: View Hierarchies for apps like Quartz Composer

2009-10-07 Thread Graham Cox
On 08/10/2009, at 11:03 AM, Darren Minifie wrote: Hi Everyone I've recently tried implementing a tool that functioned similar to Quartz Composer (the tool was for an entirely different purpose, and I did not know about Quartz Composer at the time). Basically, the user is presented with

Re: feeble anti-aliasing

2009-10-07 Thread Greg Guerin
Colin Howarth wrote: I posted a couple of little screen shots (which compressed nicely to 16k and 30k or so) to the quartz-dev list. I got an automated reply that they're awaiting moderator approval (for having gone over 20k). Probably, if and when the images are posted, someone will say,

Re: Cocoa-dev Digest, Vol 6, Issue 1443

2009-10-07 Thread Gordon Apple
IMHO, you are trying to do this the hard way. I did one similar to that, using views, many years ago using MacApp. (Presented it at MadaCon in Phoenix.) I wouldn't do it that way again. Just draw everything in one view. Define a draw-shape object with lists of inputs and outputs (could be ob

Re: View Hierarchies for apps like Quartz Composer

2009-10-07 Thread Gordon Apple
(Crud -- Forgot to change the title again. Sorry about that. -- GA) IMHO, you are trying to do this the hard way. I did one similar to that, using views, many years ago using MacApp. (Presented it at MadaCon in Phoenix.) I wouldn't do it that way again. Just draw everything in one view

  1   2   >