Knowing when control tracking is done

2010-03-21 Thread James W. Walker
I have an instance of NSSlider that I've marked as "continuous", but I also need to know when the user has released the mouse button and stopped messing with the slider. Do I need to subclass NSSlider and override mouseUp:, or is there a better way?

Re: iPhone search of my app's data?

2010-03-21 Thread WT
On Mar 22, 2010, at 12:39 AM, Kyle Sluder wrote: > On Sun, Mar 21, 2010 at 11:36 AM, WT wrote: >> You can always slide the search field into the window, below the navigation >> bar, while pushing (or, perhaps, vertically resizing) the table view. If you >> set the auto-resizing properties of t

Re: Test for debug vs release

2010-03-21 Thread Greg Parker
On Mar 21, 2010, at 11:10 AM, Clark Cox wrote: > The presence or absence of NDEBUG is not defined by the C standard > *however* the behaviour of the assert macro, when *you* define NDEBUG, > *is* specified: > > "If NDEBUG is defined as a macro name at the point in the source file > where is inclu

Re: ATTR_CMN_CHGTIME

2010-03-21 Thread Ron Fleckner
On 22/03/2010, at 11:28 AM, James W. Walker wrote: On Mar 21, 2010, at 4:20 PM, Ron Fleckner wrote: On 22/03/2010, at 10:01 AM, gMail.com wrote: Hi, I cannot find a Cocoa API to set the "Attribute Modification Date" of a file. If there is a way, may you please let me know? Thanks --

Re: Merge changes between two Managed Object Contexts

2010-03-21 Thread Austin Grigg
Thank you Joanna, that was very helpful. So, from your experience, mergeChangesFromContextDidSaveNotification: will not pick up adding a new object, just editing an existing one? It seems like the real pain point is having to re-create the new object in the second managedObjectContext and copy

Re: Save As core data question

2010-03-21 Thread Gideon King
BTW, loading and saving as seems to have some points in common with the second save as I mentioned in my previous email: Load a file and Save As without making any changes: a. Initializes a new atomic store b. Reads from an empty file at the new save location within its temporary folder, c. Sav

Re: Save As core data question

2010-03-21 Thread Gideon King
Thanks Paul - good to know what the error message means. The only file in that folder is the saved as, saved as file. When you do a save as, it appears that the steps core data follows are different than when it does the first save as. I have a simple project where I am trying to trace through

Re: ATTR_CMN_CHGTIME

2010-03-21 Thread James W. Walker
On Mar 21, 2010, at 4:20 PM, Ron Fleckner wrote: > On 22/03/2010, at 10:01 AM, gMail.com wrote: > >> Hi, >> I cannot find a Cocoa API to set the "Attribute Modification Date" of a >> file. If there is a way, may you please let me know? >> >> In the meantime, on MacOS X 10.5.8, I have been tryin

Re: NSPredicate to exclude specific elements??

2010-03-21 Thread Kyle Sluder
On Sun, Mar 21, 2010 at 12:47 PM, Robert Monaghan wrote: > I've replaced the "not" predicate with all sorts of combinations. I get a > NSInvalidArgumentException the moment the NSPredicate is instantiated. Do you have a stack trace? Perhaps it's -setPredicate:, not +predicateWithFormat:, which i

Re: Odd crash

2010-03-21 Thread Kyle Sluder
On Sun, Mar 21, 2010 at 3:37 PM, Graham Cox wrote: > I got this crash report from a user. It seems to be an isolated incident but > it would be good to know what sort of problem this indicates so if it crops > up again I know where to look for it. I've never seen this code before and it > is in

Re: iPhone search of my app's data?

2010-03-21 Thread Kyle Sluder
On Sun, Mar 21, 2010 at 11:36 AM, WT wrote: > You can always slide the search field into the window, below the navigation > bar, while pushing (or, perhaps, vertically resizing) the table view. If you > set the auto-resizing properties of the table view correctly, more than half > of the work i

Re: ATTR_CMN_CHGTIME

2010-03-21 Thread Ron Fleckner
On 22/03/2010, at 10:01 AM, gMail.com wrote: Hi, I cannot find a Cocoa API to set the "Attribute Modification Date" of a file. If there is a way, may you please let me know? In the meantime, on MacOS X 10.5.8, I have been trying to use setattrlist with ATTR_CMN_CHGTIME, unsuccessfully. A

