Custom NSCell and Bindings

2011-06-24 Thread Carter R. Harrison
It's a pretty typical situation. I've got my model objects stored in an NSSet. An NSArrayController that is bound to the NSSet. And then an NSTableView with one NSTableColumn bound to the arrangedObjects.name property of the NSArrayController. It works great. Now I've introduced a custom NS

Re: NSManagedObjected isInserted

2011-04-10 Thread Carter R. Harrison
On Apr 10, 2011, at 1:29 PM, Quincey Morris wrote: > On Apr 10, 2011, at 06:52, Carter R. Harrison wrote: > >> Can anybody ever think of a scenario where [NSManagedObject isInserted] >> equals NO for an object that is initially fetched from the context? And no >>

NSManagedObjected isInserted

2011-04-10 Thread Carter R. Harrison
Can anybody ever think of a scenario where [NSManagedObject isInserted] equals NO for an object that is initially fetched from the context? And no the object has not been deleted from the context prior to calling isInserted. ___ Cocoa-dev mailing list

Re: Two Applications Sharing Same Core Data Database

2011-04-08 Thread Carter R. Harrison
On Apr 7, 2011, at 7:04 PM, Carter R. Harrison wrote: > > On Apr 7, 2011, at 6:38 PM, Nick Zitzmann wrote: > >> >> On Apr 7, 2011, at 4:24 PM, Carter R. Harrison wrote: >> >>> I really appreciate all of your help. I gave your suggestion a shot and >

Re: Two Applications Sharing Same Core Data Database

2011-04-07 Thread Carter R. Harrison
On Apr 7, 2011, at 6:38 PM, Nick Zitzmann wrote: > > On Apr 7, 2011, at 4:24 PM, Carter R. Harrison wrote: > >> I really appreciate all of your help. I gave your suggestion a shot and >> I've run into problems. Here's what happens. >> >> 1

Re: Two Applications Sharing Same Core Data Database

2011-04-07 Thread Carter R. Harrison
On Mar 30, 2011, at 4:09 PM, Nick Zitzmann wrote: > > On Mar 30, 2011, at 2:05 PM, Carter R. Harrison wrote: > >>>> 2. What is the best way to implement it? >>> >>> Put your CoreData code into a framework shared by your applications. And >&g

Dynamically Loading Code and Core Data Non-Standard Persistent Attributes

2011-04-05 Thread Carter R. Harrison
My Core Data application has a plugin architecture. Plugins reside within their own bundles and of course are loaded dynamically at runtime. I intend to encode instances of each plugin bundle's principal class just as Apple describes it in the section of the Core Data Programming Guide called

Re: Two Applications Sharing Same Core Data Database

2011-03-30 Thread Carter R. Harrison
On Mar 30, 2011, at 4:03 PM, Nick Zitzmann wrote: > > On Mar 30, 2011, at 1:45 PM, Carter R. Harrison wrote: > >> I'm working on a Mac Application that will have a helper application that is >> always running in the background (even if the main application is

Two Applications Sharing Same Core Data Database

2011-03-30 Thread Carter R. Harrison
I'm working on a Mac Application that will have a helper application that is always running in the background (even if the main application is not currently running). Currently the main application uses Core Data to manage persistent objects. I'd like to setup the helper application to be able

Re: Drag & Drop in an NSOutlineView

2011-03-14 Thread Carter R. Harrison
rking! Thanks! On Mar 14, 2011, at 3:33 PM, Quincey Morris wrote: > On Mar 14, 2011, at 12:20, Carter R. Harrison wrote: > >> I'm having trouble getting drag and drop to work with an NSOutlineView. >> What I've done is below. The problem is that >> "

Re: Drag & Drop in an NSOutlineView

2011-03-14 Thread Carter R. Harrison
2011, at 3:25 PM, Corbin Dunn wrote: > Your custom cell needs to properly implement: > > - (NSUInteger)hitTestForEvent:(NSEvent *)event inRect:(NSRect)cellFrame > ofView:(NSView *)controlView NS_AVAILABLE_MAC(10_5); > > See the header for details or the AnimatedTableView demo. >

Drag & Drop in an NSOutlineView

2011-03-14 Thread Carter R. Harrison
I'm having trouble getting drag and drop to work with an NSOutlineView. What I've done is below. The problem is that "tableView:writeRowsWithIndexes:toPasteboard" never gets called. I found a few people with the same issue and it seems that the cause of the problem is that I am using a custo

Handling Connection Timeouts with NSStream

2010-09-10 Thread Carter R. Harrison
Hey Folks, I'm working on a app that establishes a network connection using NSStream. I found though that the code does not behave very well when it is trying to connect to an unreachable IP address or an IP address that just isn't accepting connections on the port I have specified. The code

Main Thread Crashing in Multithreaded App

