NSRuleEditor as a data structure editor

2009-07-26 Thread Paul Thomas
I may have bitten off more than I can chew, but I'm trying to use NSRuleEditor as a component to define and edit a Foundation data structure (general purpose tree of NSArray, NSDictionary, NSNumber etc.). This might be re-purposing the class a little and it certainly has little to do with p

Re: ObjC data structure for C++/ObjC++ objects?

2008-11-08 Thread Paul Thomas
On 8 Nov 2008, at 05:12, Jonathan Bailey wrote: Hi Michael - Thanks much for your response. I actually did originally intend to use an STL map, but I couldn't get it to work. It seemed that when I added a C++ object to a map declared as an instance variable within my ObjC++ class's header file

Re: file references in CoreData

2008-10-29 Thread Paul Thomas
I'm currently working on a system that uses NDAlias (http://codebeach.org/code/show/34 ) in a CoreData store. It works pretty well in that the user can move the files around when the app isn't running and (so long as they stay on the same volume) it'll find them again when it wakes up. I'm u

Using NSDocument with NSViewControllers

2008-10-23 Thread Paul Thomas
Before I set off down the road to frustrating deadendsville, has anyone any experience with trying to coerce AppKit's document architecture into a single window interface - i.e. using tabviews in stead of separate windows? A sneaky look at a couple of apps shows that people have usually r

Searching a CoreData bound NSArrayController

2008-10-11 Thread Paul Thomas
Hi All, I need a little advice on the "right way" to do something: I have an array controller bound to a core data store and the objects are presented in a table view. When it comes to inserting, I need to check that one of the properties specified by the user is unique before doing anyth

Re: File's Owner

2008-05-25 Thread Paul Thomas
On 25 May 2008, at 08:15, Johnny Lundy wrote: Well, tell that to the guy who wrote the Currency Converter Using Bindings tutorial. See the last sentence here: [...] And you wonder why I am still confused. That paragraph from Apple directly contradicts what you just said. The Converter o

Re: Using OSMemoryBarrier() with KVO

2008-04-23 Thread Paul Thomas
On 23 Apr 2008, at 03:41, Ken Thomases wrote: On Apr 22, 2008, at 6:37 AM, Paul Thomas wrote: Is this enough? Or will I need to use a full blown lock? What is it that you fear going wrong, such that you think even OSMemoryBarrier is necessary? I think the barrier is needed to ensure

Using OSMemoryBarrier() with KVO

2008-04-22 Thread Paul Thomas
Hi, I'm trying to implement a basic promise variable and I'm not sure if OSMemoryBarrier() is enough to make it correct. If anyone is familiar with the memory model, I'd appreciate a quick look-over. It's basically like this: { BOOL done; id result; NSError* error; NSExcept

Re: More fun with C++

2008-04-03 Thread Paul Thomas
On 3 Apr 2008, at 13:48, Brad Peterson wrote: Hi, Seems like I'm once again behind the "mixing Obj-C with C++" 8-ball. :( This time, I'm getting compile errors in the .h file of my C++ class. Specifically, just this much code: using namespace std; class CXLSWriter { Generates 3 errors,

NSTableView double click binding and clickedRow

2008-03-18 Thread Paul Thomas
I have an NSTableView (multiple selection, not editable) and I want to do something with the elements of the displayed list when the user double clicks. Even though the table has multiple selection, I only want to action the single element that the user double-clicked. If I set up a target/

Re: Best Way To Lookup From a Huge Table

2008-03-16 Thread Paul Thomas
On 15 Mar 2008, at 02:35, Scott Ribe wrote: Of course, for me, the "simplest" way would probably be std::map< int, string >, but that's just my personal taste. Just out of interest (this is a common problem) - how would you initialise a std::map with 41000 entries? pt. ___