Re: Opening file with C++ iostream from application bundle

2009-04-19 Thread Carlos Eduardo Mello
Forgot...here is the file loading code bool ::LoadFromFile( string fileName, int which ) { ifstream fin; string temp, item; int itemCount, i; int lineCount = 0; fin.open( fileName.c_str() ); if(fin) { while( !fin.eof

Re: SQLite 3 crash report - debugging help needed

2009-04-19 Thread jmunson
How did you come by this crash log? From the 0x48, it looks like it's attempting to dereference an int passed into sqlite3VdbeExec where a pointer should go, but that's a wild guess. The crash log came from one of my testers. It's dying in sqlite3 code, so you have access to the source. Take

Re: Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results.

2009-04-19 Thread John Joyce
On Apr 19, 2009, at 3:42 PM, John Joyce wrote: Currently, I'm using CFStringTransform to convert Java-based strings files (JBoss .properties files) to something human-readable for verification. Works brilliantly. Luckily, these files are short and this function is super fast. This enables m

Re: Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results.

2009-04-19 Thread Adam R. Maxwell
On Apr 19, 2009, at 1:42 PM, John Joyce wrote: Currently, I'm using CFStringTransform to convert Java-based strings files (JBoss .properties files) to something human-readable for verification. Works brilliantly. Luckily, these files are short and this function is super fast. This enables m

Re: SQLite 3 crash report - debugging help needed

2009-04-19 Thread Jeremy W. Sherman
See TN2124: Mac OS X Debugging Magic ( http://developer.apple.com/technotes/tn2004/tn2124.html), specifically, the section titled "Architecture Considerations". You'll know what types to expect for each argument to the function by looking at the sqlite3 source code. —Jeremy On Sat, Apr 18, 2009 a

NSSavePanel and file formats

2009-04-19 Thread Quincey Morris
I notice that the current HIG recommends the use of a file format popup in the Save dialog, when an application supports multiple formats: http://developer.apple.com/documentation/UserExperience/Conceptual/AppleHIGuidelines/XHIGMenus/XHIGMenus.html#/ /apple_ref/doc/uid/TP3356-TPXREF105

Using CFStringTransform with Attributed strings or runs, maintaining the styling of the Attributes in transformed results.

2009-04-19 Thread John Joyce
Currently, I'm using CFStringTransform to convert Java-based strings files (JBoss .properties files) to something human-readable for verification. Works brilliantly. Luckily, these files are short and this function is super fast. This enables me to naively take all the text of a file provided

Select Object in NSDictionaryController

2009-04-19 Thread Gerriet M. Denkmann
I have a table with two columns, labeled "Key" and "Value" bound to myDictionaryController.key and myDictionaryController.value. Now I want to select a row programmatically (e.g. [ myDictionaryController selectRowWIthKey: @"someKey" ]; ). But such a method I cannot find. And trying to use t

Re: Keeping IB class instance and xCode instance the same

2009-04-19 Thread Graham Cox
On 18/04/2009, at 9:03 AM, James Maxwell wrote: I'm always anxious when I have to actually deal with IB... Sorry to say it, but it's true. It just makes very little sense to me... Anyway, I have a problem. I've got a class that's instantiated in IB, but I need to load it's state from a fil

Bindings Update with Drag-and-Drop

2009-04-19 Thread K. Darcy Otto
I have a number of NSTextFields that are happily bound to NSString objects in the controller, and they work very well: if the textfield is updated, the corresponding NSString object is updated, as vice- versa. Now, in order to implement drag-and-drop, I have had to subclass NSTextField and

Bindings Update with Drag-and-Drop [solved]

2009-04-19 Thread K . Darcy Otto
I've managed to solve this problem. For those who might be looking at this problem sometime in the future, note that in the code below, there would be no need for -willChangeValueForKey: and - didChangeValueForKey: in any case, since -setValue:forKey: does that work anyway – -willChangeValu

Safe Signal Handling from the Run Loop

2009-04-19 Thread Dave Keck
Hey list, Earlier today I spent awhile trying to re-find some sample code that I discovered awhile ago. I eventually found it, and thought I would mention it here in hopes that it'll help someone in the future. It allows you to handle signals safely within your app's runloop, rather than trying t

Keeping IB class instance and xCode instance the same

2009-04-19 Thread James Maxwell
I'm always anxious when I have to actually deal with IB... Sorry to say it, but it's true. It just makes very little sense to me... Anyway, I have a problem. I've got a class that's instantiated in IB, but I need to load it's state from a file. This file defines the class itself, so when I

Advanced Core Data and Inverse Relationships Question

2009-04-19 Thread Ulai Beekam
I have two entities Boss and Employee. Boss has the to-many relationship 'employees'. The inverse is, naturally, the to-one relationship 'boss'. My problem is this. I have a custom key that I implement for Boss. And while I am BETWEEN (i.e. the code between) willChangeValue:forKey: and didChan

Re: Core Data Fetches + Transient Properties + NSPredicateEditor = Sadness

2009-04-19 Thread Mike Abdullah
If it helps, the reason for Apple only supporting searching of persistent properties is for performance. If you're using the SQLite store for example, the predicate is not evaluated against the in- memory objects, but against the individual bits of data in the SQLite table. Of course, why Ap