Re: Core Data NSPredicate

2011-03-12 Thread Indragie Karunaratne
Andreas, That predicate syntax (and block predicates) won't work in my case because I'm using them in a Core Data NSFetchRequest. I did, however, manage to solve this issue by using subpredicates: NSPredicate *basePredicate = [NSPredicate predicateWithFormat:@"(name CONTAINS[cd] $QUERY) OR (a

Re: CoreFoundation object over-retained during finalization

2011-03-12 Thread jonat...@mugginsoft.com
On 12 Mar 2011, at 21:13, Quincey Morris wrote: > Here's what I think you should do: > > > 3. Submit a bug report with the crash log and backtrace, stating that you > don't CFRetain the SecKeychainRef anywhere, so it's being collected while it > still has a non-zero CFRetain count *or* it's

Re: setAlphaValue: and NSTextField

2011-03-12 Thread Quincey Morris
On Mar 12, 2011, at 11:45, Carlos Eduardo Mello wrote: > when I use the code bellow, the text inside my text field fades out ok. So > do the rim and shadow, however the white rectangular shape of the field > stays visible. > Is this the expected behaviour? > I thought setting the view's alpha

Re: CoreFoundation object over-retained during finalization

2011-03-12 Thread Quincey Morris
Here's what I think you should do: 1. Search your code to make sure there's no CFRetain of a SecKeychainRef anywhere. Make sure you're not using any 3rd party libraries that might do so too. You want to make absolutely sure that the only way it can get CFRetain'ed after creation is in the syste

Re: CoreFoundation object over-retained during finalization

2011-03-12 Thread jonat...@mugginsoft.com
On 12 Mar 2011, at 20:06, David Riggle wrote: > I've seen similar SecKeychain crashes whenever I put runtime code signing > checks into my code. I suspect SecKeychain is not garbage collection safe. > I've taken to doing the following to eliminate the crashes: > > [[NSGarbageCollector d

Re: CoreFoundation object over-retained during finalization

2011-03-12 Thread Quincey Morris
On Mar 12, 2011, at 12:29, Quincey Morris wrote: > The other odd thing is that I always believed that an object with a CFRetain > count (!=0) was immune from collection, even if there weren't any strong > references to it. That doesn't appear to be true now. Perhaps if was true in > Leopard. B

Re: CoreFoundation object over-retained during finalization

2011-03-12 Thread jonat...@mugginsoft.com
On 12 Mar 2011, at 20:11, Quincey Morris wrote: > Well, according to your earlier post the class method returns > 'mySSLIdentity'. That's going to get finalized some time, isn't it? What if > this object has a weak reference to (or a reference to an object that has a > weak reference to) the

Re: CoreFoundation object over-retained during finalization

2011-03-12 Thread Quincey Morris
On Mar 12, 2011, at 12:06, David Riggle wrote: > I've seen similar SecKeychain crashes whenever I put runtime code signing > checks into my code. I suspect SecKeychain is not garbage collection safe. > I've taken to doing the following to eliminate the crashes: > > [[NSGarbageCollector de

Re: CoreFoundation object over-retained during finalization

2011-03-12 Thread Quincey Morris
On Mar 12, 2011, at 11:41, jonat...@mugginsoft.com wrote: > I have examined my code carefully and just cannot get any traction on this. > The SecKeychainRef is stashed on the stack and passed into a class method so > I don't see how it could get anywhere near a finalize method. Well, according t

Re: CoreFoundation object over-retained during finalization

2011-03-12 Thread David Riggle
I've seen similar SecKeychain crashes whenever I put runtime code signing checks into my code. I suspect SecKeychain is not garbage collection safe. I've taken to doing the following to eliminate the crashes: [[NSGarbageCollector defaultCollector] disable]; err = SecCodeCopySelf

setAlphaValue: and NSTextField

2011-03-12 Thread Carlos Eduardo Mello
Hi everybody, when I use the code bellow, the text inside my text field fades out ok. So do the rim and shadow, however the white rectangular shape of the field stays visible. Is this the expected behaviour? I thought setting the view's alpha to 0 would render it completely invisible...

Re: Question about user interface.

2011-03-12 Thread Carlos Eduardo Mello
Quincey, Thanks for your help. I liked liked your idea a lot, specially the "thumb-button" for the graphical editor. The UI is comming out nicely. I really appreciate you taking the time to help me with design issues. Carlos. On Mar 10, 2011, at 10:06 PM, Quincey Morris wrote: - Then I t

Re: CoreFoundation object over-retained during finalization

2011-03-12 Thread jonat...@mugginsoft.com
On 12 Mar 2011, at 17:52, Quincey Morris wrote: > On Mar 12, 2011, at 06:36, jonat...@mugginsoft.com wrote: > >> keychainRef also has an initial retainCount of 2 (the framework recycles the >> same object I presume). > > Unfortunately, this is meaningless. Trying to interpret retain count val

Re: NSView, CALayer, setNeedsDisplay

2011-03-12 Thread Martin Hewitson
Many thanks, Kyle. That was all the information I needed to make it work. Martin On 12, Mar, 2011, at 07:28 PM, Kyle Sluder wrote: > On Sat, Mar 12, 2011 at 10:03 AM, Martin Hewitson > wrote: >> Dear list, >> >> I have a layer backed view whose layer contains many sublayers. The problem >> is

Re: NSView, CALayer, setNeedsDisplay

2011-03-12 Thread Kyle Sluder
On Sat, Mar 12, 2011 at 10:03 AM, Martin Hewitson wrote: > Dear list, > > I have a layer backed view whose layer contains many sublayers. The problem > is that the layer doesn't get drawn in the view when the app starts. If I > resize the window, then the layer and all its sublayers draw properl

NSView, CALayer, setNeedsDisplay

2011-03-12 Thread Martin Hewitson
Dear list, I have a layer backed view whose layer contains many sublayers. The problem is that the layer doesn't get drawn in the view when the app starts. If I resize the window, then the layer and all its sublayers draw properly. I've solved this problem before with what seemed like a magic c

Bound NSTextField

2011-03-12 Thread Livio Isaia
I have some NSTextField in a window bound to a view data, e.g.: @interface ImageView : NSImageView { ... } - (void)setDegrees:(NSNumber *)value; - (NSNumber *)degrees; - (void)setImageWidth:(float)value; - (float)imageWidth; - (void)setImageHeight:(float)value; - (float)imageHeight; ... and

Re: CoreFoundation object over-retained during finalization

2011-03-12 Thread Quincey Morris
On Mar 12, 2011, at 06:36, jonat...@mugginsoft.com wrote: > keychainRef also has an initial retainCount of 2 (the framework recycles the > same object I presume). Unfortunately, this is meaningless. Trying to interpret retain count values leads to madness. > Either way I could not trigger an a

Re: CoreFoundation object over-retained during finalization

2011-03-12 Thread jonat...@mugginsoft.com
On 11 Mar 2011, at 18:42, Quincey Morris wrote: > because you don't know whether the object will be deallocated immediately or > not. The Apple documentation says that it depends on what zone the object's > in. That means it isn't safe to CFRelease something (that you own) and then > CFRetain

Re: Unique strings array

2011-03-12 Thread Leonardo
Thank you so much to everybody. I am now using NSSet and it works so fast! Regards -- Leonardo > Da: Conrad Shultz > Data: Fri, 11 Mar 2011 18:20:05 -0800 > A: Leonardo > Cc: > Oggetto: Re: Unique strings array > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 3/11/11 6:11 PM, Leon

Re: Core Data NSPredicate

2011-03-12 Thread Andreas Grosam
On Mar 12, 2011, at 3:36 AM, Indragie Karunaratne wrote: > I have an NSManagedObject that has the following string attributes: > > artist, albumArtist, composer, comments, and lyrics > > I need to write an NSPredicate that will take an array of search terms, and > check if all of the above str

UITextView making containing UIScrollView scroll

2011-03-12 Thread Roland King
My main view is a UIScrollView on which I have a hierarchy of other views, ending with some UITextViews. I found that when I change the properties of the UITextView, the UIScrollView scrolls itself all over the place, often ending up in a very odd location. Having spent 3 days tearing bits of