ATTR_CMN_CHGTIME

2010-03-21 Thread gMail.com
Hi, I cannot find a Cocoa API to set the "Attribute Modification Date" of a file. If there is a way, may you please let me know? In the meantime, on MacOS X 10.5.8, I have been trying to use setattrlist with ATTR_CMN_CHGTIME, unsuccessfully. And setattrlist returns 0, as everything went ok. While

Re: Merge changes between two Managed Object Contexts

2010-03-21 Thread Joanna Carter
Hi Austin > I've got a Core Data project and I have a window controlled by an > NSWindowController that is used to add or edit an NSManagedObject. I wanted > to create a separate Managed Object Context in the NSWindowController so that > the changes made to the object aren't seen by the UI bel

Odd crash

2010-03-21 Thread Graham Cox
I got this crash report from a user. It seems to be an isolated incident but it would be good to know what sort of problem this indicates so if it crops up again I know where to look for it. I've never seen this code before and it is in Thread 6 - my app doesn't do much with threads so I'm guess

Merge changes between two Managed Object Contexts

2010-03-21 Thread Austin Grigg
I've got a Core Data project and I have a window controlled by an NSWindowController that is used to add or edit an NSManagedObject. I wanted to create a separate Managed Object Context in the NSWindowController so that the changes made to the object aren't seen by the UI below and so I can jus

[Moderator] Re: Invitation Personnelle de Pierre Berloquin

2010-03-21 Thread Scott Anguish
Spam like this will not be tolerated. It will result in moderation, regardless of the language it is posted in. Scott [Moderator] On Mar 21, 2010, at 11:46 AM, Pierre Berloquin wrote: > Si vous ne pouvez pas cliquer sur les liens, cliquez sur « Afficher le > contenu » et réessayez. > E-mail

Re: NSPredicate to exclude specific elements??

2010-03-21 Thread Robert Monaghan
Hi Kirk, The variable wildcardString would contain a string such as *GREEN* for a wildcard search to include files with that name, and for simplicity's sake a string like !*GREEN* for those that wish to exclude files that contain the string. Here is a sample bit of code.. BOOL foundStar = NO;

Re: UITable Views and display lags / NSOperation vs NSURLConnection

2010-03-21 Thread WT
Hmm, now I am confused because I just checked the docs for NSOperationQueue and it says: maxConcurrentOperationCount Returns the maximum number of concurrent operations that the receiver can execute. - (NSInteger)maxConcurrentOperationCount Return Value The maximum number of concurrent operati

Re: UITable Views and display lags / NSOperation vs NSURLConnection

2010-03-21 Thread Jack Carbaugh
W You were correct, I had not altered the queue to something other than the default. After reviewing the docs, i found this ... If you specify the value NSOperationQueueDefaultMaxConcurrentOperationCount (which is recommended), the maximum number of operations can change dynamical

Re: UITable Views and display lags / NSOperation vs NSURLConnection

2010-03-21 Thread WT
And thank you for the NSURLConnection suggestion. It's always good to have alternatives. :) W. On Mar 21, 2010, at 7:25 PM, Jack Carbaugh wrote: > hmmm to be honest, I am not sure ... there is a possibility that i did NOT > adjust the max # of concurrent operations. > > I will look into this

Re: iPhone search of my app's data?

2010-03-21 Thread WT
You can always slide the search field into the window, below the navigation bar, while pushing (or, perhaps, vertically resizing) the table view. If you set the auto-resizing properties of the table view correctly, more than half of the work is already done. The only remaining question is one of

Re: NSPredicate to exclude specific elements??

2010-03-21 Thread Kirk Kerekes
I suggest that you need to provide the actual code you are using to generate the NSPredicate, because what you are wanting to do just isn't that hard. The problem may not be in the predicate format string. I would have used @"NOT CONTAINS[cd] %@" as my first pass, and been quite surprised if i

Re: UITable Views and display lags / NSOperation vs NSURLConnection

