Re: Odd NSCache Eviction Behaviour

2011-04-05 Thread Dalmazio Brisinda
On 2011-04-05, at 2:37 AM, Ken Thomases wrote: On Apr 4, 2011, at 11:34 AM, Dalmazio Brisinda wrote: 2) The larger issue. The documentation states: By default, NSDiscardableContent objects in the cache are automatically removed from the cache if their content is discarded, although

Re: Odd NSCache Eviction Behaviour

2011-04-05 Thread Dalmazio Brisinda
On 2011-04-05, at 7:16 PM, Graham Cox wrote: On 05/04/2011, at 7:01 PM, Dalmazio Brisinda wrote: Pity. NSCache looked so promising You could roll your own cache class that has the same interface but uses a LRU algorithm internally. Then if NSCache is updated it would be a drop

Odd NSCache Eviction Behaviour

2011-04-04 Thread Dalmazio Brisinda
Hi all, I've been using an NSCache to store items that should be cached for performance reasons, since they are rather expensive to recreate. Understanding NSCache behaviour is giving me some headaches though. I initialize my NSCache as follows: _cellCache = [[NSCache alloc] init];

Eviction Policy in NSCache and NSDiscardableContent

2011-03-01 Thread Dalmazio Brisinda
I was looking at the NSCache class and the NSDiscardableContent protocol for an LRU-type cache. However the documentation doesn't say anything specific about the eviction policy used (apart from setting total cost and count limits), only that: The NSCache class incorporates various

Core Data Document-Based Application with Global Persistent Store

2010-11-17 Thread Dalmazio Brisinda
I've got a document-based Core Data application which works as is. I would like to add support for a global persistent store to hold a library of items. I've read most of the relevant docs, and understand that I should use configurations in the managed object models. I've defined two

Re: NSURLConnection Problem Inside QuickLook Generator

2009-12-09 Thread Dalmazio Brisinda
at 10:13 AM, Dalmazio Brisinda dbrisi...@gmail.com wrote: Well, it's the way the system is architected -- we are using QuickLook plugins for icon badging, and that badging depends on the state of certain elements of the filesystem which is maintained in a separate server process

NSURLConnection Problem Inside QuickLook Generator

2009-12-08 Thread Dalmazio Brisinda
I'm writing a QuickLook plugin that, as part of the preview process, makes an http call to a (localhost) server to obtain data that is then used to generate the preview image. The code below works fine outside the QuickLook architecture, as a standard Cocoa application. But as soon as I move

Re: NSURLConnection Problem Inside QuickLook Generator

2009-12-08 Thread Dalmazio Brisinda
, Dalmazio Brisinda wrote: I'm writing a QuickLook plugin that, as part of the preview process, makes an http call to a (localhost) server to obtain data that is then used to generate the preview image. The code below works fine outside the QuickLook architecture, as a standard Cocoa application

Re: NSURLConnection Problem Inside QuickLook Generator

2009-12-08 Thread Dalmazio Brisinda
? In otherwords, how deep does the sandbox go? Any ideas on how to possibly bypass this would be most welcome. Best, Dalmazio On 2009-12-08, at 9:48 AM, David Duncan wrote: On Dec 8, 2009, at 2:13 AM, Dalmazio Brisinda wrote: I'm writing a QuickLook plugin that, as part of the preview

Odd QuickLook generator UTI specification feature/bug

2009-11-07 Thread Dalmazio Brisinda
Has anyone else noticed some odd behavior in specifying UTI document types supported by a custom QuickLook generator? I'm experimenting with overriding several document types, including the high-level general UTI public.content. But it doesn't work. Similarly less, but still quite broad,

Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?

2009-10-30 Thread Dalmazio Brisinda
On 2009-10-29, at 3:13 AM, cocoa-dev-requ...@lists.apple.com wrote: Jim Correia put me on to MyCompositeImageRep, and after a fair amount of head scratching, I came up with the following solution. Basically, use a subclass of NSCustomImageRep to hold the two images to be composited or the

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

2009-10-28 Thread Dalmazio Brisinda
On 2009-10-28, at 8:17 AM, cocoa-dev-requ...@lists.apple.com wrote: On 28/10/2009, at 4:49 PM, Peter N Lewis wrote: a) composite two images, preferably while keeping the different resolutions of the icon b) how to dim an image similarly to kTransformDisabled I'm unclear what you mean by a),

Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?

