How to tell if NSArrayController has a selected CoreData instance?

2009-09-28 Thread Timothy Reaves
When you call [anArrayController selection] for an Entity-backed NSArrayController, you always get an instance of _NSControllerObjectProxy back. Even when there is no object selected. It's not until you send a message to that proxy that you get unrecognized selector error. What is the

Re: How to tell if NSArrayController has a selected CoreData instance?

2009-09-28 Thread Timothy Reaves
> On Mon, Sep 28, 2009 at 2:28 PM, Timothy Reaves > wrote: >>        What is the correct way to determine if that proxy represents an >> actual entity? > > If you need to determine if there is a selection, you want to use the > selectedObjects property. If you

Re: How to tell if NSArrayController has a selected CoreData instance?

2009-09-29 Thread Timothy Reaves
> On Mon, Sep 28, 2009 at 6:02 PM, Timothy Reaves > wrote: >>     Well, I was hoping to bind buttons enabled property.  If I use a >> regular NSArray backed controller this works.  And you can't bind (at >> least I don't know how) with selectedObjects.  But

Re: How to tell if NSArrayController has a selected CoreData instance?

2009-09-29 Thread Timothy Reaves
> On Sep 28, 2009, at 18:11, Kyle Sluder wrote: > >> On Mon, Sep 28, 2009 at 6:02 PM, Timothy Reaves >> wrote: >>> Well, I was hoping to bind buttons enabled property. If I use a >>> regular NSArray backed controller this works. And you can't

Re: How to tell if NSArrayController has a selected CoreData instance?

2009-09-30 Thread Timothy Reaves
> On Sep 29, 2009, at 7:10 AM, "Timothy Reaves" > > wrote: > >> What makes you think you can? Logically, you shouldn't be >> able. I'd >> imagine selectedObjects is always going to return an index set; it'd >>

Re: How to tell if NSArrayController has a selected CoreData instance?

2009-10-01 Thread Timothy Reaves
On Sep 30, 2009, at 7:53 AM, Mike Abdullah wrote: -[NSArrayController selectedObjects] does not return proxies, it returns the real thing. On the other hand: -[NSArrayController selection] returns a proxy that represents the overall selection NSTreeController uses proxies to represent its

Bundle is not using icon or CFBundleIdentifier

2009-10-03 Thread Timothy Reaves
I have a bundle defined as a document type for an app. When I build one of these bundles, and double-click it, it opens in my app. All well and good. Except the following. 1) I have an icns file in my bundle, and have the CFBundleIconFile key in the info.plist in the bundle set to the

Re: Bundle is not using icon or CFBundleIdentifier

2009-10-04 Thread Timothy Reaves
On Oct 4, 2009, at 12:35 AM, Todd Heberlein wrote: Anyone want to point out what I'm doing wrong? Any help appreciated. I think I had to do a Project->Add To Project... and then select the icon file in order to get the icon to be used. Dragging the icons into my project didn't do the t

Re: Bundle is not using icon or CFBundleIdentifier

2009-10-05 Thread Timothy Reaves
> On 04.10.2009, at 06:30, Timothy Reaves wrote: >> I have a bundle defined as a document type for an app. When I build >> one of these bundles, and double-click it, it opens in my app. All >> well and good. Except the following. > > Wait, the bundle is defined

A question of CFBundleIdentifier & kMDItemContentType

2009-10-05 Thread Timothy Reaves
I have a bundle wit the CFBundleIdentifier set using the form com.mycompany.myapp.mybundle. When I run mdls against it, the kMDItemContentType shows "dyn.ah62d4qmuhk2x42pxsv3g825bsu". I thought it was supposed to show the com.mycompany.myapp.mybundle. Any idea why this is? ___

NSComboBoxCell in a NSTableView

2009-10-24 Thread Timothy Reaves
What is the correct way to size this? I have it added, and it's used. But by default, it doesn't size to hold it's content. I can set he width of the table column to a better width, but I can't seem to find how to size the height. Is there any way to get the table view - or column - to

Re: NSComboBoxCell in a NSTableView

2009-10-24 Thread Timothy Reaves
On Oct 24, 2009, at 10:32 AM, Stamenkovic Florijan wrote: On Oct 24, 2009, at 10:04, Timothy Reaves wrote: What is the correct way to size this? I have it added, and it's used. But by default, it doesn't size to hold it's content. I can set he width of the table col

NSScanner is stripping leading spaces?

2009-08-25 Thread Timothy Reaves
I have a character set; I've tried both NSCharacterSet *newlineSet = [NSCharacterSet characterSetWithCharactersInString:@"\n"]; and NSCharacterSet *newlineSet = [NSCharacterSet newlineCharacterSet]; I use this to read lines from a file, like so: while ([scanner scanUpToCharactersFromSet:

Re: Testing 32/64 bit and/or PPC

2009-08-29 Thread Timothy Reaves
On Aug 28, 2009, at 11:13 PM, Chris Idou wrote: If you have a universal binary, 32/64 and/or PPC, is there a way to force it to run one way or the other for testing purposes? There is, but you probably shouldn't. A Universal binary needs to have the tests run for all platforms,

display a section of view zoomed

2012-03-23 Thread Timothy Reaves
I have a subclass of NSView, and draw into using CoreGraphics. I'd like to add a second view (not NSScrollView) to display a zoomed section of the primary view. I thought I had a sample project for this bookmarked, but can no longer find it. Would anyone be able to point me in the correct direct

Problems with gesture recognizer & child view controller