2010-08-06 Thread Carter R. Harrison
My Cocoa application's main thread is crashing with EXC_BAD_ACCESS when it becomes multithreaded. The crash always occurs in the main thread when the call stack is: 0 objc_msgSend 1 __CFArrayReleaseValues 2 _CFRelease 3 _CFAutoReleasePoolPop 4 -[NSAutoReleasePool d

Re: Socket Blocking Question

2010-01-20 Thread Carter R. Harrison
On Jan 20, 2010, at 2:23 PM, Ken Thomases wrote: > On Jan 20, 2010, at 11:39 AM, Carter R. Harrison wrote: > >> I need some folks experienced with cocoa and socket programming to weigh in >> for me on some design problems I've been having. I'm designing an &

Re: Socket Blocking Question

2010-01-20 Thread Carter R. Harrison
thing else will work with this system. > (Mike Ash explains pretty well on this blog why trying to support those > things can lead to some unfixable trickiness, which I just wanted to avoid > altogether.) > > If you can't support 10.6, then, this won't work. But hopefully you c

Re: Bindings Problem

2010-01-20 Thread Carter R. Harrison
On Jan 18, 2010, at 4:55 PM, Ken Thomases wrote: > On Jan 18, 2010, at 11:01 AM, Jeffrey Oleander wrote: > >> http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Collections/Articles/Sets.html >> >> "Set Fundamentals: Note that if mutable objects are stored in a set, either >

Socket Blocking Question

2010-01-20 Thread Carter R. Harrison
I need some folks experienced with cocoa and socket programming to weigh in for me on some design problems I've been having. I'm designing an application that acts as a client in a client-server model. The client communicates with the server over the network by issuing a request and then recei

Bindings Problem

2010-01-14 Thread Carter R. Harrison
I'm sure what I'm trying to do is not that difficult but I've been pulling my hair out for a while now on this problem. I have an application whose model could be updated without the user directly doing anything. So bindings seems like the perfect fit b/c the interface will reflect these sorts

NSRuleEditor rows binding

2009-12-04 Thread Carter R. Harrison
Apple's documentation for NSRuleEditor indicates that it exposes a binding named "rows". When I drag an NSRuleEditor onto my NSWindow in IB, I flip over to the Bindings tab of the inspector and I don't see any bindings named "rows". Anybody else manage to setup an NSRuleEditor with bindings?

Re: Question Regarding the Memory Address of Objects

2008-12-18 Thread Carter R. Harrison
On Dec 18, 2008, at 3:44 PM, David Duncan wrote: On Dec 18, 2008, at 11:57 AM, Carter R. Harrison wrote: [dict setValue:@"button1" forKey:[NSString stringWithFormat:@"%x", &button1]]; // "button1" is one of my IBOutlets. NSString *value = [dict valueF

Question Regarding the Memory Address of Objects