2009-10-26 Thread Dalmazio Brisinda
Hello all, I'm working with a Snow Leopard 64-bit app that contains a Finder-like file browser that uses Carbon IconRef's. I'm trying to get the icons for the selected file with a custom overlay based on the current file selection and Icon Services. The problem I'm having is that the Icon

Re: Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?

2009-10-26 Thread Dalmazio Brisinda
Kyle, if I had my way, that's exactly what I would be doing... alas! It's presently out of my control. I'm stuck with dealing in IconRef's for the time being... Best, Dalmazio On Mon, Oct 26, 2009 at 10:26 PM, Dalmazio Brisinda dbrisi...@gmail.com wrote: If there's a way to extract

Re: Why does my font come out looking fuzzy?

2009-10-19 Thread Dalmazio Brisinda
Kyle's explanation #1 was spot on for my application. I had an NSSearchField in a custom window and view which was not displaying quite correctly. It looked as if it was not being anti-aliased. Going into Interface Builder, I noticed I had selected the Wants core animation layer switch for

Getting NSSearchField to get focus in NSStatusItem menu

2009-10-17 Thread Dalmazio Brisinda
Hi, I'm having difficulty getting a NSSearchField to work properly in an NSStatusItem. What I would like to do is something similar to the spotlight status bar item and the search field that pops up. After I create my view containing the NSSearchField and a also a simple menu in

Re: Status Bar Search Field Can't Get Focus w/ LSUIElement PList Setting

2009-10-16 Thread Dalmazio Brisinda
LSUIElement is set in the Info.plist file. Best, Dalmazio On 2009-10-15, at 5:19 PM, Dalmazio Brisinda wrote: I'm having a problem getting a NSSearchField to work properly in an NSStatusItem a la the Apple Help menu or the Apple Spotlight menu. Here's what's happening. I create my custom

Re: Status Bar Search Field Can't Get Focus w/ LSUIElement PList Setting

2009-10-16 Thread Dalmazio Brisinda
have to click on the status bar item twice (the popup shows up disappears and shows up again) before I can edit the search field. ??? Anyone have any ideas? Best, Dalmazio On 2009-10-16, at 1:36 AM, Dalmazio Brisinda wrote: In case anyone that is interested, I've solved this problem. Here's

Status Bar Search Field Can't Get Focus w/ LSUIElement PList Setting

2009-10-15 Thread Dalmazio Brisinda
I'm having a problem getting a NSSearchField to work properly in an NSStatusItem a la the Apple Help menu or the Apple Spotlight menu. Here's what's happening. I create my custom NSStatusItem / menu / custom view/ search field, and insert into into the status bar in -awakeFromNib. Setting

Reversing OS X Menu Bar and Menus for True RTL Language Applications

2009-04-09 Thread Dalmazio Brisinda
Hello all, I was wondering if anyone is aware of any work related to reversing the OS X menu bar and menus for true right-to-left language applications? By true RTL I mean coupling language localization with actually flipping the entire menu bar so that the Apple Menu and menu items

Re: How to create a simple service in Leopard?

2009-01-06 Thread Dalmazio Brisinda
Hello, Whoops, actually SimpleService does work... my mistake. I'll have a closer look at this example. Best, Dalmazio On 4-Jan-09, at 2:41 AM, Dalmazio Brisinda wrote: Hello, I'm having some problems writing and then installing my own service and would be grateful if anyone could

Re: How to create a simple service in Leopard?

2009-01-06 Thread Dalmazio Brisinda
everything works fine. Looks like an Xcode bug to me. Best, Dalmazio On 4-Jan-09, at 2:50 AM, Dalmazio Brisinda wrote: Hello, Whoops, actually SimpleService does work... my mistake. I'll have a closer look at this example. Best, Dalmazio On 4-Jan-09, at 2:41 AM, Dalmazio Brisinda wrote

Problem adding albums to iPhoto using Scripting Bridge

2008-12-05 Thread Dalmazio Brisinda
Hi all, I've been trying to add an empty album to iPhoto using Scripting Bridge but I just can't seem to get it to work. Here's what I have: iPhoto = [SBApplication applicationWithBundleIdentifier:@com.apple.iPhoto]; NSString *albumName = @My Test Album; NSDictionary *props =