2010-03-21 Thread Jack Carbaugh
hmmm to be honest, I am not sure ... there is a possibility that i did NOT adjust the max # of concurrent operations. I will look into this and THANK YOU for the insight. On Mar 21, 2010, at 2:22 PM, WT wrote: It was serial? Did you, by any chance, set the maximum number of running operati

Re: UITable Views and display lags / NSOperation vs NSURLConnection

2010-03-21 Thread WT
It was serial? Did you, by any chance, set the maximum number of running operations to 1? I don't recall for sure now, but that may be the default, actually. As far as I know, independent NSOperations in the same queue are executed in parallel, subjected to resource constraints and the maximum n

Re: UITable Views and display lags / NSOperation vs NSURLConnection

2010-03-21 Thread Michael Davey
NSURLConnection was indeed more appropriate for what I needed, and what I ended up using. On 21 Mar 2010, at 18:06, Jack Carbaugh wrote: > NSURLConnection does this as well. The main issue i had with using an > NSOperation/OperationQueue was that is was "serial" ... using the > NSURLConnection

Re: CoreImage on threads?

2010-03-21 Thread mlist0...@gmail.com
Just to be clear, it works great for me off the main thread. The problem I have is when I have multiple CoreImage operations on separate threads. _murat On Mar 21, 2010, at 9:30 AM, Jeff Johnson wrote: > In my experience, CoreImage is not thread safe. I could probably dig up the > details if n

Re: Test for debug vs release

2010-03-21 Thread Clark Cox
On Sun, Mar 21, 2010 at 11:01 AM, Don Quixote de la Mancha wrote: > You can also do: > > #if !defined( NDEBUG ) >    /* Debugging Stuff Goes Here *. > #endif > > I don't have an Xcode install handy to actually check (I'm > reinstalling my Mac today), but NDEBUG *should* be defined for release > bu

iPhone search of my app's data?

2010-03-21 Thread William Squires
Hi all! Okay, I've mostly finished my (in-house-only) corporate phone-book app; just needs a few tweaks now. My app is a navigation-based application with a single UITableView for the main view, with "Edit" and "+" (add) buttons on the nav-bar on top, so there's no room to put a search f

Re: UITable Views and display lags / NSOperation vs NSURLConnection

2010-03-21 Thread Jack Carbaugh
NSURLConnection does this as well. The main issue i had with using an NSOperation/OperationQueue was that is was "serial" ... using the NSURLConnection allowed me to handle MULTIPLE asynchronous downloads which, when used with properties allowed near instantaneous UI updates. With the NSOpe

Re: Test for debug vs release

2010-03-21 Thread Don Quixote de la Mancha
You can also do: #if !defined( NDEBUG ) /* Debugging Stuff Goes Here *. #endif I don't have an Xcode install handy to actually check (I'm reinstalling my Mac today), but NDEBUG *should* be defined for release builds, and not defined for debug builds. The reason is that the assert macro in d

Re: Save As core data question

2010-03-21 Thread Paul Sanders
>From errno.h: #define ENOTEMPTY 66 /* Directory not empty */ If that helps at all... Paul Sanders. - Original Message - From: "Gideon King" To: "Cocoa Dev" Sent: Sunday, March 21, 2010 5:48 PM Subject: Re: Save As core data question ... AppKit called rmdir("/private/v

Re: UITable Views and display lags

2010-03-21 Thread WT
On Mar 21, 2010, at 6:25 PM, Jack Carbaugh wrote: > You don't need to overcomplicate downloading the images with an NSOperation. > > In my experience, downloading asynchronously with an NSURLConnection and the > delegate methods works far better. > > Jack I don't think using NSOperation is ove

Re: UITable Views and display lags

2010-03-21 Thread WT
On Mar 21, 2010, at 5:52 PM, Matt Neuburg wrote: > On Fri, 19 Mar 2010 18:55:12 +0100, WT said: >> On Mar 19, 2010, at 6:40 PM, Michael Davey wrote: >> >>> OK, so I have changed the code to show a placeholder image, but I am a >>> little > uncertain as to how to fetch the images asynchronously.

Re: Save As core data question

2010-03-21 Thread Gideon King
I have found and fixed the problem with getting two extra objects instead of one, and have gone through all my code yet again, and I think I am down to 2 issues: 1. When I do a save, then Save As, then Save As again, I get a message that one of my objects has been invalidated. I haven't edited