2008-12-18 Thread Carter R. Harrison
Ok, hopefully this is an easy one. I have a Nib file setup with an NSView and some NSButton's as subviews of that view. I have IBOutlets for each of the NSButton's in my NSView subclass. In the awakeFromNib: method of my NSView subclass I do the following: - (void)awakeFromNib {

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Carter R. Harrison
On Jul 28, 2008, at 3:24 PM, David Wilson wrote: On Mon, Jul 28, 2008 at 2:13 PM, Carter R. Harrison <[EMAIL PROTECTED]> wrote: Hey Everybody, If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? Right no

Re: Storing values in dictionary with their address as the key

2008-07-28 Thread Carter R. Harrison
On Jul 28, 2008, at 3:24 PM, David Wilson wrote: On Mon, Jul 28, 2008 at 2:13 PM, Carter R. Harrison <[EMAIL PROTECTED]> wrote: Hey Everybody, If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? Right no

Re: Event-Driven XML Parsing and Entity References

2008-07-28 Thread Carter R. Harrison
On Jul 27, 2008, at 5:13 PM, Nathan Kinsinger wrote: On Jul 27, 2008, at 12:52 PM, Carter R. Harrison wrote: There's been some discussion on this topic previously, but I haven't been able to find the solution that I'm looking for. I'm using the event-driven XML

Storing values in dictionary with their address as the key

2008-07-28 Thread Carter R. Harrison
Hey Everybody, If I wanted to store an object in a dictionary and set its key as the object's memory address - how would I go about doing this? Right now I'm doing this: int i; for (i = 0 ; i < 10 ; i++) { NSObject *myObject = [[NSObject alloc] init]; [dictionary setValue:myObject forKey:[N

Event-Driven XML Parsing and Entity References

2008-07-27 Thread Carter R. Harrison
There's been some discussion on this topic previously, but I haven't been able to find the solution that I'm looking for. I'm using the event-driven XML parser (CFXMLParser). Apparently it does not support the replacement of entity references (&, <, >, etc..). So assume I'm trying to parse

Compiler doesn't see instance variable

2008-07-27 Thread Carter R. Harrison
I'm having an interesting problem today. I'm working with the event- driven XML parser in Core Foundation. For those of you who aren't familiar with that parser, you have to implement at least 3 callback methods: void *createStructure(CFXMLParserRef parser, CFXMLNodeRef node, void *info)

#define and #ifdef statements for different build configs

2008-07-11 Thread Carter R. Harrison
I have an app that uses different frameworks and method calls based upon the currently selected build configuration. How can I easily setup an #ifdef statement that will only execute if I've chosen the "Release" build configuraiton? Thanks in advance. ___

Re: Weird Problem With CGImage

2008-04-25 Thread Carter R. Harrison
On Apr 25, 2008, at 12:12 PM, David Duncan wrote: On Apr 25, 2008, at 7:51 AM, Carter R. Harrison wrote: This bug in my code has been driving me nuts for days, but I have finally isolated the issue - only problem now is I don't understand what I'm doing wrong. I have a CGIm

Weird Problem With CGImage

2008-04-25 Thread Carter R. Harrison
This bug in my code has been driving me nuts for days, but I have finally isolated the issue - only problem now is I don't understand what I'm doing wrong. I have a CGImage that I want to get the raw data bytes for. My code is below: CGImageRef sectionToCache = CGImageCreateWithImageInRe

Re: Bitmap data from CGImageRef

2008-04-18 Thread Carter R. Harrison
Surprisingly, if you go to Xcode Documentation you can find the method that Adam first mentioned, but it is not on the ADC website. Thanks Scott. On Apr 18, 2008, at 3:05 PM, Scott Thompson wrote: On Apr 18, 2008, at 1:54 PM, Carter R. Harrison wrote: Thanks Adam.. For some reason I

Re: Bitmap data from CGImageRef

2008-04-18 Thread Carter R. Harrison
. On Apr 18, 2008, at 2:49 PM, Adam R. Maxwell wrote: On Friday, April 18, 2008, at 11:40AM, "Adam R. Maxwell" <[EMAIL PROTECTED] > wrote: On Friday, April 18, 2008, at 11:32AM, "Carter R. Harrison" <[EMAIL PROTECTED] > wrote: Hey everybody, Is it possible to

Bitmap data from CGImageRef

2008-04-18 Thread Carter R. Harrison
Hey everybody, Is it possible to obtain the raw bitmap data from a CGImageRef? Thanks. Regards, Carter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

CGBitmapRef and User Space Coordinates

2008-04-15 Thread Carter R. Harrison
Hi All, I have a CGBitmapRef that I am using as a backing store for my NSView subclass. The CGBitmapRef has the same dimensions as my NSView. Each time I draw to the backing store, I call my view's setNeedsDisplayInRect: method to invalidate the area in which I have drawn. Is it necess

Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-14 Thread Carter R. Harrison
f drawRect: (at which point I could initialize a CGContextRef instance variable)? Thanks for your help! Regards, Carter On Apr 14, 2008, at 3:30 PM, David Duncan wrote: On Apr 14, 2008, at 11:56 AM, Carter R. Harrison wrote: cgback is a CGLayerRef instance variable that I setup when the view

Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-14 Thread Carter R. Harrison
with CFRetain(), but I do need to release cgback in my dealloc() method - which I'm doing. On Apr 14, 2008, at 12:02 PM, Nathan Vander Wilt wrote: On Apr 13, 2008, at 7:15 AM, Carter R. Harrison wrote: CGContextRef context = [[NSGraphicsContext currentContext] graphicsPort]; CGContextDrawL

NSCompositeSourceOver equivalent in Quartz 2D?

2008-04-13 Thread Carter R. Harrison
I'm trying to do some drawing in Quartz 2D. I'm trying to set the blending mode of my CGContextRef to the equivalent of NSCompositeSourceOver from NSGraphicsContext. It doesn't look like there is such a blending mode for a CGContext. Am I mistaken in this, or is there another way of acco

Re: Re: EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-13 Thread Carter R. Harrison
On Apr 13, 2008, at 07:15, Carter R. Harrison wrote: CGContextDrawLayerInRect(context, CGRectMake([self frame].origin.x, [self frame].origin.y, [self frame].size.width, [self frame].size.height), cgback); Are you sure you don't mean [self bounds]? The extent of a view in its dr

EXC_BAD_ACCESS when calling CGContextDrawLayerInRect

2008-04-13 Thread Carter R. Harrison
Hi Everybody, I'm delving into Quartz 2D programming for the first time so this is probably a newb issue, but either way I'm stumped. I have a controller that is calling several custom drawing methods in my custom view. The drawing methods call Quartz and tell it to draw various things