2013-03-14 Thread Timothy Reaves
In my iOS app, I had a single primary view controller. This controlled three views, one of which had a gesture recognizer. This worked well. However, as the code grew, refactored this into three view controllers, as the primary view controller was doing too much, and it was beginning

Re: Problems with gesture recognizer & child view controller

2013-03-16 Thread Timothy Reaves
en I'm refactoring > using nibs or storyboards) > * With multiple gesture recognizers in a view hierarchy, I sometimes > accidentally set cancelsTouchesInView on the top one > > I hope this helps, > > Damian > > On Mar 14, 2013, at 6:55 PM, Timothy Reaves

Re: Why is it wrong to have relationships without an inverse in Core Data?

2013-06-22 Thread Timothy Reaves
Yes, CoreData is a database, and it does do ORM. It's not just an ORM, and it's not an RDBMS. If it wasn't a database, it couldn't store data; that is the definition of a database. A database is not something that has row, columns, etc; it's something that stores data in an unspecified manor.

Re: NSLog on releasebuild

2008-07-23 Thread Timothy Reaves
> On Jul 23, 2008, at 6:48 PM, Mike wrote: > >> Hello, >> >> During development and debug I typically use tons of NSLog()- >> messages to get info what's happening. >> I don't wish to include these messages to release-build so what is >> common/recommended way to get rid of them? >> >> Should I com

Issue sorting an NSTableView

2008-07-24 Thread Timothy Reaves
The documentation for NSTableView setSortDescriptors: starts off with "A table column is considered sortable if it has a sort descriptor that specifies the sorting ". I find this a bit puzzling as this is the documentation for NSTableView, not NSTableColumn. What is the correct formulat

NSUInteger question

2008-04-08 Thread Timothy Reaves
What advantage does NSUinteger have over uint32? I realize that on a 64 bit machine, it would be a uint64. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mode

Re: NSUInteger question

2008-04-08 Thread Timothy Reaves
On Apr 8, 2008, at 9:02 PM, Nick Zitzmann wrote: On Apr 8, 2008, at 6:30 PM, Timothy Reaves wrote: What advantage does NSUinteger have over uint32? I realize that on a 64 bit machine, it would be a uint64. None. It only declares the integer to be 32-bit on 32-bit builds, and 64-bit

Re: Threading - How its done?

2008-05-09 Thread Timothy Reaves
On Thu, May 8, 2008 02:45, Chris Hanson wrote: --snip-- > And unless the object's class documentation says instances > are safe to share across multiple threads, you'd be violating its API > contract by doing so. > Just a point of clarification here: this me violate it's design (intended usage pat

Re: OCUnit test failure - assert formatted text not presented

2009-01-22 Thread Timothy Reaves
On Jan 22, 2009, at 8:27 AM, jonat...@mugginsoft.com wrote: On 22 Jan 2009, at 14:14, Jeremy Pereira wrote: On 22 Jan 2009, at 13:27, jonat...@mugginsoft.com wrote: I do not seem to be seeing the formatted about of my OCUnit STxxx macros. My OCUnit test failures produce only the follow

Re: Log4Cocoa

2009-01-22 Thread Timothy Reaves
On Jan 21, 2009, at 4:56 PM, Barry Wark wrote: On Wed, Jan 21, 2009 at 1:15 PM, Kyle Sluder wrote: On Wed, Jan 21, 2009 at 2:58 PM, Robert Kukuchka wrote: I'm looking into logging frameworks and see references to this project. Does anyone know if this project is still running? I was

Re: Log4Cocoa

2009-01-23 Thread Timothy Reaves
On Jan 22, 2009, at 1:54 PM, Kyle Sluder wrote: On Thu, Jan 22, 2009 at 11:53 AM, Timothy Reaves wrote: There are a number of reasons to use Log4Cocoa over something like ASL. The fact that it already supports Obj-C is the least of them. * It supports various logging levels, As

Re: Log4Cocoa

2009-01-24 Thread Timothy Reaves
On Jan 23, 2009, at 3:33 PM, Joel Norvell wrote: This doesn't answer the original question, but I believe it is pertinent to this thread. It is also possible to log from within Xcode, something I hadn't realized until I saw the video of an excellent talk Joar Wingfors gave at a Silicon V

Re: Testing C functions using OCUnit

2009-02-15 Thread Timothy Reaves
On Feb 15, 2009, at 1:32 PM, Martin Redington wrote: In my projects, I tend to define methods which need access to member variables as class methods, and related functions, which do not need "direct" access to any internal object data, as C functions, like the simple example below. @implementa

Re: file fixtures for unit testing

2008-10-04 Thread Timothy Reaves
On Oct 4, 2008, at 1:01 AM, Brent Hargrave wrote: To unit test an XML parsing method, I would like keep a dummy XML file in a project directory and import it into my FooTests class as a fixture of sorts. What is the right way to do this sort of thing? Put the file into the Resources fold

NSMetadataQuery question

2008-10-19 Thread Timothy Reaves
I'm trying to write a query where the meta data in question is an NSDate stored as a binary plist. Everything I am doing is failing. I have tried '(myKey > %@, date] where date is an instance of NSDate, where it is a NSTimeInterval, and a string. Nothing returns data (or even calls my c

Re: Wow - what happened to IB

2008-12-11 Thread Timothy Reaves
On Dec 11, 2008, at 7:36 AM, Ian H Stewart wrote: OK so it has been a long long time since I did anything in IB. So I started an app like I did at NeXT - 70% of my app is GUI. I created a new project in xcode, I then got into IB and created my layout - buttons, text fields, etc. connected the