Re: UITable Views and display lags

2010-03-21 Thread Jack Carbaugh
You don't need to overcomplicate downloading the images with an NSOperation. In my experience, downloading asynchronously with an NSURLConnection and the delegate methods works far better. Jack On Mar 21, 2010, at 12:52 PM, Matt Neuburg wrote: On Fri, 19 Mar 2010 18:55:12 +0100, WT said

Re: UITable Views and display lags

2010-03-21 Thread Matt Neuburg
On Fri, 19 Mar 2010 18:55:12 +0100, WT said: >On Mar 19, 2010, at 6:40 PM, Michael Davey wrote: > >> OK, so I have changed the code to show a placeholder image, but I am a little uncertain as to how to fetch the images asynchronously. I could start a background thread with performSelectorInBackgr

Re: about 3D sound

2010-03-21 Thread Sander Stoks
>> I'm searching some documentation about 3D sound to play sounds at left, >> right, etc channel and modify the frequency of the sound but I don't find >> anything in NSSound. >> >> how can I control pane, channel, tone and volume of a sound? > > Use OpenAL. It's available for both Mac OS X and

Re: CoreImage on threads?

2010-03-21 Thread Jeff Johnson
In my experience, CoreImage is not thread safe. I could probably dig up the details if necessary, but the gist is that we were experiencing CoreImage-related crashes when running off the main thread. Moving to the main thread fixed the crashes. Unfortunately, I'm not aware of any documentation

Re: NSPredicate to exclude specific elements??

2010-03-21 Thread Robert Monaghan
Thanks for the suggestion! All of the examples I gave work if you are trying to match the argument. CONTAINS is another way to match, but will it work with NOT? So far, everything that you would expect to work, doesn't. This is a case where you wish that Apple would document this better. (I

Re: How to Instantiate a Table View in existing View?

2010-03-21 Thread Matt Neuburg
On Thu, 18 Mar 2010 22:51:22 +, Dave said: >I have an App with a View Controller with one button on it. A view controller is not interface so it can't contain a button. It is therefore unclear from your words what it is you've got. Do you mean a navigation bar? Do you mean you've just got a w

Re: NSPredicate to exclude specific elements??

2010-03-21 Thread Jon Pugh
At 7:54 AM -0700 3/21/10, Robert Monaghan wrote: >Lets say I have a pile of NSString Paths in an array, where some of them have >the word "GREEN" in the file name. >I've been trying to build an NSPredicate which would exclude elements that >contain the name.. > >Every attempt that I have done giv

Invitation Personnelle de Pierre Berloquin

2010-03-21 Thread Pierre Berloquin
Si vous ne pouvez pas cliquer sur les liens, cliquez sur « Afficher le contenu » et réessayez. E-mail envoyé le 3/21/2010 11:45:30 AM, par Pierre Berloquin: Bonjour, Imagine qu’un jour je change d’adresse e-mail... et qu’automatiquement, sans que j’aie besoin de t’informer, ma nouvelle ad

Re: Core Data: fetching a subset of attributes/columns

2010-03-21 Thread Gabriel Fernandez
Thanks! You mean "Read the API documentation, AND the header comment for this method." Setting resultType to dictionary is mentioned in NSFetchRequest.h only. Gabriel Fernandez Wheel Software On Mar 21, 2010, at 10:46 AM, Jim Corr

NSPredicate to exclude specific elements??

2010-03-21 Thread Robert Monaghan
Hi Everyone, You would think this is simple, but I can't figure this out. Lets say I have a pile of NSString Paths in an array, where some of them have the word "GREEN" in the file name. I've been trying to build an NSPredicate which would exclude elements that contain the name.. Every attempt

Re: Core Data: fetching a subset of attributes/columns

2010-03-21 Thread Jim Correia
On Mar 20, 2010, at 1:52 PM, Gabriel Fernandez wrote: > I wanted to get a subset of an entity's attributes because one of the > ManagedObject's attributes is a large image. […] > 2) using the -setPropertiesToFetch: method of NSFetchRequest, with the "id" > NSAttributeDescription I'm looking f