Re: Cocoa Newbie Thread/Memory Problems

2010-03-17 Thread Bill Hernandez
On Mar 16, 2010, at 4:38 PM, Dave wrote: > - (NSString*)makeURLString:(NString*) theBaseURL ForDate:(NSDate*)theDate > UsingDatabse:(NString*) theDatabaseType Dave, Does it matter that UsingDatabse is misspelled ? Good Luck, Bill Hernandez Plano, Texas___

Directory to save file in NSSavePanel

2010-03-17 Thread Nikhil Khandelwal
Hi, I am using NSSavePanel in my application. I am using "runModal" on this to show the save panel. The default location it shows to save the file is "Desktop" which I want to change to "Document". I tried "runModalForDirectory" as well however it uses the given file path as save location alway

Invalidated object on close of managed document

2010-03-17 Thread Gideon King
I open a file, then immediately close it. I get this error message saying that one of the objects has been invalidated, but I have no idea what is invalidating the object. How do I debug this? The NSManagedObject with ID:0x11a415320 has been invalidated. 0 CoreFoundation

Properly using setNeedDisplayInRect

2010-03-17 Thread Gustavo Pizano
Hello all normally I just redraw the whole view by sending the setNeedDisplay method, but in the case Im right now, I have placed Tracking areas, and when the mouse enter the TA Im coloring a bezier path corresponding the TA area (kinda of rollovers, but just for a few specific places that I

set file name in NSSavePanel

2010-03-17 Thread Nikhil Khandelwal
Hi, Is there any way to to set the file name in NSSavePanel for 10.5. I tried "setNameFieldStringValue" but this is available for 10.6 or later. Is there any similar method available for 10.5. Thanks, Nikhil DISCLAIMER == This e-mail may contain privileged and confidential information w

Re: first time launch message

2010-03-17 Thread Rick C.
thank you for the replies. no sub-processes but i can use the info you have provided to do some troubleshooting. thank you very much and i'll let you know, rick From: Jens Alfke To: Rick C. Cc: cocoa dev Sent: Tue, March 16, 2010 11:37:08 PM Subject: R

Re: set file name in NSSavePanel

2010-03-17 Thread Klaus Backert
On 17 Mar 2010, at 10:49, Nikhil Khandelwal wrote: Is there any way to to set the file name in NSSavePanel for 10.5. I tried "setNameFieldStringValue" but this is available for 10.6 or later. Is there any similar method available for 10.5. According to the documentation of NSSavePanel the m

Re: One NSTextView, several model objects - how to synchronise undo manager

2010-03-17 Thread Keary Suska
On Mar 16, 2010, at 6:09 PM, Rui Pacheco wrote: > I've a window with a fairly complex layout - one NSTextView and several > tables, all displaying different types of data. To keep things in order, > I've created a model object that holds the data for all these interface > elements. The window may

Case sensitive fileName

2010-03-17 Thread gMail.com
Hi, I have a file path /Folder/filename.txt The API fileExistsAtPath says that it exists. Now I need to get its real case sensitive file name, which is indeed e.g. "FileName.txt" How can I get it in a fast way? I thought by its inode, but I can't really know how to do that. I know I can ite

Re: One NSTextView, several model objects - how to synchronise undo manager

2010-03-17 Thread Rui Pacheco
Is there a way to bind the text view's undo manager to an instance of NSUndoManager on my model object? I can get to the text view undo manager but I don't seem to be able to set it. On 17 March 2010 13:34, Keary Suska wrote: > On Mar 16, 2010, at 6:09 PM, Rui Pacheco wrote: > > > I've a window

Re: One NSTextView, several model objects - how to synchronise undo manager

2010-03-17 Thread Keith Blount
I might be missing something, but can you not just use the NSTextView delegate message, -undoManagerForTextView:? This is what I do in my app. I have a single text view that can have various text storage objects swapped into it, and I have each of those text storages associated with a different

Re: Anyone using IKImageView?

2010-03-17 Thread Sandy McGuffog
I speak from memory here, but my recollection is that IKImageView does not like going in a scrollview; you put an NSScroller next to it, and hook that to one of the IKImageView's scroller outlets. Or something like that - there is a Apple demo app that shows this. Sandy On Mar 16, 2010, at 11

Re: Anyone using IKImageView?

2010-03-17 Thread Brian Postow
On Mar 17, 2010, at 10:42 AM, Sandy McGuffog wrote: > I speak from memory here, but my recollection is that IKImageView does not > like going in a scrollview; you put an NSScroller next to it, and hook that > to one of the IKImageView's scroller outlets. Or something like that - there > is a A

Re: Anyone using IKImageView?

2010-03-17 Thread Sandy McGuffog
ImageBrowser, I think. Sandy On Mar 17, 2010, at 5:22 PM, Brian Postow wrote: > > On Mar 17, 2010, at 10:42 AM, Sandy McGuffog wrote: > >> I speak from memory here, but my recollection is that IKImageView does not >> like going in a scrollview; you put an NSScroller next to it, and hook that

Re: Case sensitive fileName

2010-03-17 Thread gMail.com
Thanks, that's fine for 10.6, but I have to compile against 10.5... I guess there should be a quick way with some C command, or Unix command or even with the Carbon APIs, like PBGetCatInfo using the ioFRefNum... Any idea? Regards -- Leonardo > Da: Jeremy Pereira > Data: Wed, 17 Mar 2010 14:41:05

Re: Anyone using IKImageView?

2010-03-17 Thread Brian Postow
On Mar 17, 2010, at 11:47 AM, Sandy McGuffog wrote: > ImageBrowser, I think. > > Sandy That's an ikimagebrowserview, not an ikimageview. I don't see a _verticalscrollbar in the outlets in IKImageView... > > On Mar 17, 2010, at 5:22 PM, Brian Postow wrote: > >> >> On Mar 17, 2010, at 10:42

Re: Properly using setNeedDisplayInRect

2010-03-17 Thread Jens Alfke
On Mar 17, 2010, at 1:50 AM, Gustavo Pizano wrote: > I was thinking in passing to the setNeeddipslayInRect method the TA rect, but > its not clear for me how to just draw the bTa background, becuase in the > drawRect Method Im just checking if Im in a TA and then filling the path I > created

Re: Case sensitive fileName

2010-03-17 Thread Jens Alfke
On Mar 17, 2010, at 6:35 AM, gMail.com wrote: > Now I need to get its real case sensitive file name, which is indeed e.g. > "FileName.txt" > How can I get it in a fast way? I thought by its inode, but I can't really > know how to do that. Have you tried -[NSString stringByStandardizingPath], o

Re: Case sensitive fileName

2010-03-17 Thread Don Quixote de la Mancha
Does readdir work on Mac OS X? I don't have a Mac handy right now to check, but it should work because so many *NIX programs build on OS X right out of the box. More or less what you do is call opendir on a directory, then rewinddir to set your iterator to the beginning of the directory, then rep

Re: Case sensitive fileName

2010-03-17 Thread Michael Davey
I don't think that the OP wanted to iterate through the entire directory though... On 17 Mar 2010, at 16:15, Don Quixote de la Mancha wrote: > Does readdir work on Mac OS X? I don't have a Mac handy right now to > check, but it should work because so many *NIX programs build on OS X > right out

Re: Case sensitive fileName

2010-03-17 Thread Don Quixote de la Mancha
> I don't think that the OP wanted to iterate through the entire directory > though... Maybe so, but I don't think there would be any real disadvantage to doing so. I'm pretty sure that just about any API that can retrieve a filename from a directory will iterate through the whole directory anyw

Re: Properly using setNeedDisplayInRect

2010-03-17 Thread Matt Neuburg
On Wed, 17 Mar 2010 09:50:17 +0100, Gustavo Pizano said: > I check the Apple docs, and in the advance drawing techniques it says, like > Draw Minimally, and they suggest using that method also... so how to make sure > Im just drawing the backgrounds of the active TA and not redrawing the whole >

Re: Directory to save file in NSSavePanel

2010-03-17 Thread Matt Neuburg
On Wed, 17 Mar 2010 13:40:35 +0530, Nikhil Khandelwal said: > I am using NSSavePanel in my application. I am using "runModal" on this to > show the save panel. The default location it shows to save the file is > "Desktop" which I want to change to "Document". I tried "runModalForDirectory" > as w

Re: Case sensitive fileName

2010-03-17 Thread Kevin Wojniak
These two methods worked for me: NSString *path = @"/FOLDER/FILENAME.txt"; NSLog(@"displayNameAtPath: %@", [[NSFileManager defaultManager] displayNameAtPath:path]); FSRef ref; HFSUniStr255 name255; if (!FSPathMakeRef((const UInt8 *)[path fileSystemRepresentation], &ref, NULL) && !FSGet

Cocoa sometimes raises "minor" exceptions without logging them

2010-03-17 Thread Jerry Krinock
Near the end of -applicationDidFinishLaunching, I bind to a user default, like this: [doxtusMenu bind:@"showStatusMenu" toObject:[NSUserDefaults standardUserDefaults] withKeyPath:constKeyShowStatusMenu options:0] ; This code works perfectly. However, when I'd run this app

Re: Directory to save file in NSSavePanel

2010-03-17 Thread Corbin Dunn
On Mar 17, 2010, at 9:39 AM, Matt Neuburg wrote: > On Wed, 17 Mar 2010 13:40:35 +0530, Nikhil Khandelwal > said: > >> I am using NSSavePanel in my application. I am using "runModal" on this to >> show the save panel. The default location it shows to save the file is >> "Desktop" which I want to

Re: Case sensitive fileName

2010-03-17 Thread Aaron Burghardt
Jens gets the prize: $ cat realpath_test.c #include #include #include int main(int argc, char *argv[]) { char resolved_name[PATH_MAX]; realpath(argv[1], resolved_name); printf("%s\n", resolved_name); } $ gcc realpath_test.c -o realpath_test $ ./realpath_test REALP

Re: Case sensitive fileName

2010-03-17 Thread Jens Alfke
On Mar 17, 2010, at 9:28 AM, Don Quixote de la Mancha wrote: I don't think that the OP wanted to iterate through the entire directory though... Maybe so, but I don't think there would be any real disadvantage to doing so. Performance. I'm pretty sure that just about any API that can ret

Re: Blocked Reads

2010-03-17 Thread Greg Guerin
colors wrote: I am running into a problem with anti-virus software. I need to be able to read a file from a USB CD and I need the read to actually go over the USB bus. Why do you need the read to go over the USB bus? If the OS itself has cached some disk data, why force it to be transf

Re: Cocoa sometimes raises "minor" exceptions without logging them

2010-03-17 Thread Steven Degutis
I usually add a breakpoint on objc_exception_throw. Not sure how much of a difference it makes... but yeah, I agree. -Steven On Wed, Mar 17, 2010 at 12:55 PM, Jerry Krinock wrote: > > Apparently, Cocoa sometimes raises "minor" exceptions without logging them, > so it's good idea to set a breakp

Re: Case sensitive fileName

2010-03-17 Thread Andreas Mayer
Am 17.03.2010 um 17:46 Uhr schrieb Kevin Wojniak: NSLog(@"displayNameAtPath: %@", [[NSFileManager defaultManager] displayNameAtPath:path]); Note that -displayNameAtPath: will give you the localized name if one should exist. (For example you'll get 'Programme' for the 'Applications' folde

Re: Cocoa sometimes raises "minor" exceptions without logging them

2010-03-17 Thread Matt Neuburg
On Wed, 17 Mar 2010 09:55:01 -0700, Jerry Krinock said: >... And I supposed it could be argued that nothing was wrong, since constKeyShowStatusMenu is a Boolean property, nil = NO There is no such thing as a "Boolean property" in the user defaults. The only things that can go into the user defaul

Re: Cocoa Newbie Thread/Memory Problems

2010-03-17 Thread Dave
Hi Quincy, Sorry for the typeos and lack of clarity in my last message and thanks a lot for your help. I was really tired when I sent the message last night, I should have waited until today to send it. Basically what I was trying to get at is that I have a handler that gets called after

Re: Case sensitive fileName

2010-03-17 Thread Don Quixote de la Mancha
On Wed, Mar 17, 2010 at 10:23 AM, Jens Alfke wrote: >>  I'm pretty sure that just about any API that can retrieve a >> filename from a directory will iterate through the whole directory >> anyway. > > No; retrieving a file by name is just a B+tree lookup in HFS. Walking > through the directory is

Re: Clicking on an NSColorWell

2010-03-17 Thread Jonathon Kuo
That's an awesome app. I've been looking at it, but it's a bit convoluted. I can't quite seem to isolate the basic mechanism at play here. It uses a NSTableView populated with a custom subclass of NSTextFieldCell that supports an image? I'm just looking to have a column of color swatches I can b

CoreData database sharing and migration

2010-03-17 Thread Tobias Jordan
Hi Folks, I am wondering whether it is possible to create a database in core data that can be opened by more than one application at the same time. It is currently impossible to handle one SQLite database with two instances of the same app. The problem is if user1 quits the app, the data

Threads Question

2010-03-17 Thread Philippe Sismondi
I am hoping to add some functionality to an existing open source app (Skim) that uses threads for fairly simple purposes. (I believe Grand Central Dispatch etc. are not an option - I don't know whether this would be useful anyway as I have not learned about GCD.) I have read the Threading Progr

Re: Case sensitive fileName

2010-03-17 Thread Jeremy Pereira
On 17 Mar 2010, at 13:35, gMail.com wrote: > Hi, I have a file path > /Folder/filename.txt > The API fileExistsAtPath says that it exists. > Now I need to get its real case sensitive file name, which is indeed e.g. > "FileName.txt" > How can I get it in a fast way? I thought by its inode, but I

Re: Case sensitive fileName

2010-03-17 Thread Jeremy Pereira
On 17 Mar 2010, at 16:07, Jens Alfke wrote: > > On Mar 17, 2010, at 6:35 AM, gMail.com wrote: > >> Now I need to get its real case sensitive file name, which is indeed e.g. >> "FileName.txt" >> How can I get it in a fast way? I thought by its inode, but I can't really >> know how to do that. >

Programmatically binding Core Data to dynamic NSTableColumns

2010-03-17 Thread Michael LaMorte
I have a Core Data application with two entities: Item and Entries. Item has a dataType string variable. Item has a to-many inverse relationship to Entries. Entries has two variables: stringData and numberData. I'm programmatically creating an NSTableColumn for each Item. The cell type of the c

Re: Programmatically binding Core Data to dynamic NSTableColumns

2010-03-17 Thread Bill Hernandez
On Mar 17, 2010, at 12:59 PM, Michael LaMorte wrote: > I have a Core Data application with two entities: Item and Entries. Item has > a dataType string variable. Item has a to-many inverse relationship to > Entries. Entries has two variables: stringData and numberData. > > I'm programmatically

Re: Threads Question

2010-03-17 Thread Sherm Pendley
On Wed, Mar 17, 2010 at 10:36 AM, Philippe Sismondi wrote: > So, I want to launch the secondary task in a separate thread to keep the main > runloop responsive. NSTask only blocks the runloop if you call -waitUntilExit. So - don't do that. :-) sherm-- -- Cocoa programming in Perl: http://www

Re: Threads Question

2010-03-17 Thread Dave DeLong
And it also happens to have a very convenient -terminate method. :) Dave On Mar 17, 2010, at 1:21 PM, Sherm Pendley wrote: > On Wed, Mar 17, 2010 at 10:36 AM, Philippe Sismondi > wrote: > >> So, I want to launch the secondary task in a separate thread to keep the >> main runloop responsive.

Re: Case sensitive fileName

2010-03-17 Thread gMail.com
Thank you! I have used realpath, and it worked as like a charm! Here's my code. One question only: is the NSUTF8StringEncoding correct? - (NSString*)CaseSensitiveFilePath:(NSString*)filePath { const char*cFilePath = [mManager fileSystemRepresentationWithPath

Re: Programmatically binding Core Data to dynamic NSTableColumns

2010-03-17 Thread Bill Hernandez
On Mar 17, 2010, at 2:17 PM, Bill Hernandez wrote: >> (It's in an if statement, so it binds to either numberData or stringData as >> appropriate.) > Michael, Sorry I missed the part about the if statement... I am running into a similar problem, the log shows the data (array of dictionaries)

Re: Case sensitive fileName

2010-03-17 Thread Aaron Burghardt
On Mar 17, 2010, at 3:24 PM, gMail.com wrote: > Thank you! I have used realpath, and it worked as like a charm! > Here's my code. One question only: is the NSUTF8StringEncoding correct? > > - (NSString*)CaseSensitiveFilePath:(NSString*)filePath > { >const char*cFilePath = [mManager >

Re: Cocoa Newbie Thread/Memory Problems

2010-03-17 Thread Dave
I found the problem and it works! I had an extra: self.mXMLSourceData = nil; statement! I am now wondering if all my alloc/release calls are ok! Thanks again, All the Best Dave ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do no

Re: Programmatically binding Core Data to dynamic NSTableColumns

2010-03-17 Thread Quincey Morris
On Mar 17, 2010, at 10:59, Michael LaMorte wrote: > I have a Core Data application with two entities: Item and Entries. Item has > a dataType string variable. Item has a to-many inverse relationship to > Entries. Entries has two variables: stringData and numberData. > > I'm programmatically cre

NSUndoManager _NSundoInvocation Over-Release

2010-03-17 Thread Keary Suska
I am getting an over-release of the NSUndoManager private ivar _NSundoInvocation, inside removeAllActionsWithTarget:. Does anyone know what I could be doing in my code that would cause this, or is this possibly a known bug? TIA, Keary Suska Esoteritech, Inc. "Demystifying technology for your h

Re: Core Animation and interaction

2010-03-17 Thread john fogg
> There's a CoreAnimation sample project that does just this, called LightBoard. > --Kyle Sluder Thank you and thanks everyone else. I didn't find the LightBoard sample but I found GeekGameBoard which helped me a lot. John. ___ Cocoa-dev mailing list (

Re: NSManagedObject awakeFromFetch not sent on secondary thread?

2010-03-17 Thread Ben Trumbull
> However I still don't understand why awakeFromFetch is not sent in secondary > thread - I can't find any clue in documentation? Is this a bug or is it a > feature? I'm running on 10.6.2. Did you try setting the NSFetchRequest option -setReturnsObjectsAsFaults:NO ? The default setting will atte

RESOLVED: Blocked Reads

2010-03-17 Thread r c
Thank you all for your ideas. With various suggestions, I found a variation of the CDRomSample code that seems to work well. The sample does reads on the BSN Name of the device root (i.e. /dev/rdisk#). I have found that if I dig a little deeper into the IORegistry for the device (i.e. /dev/rdis

setStringValue problems with dynamically loaded views.

2010-03-17 Thread Kevin Brock
I have some framework code which dynamically loads some views from it's bundle, based on parameters that are known at runtime. Calls to setStringValue appear to be having no effect for any of my NSTextFields, either labels or editable. Here's code that loads a custom view containing a text fiel

re: CoreData database sharing and migration

2010-03-17 Thread Ben Trumbull
> I am wondering whether it is possible to create a database in core > data that can be opened by more than one application at the same time. > It is currently impossible to handle one SQLite database with two > instances of the same app. The problem is if user1 quits the app, the > data is

Re: setStringValue problems with dynamically loaded views.

2010-03-17 Thread Kyle Sluder
On Wed, Mar 17, 2010 at 2:16 PM, Kevin Brock wrote: > - (id)initWithText:(NSString*)field_contents > { >        NSBundle* mybundle = [NSBundle > bundleWithPath:@"/Library/Frameworks/MyFramework.framework"]; You shouldn't hardcode bundle paths like this. You could use +[NSBundle bundleWithIdentif

Re: CoreData database sharing and migration

2010-03-17 Thread Tobias Jordan
Hello Ben, Thanks a lot for responding! My problem is as follows: The database which is currently a non-document based core data SQLite one is normally stored in the local User Library of the user. (/Users/user/ Library/Application Support/MyApp/database.db But there are cases in which two

Class instance defaults: e.g. NSBrowser

2010-03-17 Thread Andrew James
I am a relative newbie to Cocoa so I trying to make sure that my code reflects Cocoa's coding culture. I'm interested in whether or not instances of Cocoa classes can be expected to display default behavior.  I'll use NSBrowser's - (BOOL)sendsActionOnArrowKeys as an example. In Apple's document

Re: CoreData database sharing and migration

2010-03-17 Thread Ben Trumbull
On Mar 17, 2010, at 2:59 PM, Tobias Jordan wrote: > Hello Ben, > > Thanks a lot for responding! My problem is as follows: The database which is > currently a non-document based core data SQLite one is normally stored in the > local User Library of the user. (/Users/user/Library/Application >

Float constants

2010-03-17 Thread Michael Vannorsdel
I've been working on some 64bit code cleaning but need some advice on float constants. Currently on 32bit builds I use -fsingle-precision-constant since most of my code uses CGFloats and I'd like the constants to be the correct precision. But in some places I do work with doubles and would lik

Re: setStringValue problems with dynamically loaded views.

2010-03-17 Thread Kevin Brock
On Mar 17, 2010, at 2:42 PM, Kyle Sluder wrote: > -initWithNibName:bundle: doesn't actually load the nib, so at this > point textField hasn't been hooked up to anything yet. If you set a > breakpoint on this line you'll find that textField == nil. You will > need to move this logic elsewhere. > >

Re: Float constants

2010-03-17 Thread Sean McBride
On Wed, 17 Mar 2010 16:14:38 -0600, Michael Vannorsdel said: >I've been working on some 64bit code cleaning but need some advice on >float constants. Currently on 32bit builds I use -fsingle-precision- >constant since most of my code uses CGFloats and I'd like the constants >to be the correct pre

Re: CoreData database sharing and migration

2010-03-17 Thread Tobias Jordan
Hi Ben, Thanks so much for this brilliant suggestion, I haven't thought about something like this before but it's actually really fantastic. About the second question -- do you know how to solve the migration with more than two data models? - Tobias On Mar 17, 2010, at 11:13 PM, Ben Trumbu

re: CoreData database sharing and migration

2010-03-17 Thread Steve Steinitz
Hello On 17/3/10, cocoa-dev-requ...@lists.apple.com wrote: Do you mean "more than one application simultaneously on more than one physical computer over NFS/AFP/SMB" ? Don't do that. When did that become the official policy, Ben? I'm doing that with some success. For the past three years,

Re: CoreData database sharing and migration

2010-03-17 Thread Ben Trumbull
> About the second question -- do you know how to solve the migration with more > than two data models? From a specific NSPersistentStore's perspective there is only ever 1 data model. When you use multiple models and merge them together, then *union* is "the" data model. The object you pass

Re: Float constants

2010-03-17 Thread Nick Zitzmann
On Mar 17, 2010, at 4:26 PM, Sean McBride wrote: > But anyway, CGFloat is sometimes float sometimes double, so how does - > fsingle-precision-constant help you? For me, anyway, setting that compiler flag is SOP when building for 32-bit code. A lot of older 32-bit Cocoa code was written under th

Suppressing autocomplete on space

2010-03-17 Thread Daniel Thorpe
Hello everyone, I know this has briefly been asked before, but the answer provided (just subclass the field editor), isn't really very cocoaish, and the docs are a bit lacking on this, so I'm asking again... Firstly, the problem... My app has a few places where the user searches for a person,

Re: Float constants

2010-03-17 Thread Michael Vannorsdel
This is exactly why I do it for the 32bit builds. What I'm trying to avoid in the sections that use doubles is having the constant generate a float load, double store, double load for each constant. I'm still poking through the assembly to see if gcc is indeed doing this but I'm also checking

Re: Case sensitive fileName

2010-03-17 Thread Ken Thomases
On Mar 17, 2010, at 12:35 PM, Andreas Mayer wrote: > Am 17.03.2010 um 17:46 Uhr schrieb Kevin Wojniak: > >> NSLog(@"displayNameAtPath: %@", [[NSFileManager defaultManager] >> displayNameAtPath:path]); > > Note that -displayNameAtPath: will give you the localized name if one should > exist. >

Re: Class instance defaults: e.g. NSBrowser

2010-03-17 Thread Keary Suska
On Mar 17, 2010, at 4:11 PM, Andrew James wrote: > I am a relative newbie to Cocoa so I trying to make sure that my code > reflects Cocoa's coding culture. > > I'm interested in whether or not instances of Cocoa classes can be expected > to display default behavior. I'll use NSBrowser's - > (

Re: NSTrackingArea Problem

2010-03-17 Thread Richard Somers
On Mar 16, 2010, at 1:23 PM, Quincey Morris wrote: I'm not sure what the answer is. It seems very context dependent, and maybe there are other relevant factors. Thanks for your input. After much testing I have arrived at the following conclusion. NSTrackingArea when used with NSTrackingActi

Multiple validation errors. Why?

2010-03-17 Thread Lynn Barton
I have a core data application. One entity is "Hit". This entity typically has no instances when the application starts, and gets populated during the execution of the program. All of the instances appear to be OK when viewed in a TableView. Some or all instances may get deleted before the appli

User-space threads and NSAutoreleasePool

2010-03-17 Thread BJ Homer
Hi everyone, Some setup, first. If you just want to jump to the question, jump to the last paragraph. OS X includes (as part of its UNIX heritage) functions for implementing user-space threading. (See, for example, the man page on swapcontext

Re: Checking integrity of a Core Data document with SQLite store

2010-03-17 Thread Dave Fernandes
Thanks, Ben and mmalc for the responses. I found that prefetching the commonly accessed objects in my document's initWithContentsOfURL:ofType:error method finds the corruption pretty reliably. Hopefully, this is a reasonably robust check without being as i/o intensive as an integrity check. It

RE: Directory to save file in NSSavePanel

2010-03-17 Thread Nikhil Khandelwal
Thanks a lot for your help. I implemented the behavior by using "runmodalForDirectory: file:". In this I took a bool variable which is false for first time and then true once save panel is opened. For first time I used "setDirectory:@'Documents'" and if user changed the location then "[savepane

Re: User-space threads and NSAutoreleasePool

2010-03-17 Thread Greg Guerin
BJ Homer wrote: I say all that in an effort to avoid the frequent "you're fighting the frameworks" responses. I'm well familiar with the frameworks, GCD, etc., and in this particular case, user-space threads is what I need. The problem is that when you call swapcontext() to switch the user-

Cocoa project structures

2010-03-17 Thread Scott Cherf
I'm looking for a good overview of cocoa/xcode project structures for medium to large scale applications, something that goes a bit past the MVC and presents some ways to decompose a larger project into smaller pieces. My problem is that I started with a small application that copies a director

Re: Cocoa project structures

2010-03-17 Thread Scott Anguish
On Mar 17, 2010, at 9:21 PM, Scott Cherf wrote: > I'm looking for a good overview of cocoa/xcode project structures for medium > to large scale applications, something that goes a bit past the MVC and > presents some ways to decompose a larger project into smaller pieces. > > My problem is th

Re: Checking integrity of a Core Data document with SQLite store

2010-03-17 Thread Ben Trumbull
The integrity check will do that, but there's no way to mitigate the I/O costs. Conceptually, if you added a simple checksum, you'd still have to read the entire file to verify it matched the checksum. This file corruption should be extremely rare, and should only occur after power loss or ker

Re: User-space threads and NSAutoreleasePool

2010-03-17 Thread BJ Homer
On Wed, Mar 17, 2010 at 11:47 PM, Greg Guerin wrote: > > Two main questions come to mind: > > Q1. What are you trying to accomplish? > Q2. Why do you think this would work? > > More on Q1: You said you need user-space threads, but you gave no reason > or rationale. If it's because you need 500 t