re: CoreData database sharing and migration

2010-03-18 Thread Ben Trumbull
> 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? The short answer is in 10.6. The longer answer is that

NSBrowser and tab order

2010-03-18 Thread Andrew James
I have a nib file set up in Interface Builder with a window containing a single NSBrowser. I have set the NSBrowser as the window's initialFirstResponder... but for some reason when the window is displayed the NSBrowser does not receive keyboard focus and will not receive keyboard focus until I

Nview setWantLayer method breaks my custom button cell

2010-03-18 Thread Gustavo Pizano
Hello. I have a Custom Button Cell, and its corresponding CustomButton, When I use these component in any other cell they work perfect, when I click the button, my NSButonCell's overrode method - (void)highlight:(BOOL)flag withFrame:(NSRect)cellFrame inView:(NSView *)controlView{ makes the draw

Re: Deprecated APIs

2010-03-18 Thread charisse napeÿfffff1as
Hello, I already found the cause of my problem. The api I used for 10.6 has a NS_BLOCKS_AVAILABLE condition that is why my app crashes. Its not because of my OS Version conditions Please close this issue. From: Greg Parker To: Steve Christensen Cc: cocoa-

Re: User-space threads and NSAutoreleasePool

2010-03-18 Thread Jean-Daniel Dupas
Le 18 mars 2010 à 07:41, BJ Homer a écrit : > 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

re: Multiple validation errors. Why?

2010-03-18 Thread Ben Trumbull
> 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 t

Re: User-space threads and NSAutoreleasePool

2010-03-18 Thread Manfred Schwind
> The problem is that when you call swapcontext() to switch the user-thread > running on a kernel-thread, the NSAutoreleasePool stack is not swapped out. > It remains rooted in thread-local storage. As a result, serious problems > result. Let me give an example. > > - (void)doStuff { > NSAutorele

Detecting if you're being debugged

2010-03-18 Thread Peter Hudson
Technical Q&A QA1361 Detecting the Debugger Does this code report on my app being debugged by any third party, even when the app has been stripped of symbols ? Would it work irrespective of the debugging tool used ? Peter ___ Cocoa-dev mailing lis

Re: Float constants

2010-03-18 Thread Manfred Schwind
> Still, CGFloat is a pain when using the 64 to 32 bit truncation warning > and doing something like: > > NSRect foo = NSMakeRect (1.0, 2.0, ...) > > it will warn building as 32 bit since it's implicitly converting double > to float. You could do: > > NSRect foo = NSMakeRect ((CGFloat)1.0, (CGF

Re: NSBrowser and tab order

2010-03-18 Thread Corbin Dunn
Aj -- I believe this was a bug fixed in 10.6; maybe 10.5. What OS are you on? The work around is to set it up in awakeFromNib. corbin On Mar 18, 2010, at 1:15 AM, Andrew James wrote: > I have a nib file set up in Interface Builder with a window containing a > single NSBrowser. > > I have set

Re: Multiple validation errors. Why?

2010-03-18 Thread Sean McBride
On Wed, 17 Mar 2010 21:05:06 -0700, Lynn Barton said: >the app quits, I get a "multiple validation errors occured" message. The >console has no error messages. Stick this in your app delegate: - (NSError*)application:(NSApplication*)application willPresentError:(NSError*)error { if (e

altering IKSaveOptions?

2010-03-18 Thread Brian Postow
I have an ImageKit program that needs to be able to save images, so I'm using the IKSaveOptions accessory view, to allow the user to choose a file type, etc. However, I want to remove some of the options, and add a checkbox to the panel for TIFFs. Alternatively, I want to add a type of file. Ho

Re: User-space threads and NSAutoreleasePool

2010-03-18 Thread Michael Ash
On Wed, Mar 17, 2010 at 11:11 PM, BJ Homer wrote: > Okay, so that's the setup. Obviously, the problem is that the two user-space > threads are sharing an autorelease pool stack that is intended to be > thread-local. My question, then, is whether there exists a way to get and > set the autorelease

Re: NSBrowser and tab order

2010-03-18 Thread Keary Suska
On Mar 18, 2010, at 8:40 AM, Corbin Dunn wrote: > Aj -- I believe this was a bug fixed in 10.6; maybe 10.5. What OS are you on? > > The work around is to set it up in awakeFromNib. Is there any way to tab into an NSBrowser in 10.4? It seems that once the browser loses focus, you can't get focus

Re: User-space threads and NSAutoreleasePool

2010-03-18 Thread Jens Alfke
On Mar 18, 2010, at 8:35 AM, Michael Ash wrote: Cocoa keeps around a lot of thread-specific state. In addition to autorelease pools, you also have exception handlers, graphics contexts, and possibly others. Yup. I quickly ran into this in 2008 when experimenting with implementing coroutines

Re: Threads Question

2010-03-18 Thread Matt Neuburg
On Wed, 17 Mar 2010 10:36:40 -0400, Philippe Sismondi said: >Because the length of time that this secondary task takes is highly variable, I want to be able to cancel its processing from the main app. So, I want to launch the secondary task in a separate thread to keep the main runloop responsive.

Re: Detecting if you're being debugged

2010-03-18 Thread Kyle Sluder
On Thu, Mar 18, 2010 at 4:48 AM, Peter Hudson wrote: > Does this code report on my app being debugged by any third party, even when > the app has been stripped of symbols ? It does precisely what it claims to do: asks the kernel if the P_TRACED flag is set on your process, which means a debugger

Re: NSTrackingArea Problem

2010-03-18 Thread Richard Somers
Submitted this issue, Apple Bug ID# 7767875. --Richard ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Uns

Re: Detecting if you're being debugged

2010-03-18 Thread Jonathan del Strother
On 18 March 2010 18:03, Kyle Sluder wrote: > On Thu, Mar 18, 2010 at 4:48 AM, Peter Hudson wrote: >> Does this code report on my app being debugged by any third party, even when >> the app has been stripped of symbols ? > > It does precisely what it claims to do: asks the kernel if the > P_TRACED

Re: Directory to save file in NSSavePanel

2010-03-18 Thread Corbin Dunn
On Mar 17, 2010, at 10:40 PM, Nikhil Khandelwal wrote: > 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

Manually adding objects to NSArrayController

2010-03-18 Thread Jenny M
Hi all, I'm having a problem adding the appropriate objects to an NSArrayController. For some strange object model reasons, I will probably need to set this by hand, but I'm having issues. Back to my silly object discussions... before, it was about an NSTreeController which I did get resolved, but

AddressBook framework with remote contacts?

2010-03-18 Thread A.M.
Hello, We are interested in using the AddressBook framework (specifically, the people picker view) but we haven't found a way with the CocoaPeoplePicker code example to show remote contacts (via LDAP, Exchange, or CardDAV) under 10.6. Does the Address Book framework not support remote contacts?

Printing an NSDocument

2010-03-18 Thread Brian Postow
I'm trying to print a document. The document is an array of NSImageReps, or a single NSPDFImageRep, which has multiple pages. I'm having trouble figuring out how to use the NSPrintOperation class to print this. The NSPrintOperation seems to need an NSView to print. Do I need to manually add e

re: User-space threads and NSAutoreleasePool

2010-03-18 Thread Ben Trumbull
> The problem is that when you call swapcontext() to switch the user-thread > running on a kernel-thread, the NSAutoreleasePool stack is not swapped out. > It remains rooted in thread-local storage. As a result, serious problems > result. Let me give an example. > > - (void)doStuff { > NSAutorele

Hit testing on NSTextField with custom cells

2010-03-18 Thread Jonathon Kuo
I've created a subclass of NSTextFieldCell that just adds the -hitTestForEvent:inRect:ofView: method. If I substitute my subclass in an NSTableView for the standard NSTextFieldCells, I do get this callback when a table element is clicked. But if I substitute my subclass in for an NSTextFie

Re: NSBrowser and tab order

2010-03-18 Thread Andrew James
Yup you got it. I actually tracked down an Apple doc in regards to that last evening. I did go ahead and set it up correctly in awakeFromNib as follows: // DUE to NSBrowser bug in regards to its implementation // of acceptsFirstResponder, forcibly load it and then // make it the first responder

How to Instantiate a Table View in existing View?

2010-03-18 Thread Dave
Hi All, This is a newbie question and sorry if it sounds obvious, but I've been playing around for ages trying to figure out how to add a table view into my App. I have an App with a View Controller with one button on it. I created a new Table View by selecting New File in XCode and selec

Using Set/Array KVC operators

2010-03-18 Thread Sam Krishna
Hi all, I have two arrays of NSDictionaries that I'm trying to "uniquely merge" by making sure that no two dictionaries have duplicate contents. I came up with one solution, but I wanted to see if the community had an answer that involved using one of the KVC array operators. Here's the origin

Re: Printing an NSDocument

2010-03-18 Thread Jenny M
Sorry, no answer, I'm just having a similar issue. I need to print columns of text, and all the examples I see indicate a manual creation and placement of EACH line of text in an NSRect inside the view. ... Is there really no better way to place objects in the view? Jenny On Mar 18, 12:47 pm, B

Re: Threads Question

2010-03-18 Thread Scott Cherf
Thanks to Phi for pointing out that I didn't cc the list on this reply -- Scott. On Mar 17, 2010, at 7:36 AM, Philippe Sismondi wrote: > > Because the length of time that this secondary task takes is highly variable, > I want to be able to cancel its processing from the main app. So, I want to

Re: Detecting if you're being debugged

2010-03-18 Thread Peter Hudson
Thanks Jeremy, Kyle and Jonathon for your comments. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubsc

Re: Manually adding objects to NSArrayController

2010-03-18 Thread Scott Anguish
Modify the model, not the controller. so the model object that holds the array should be called with mutableArrayForKey: passing the array variable key. then mutate the array you get back.. that will be KVO compliant and the changes will be reflected in your controller, and then your view. O

Weird release problem on iPhone code

2010-03-18 Thread William Squires
I have some code like below in a UITableView delegate (specifically, the one that fires when you touch a tableview row): ... NSDictionary *store = [self.stores objectAtIndex:indexPath.row]; // store name is like "NOBLE FINANCE" or "CUSTOMER CREDIT" or such; i.e. two strings seperated by a sp

Re: Weird release problem on iPhone code

2010-03-18 Thread Jens Alfke
On Mar 18, 2010, at 8:43 PM, William Squires wrote: > If I uncomment any of the object releases above, the app crashes in the > simulator, and all the call-stack items are gray (non-user code). But if I > don't release them, they'll leak memory, won't they, since iPhone OS doesn't > have GC?

Re: Weird release problem on iPhone code

2010-03-18 Thread Noah Desch
You don't own any of those objects so you should not be releasing them. See: http://developer.apple.com/mac/library/documentation/cocoa/conceptual/MemoryMgmt/Articles/mmRules.html -Noah On Mar 18, 2010, at 11:43 PM, William Squires wrote: > I have some code like below in a UITableView delegat

Three odd iPhone dev problems

2010-03-18 Thread William Squires
1) How does one save an XML back into its file? I've got a project that loads an xml file via a UITableView's delegate methods - that all works; I can see all the items in the NSMutableArray which was loaded from the XML file I created and dragged into the "Resources" group in Xcode. But th

Re: User-space threads and NSAutoreleasePool

2010-03-18 Thread Michael Ash
On Thu, Mar 18, 2010 at 12:05 PM, Jens Alfke wrote: > > On Mar 18, 2010, at 8:35 AM, Michael Ash wrote: > >> Cocoa keeps around a lot of thread-specific state. In addition to >> autorelease pools, you also have exception handlers, graphics >> contexts, and possibly others. > > Yup. I quickly ran i

Re: Three odd iPhone dev problems

2010-03-18 Thread Dave Carrigan
On Mar 18, 2010, at 8:55 PM, William Squires wrote: > 1) How does one save an XML back into its file? I've got a project that loads > an xml file via a UITableView's delegate methods - that all works; I can see > all the items in the NSMutableArray which was loaded from the XML file I > create

Re: Three odd iPhone dev problems

2010-03-18 Thread Dave Carrigan
On Mar 18, 2010, at 8:55 PM, William Squires wrote: > 3) How do I get a UITextField that displays a telephone number to be able for > the user to click it to dial the number, but not so they can edit it in > place? Or is this a different control? Maybe make it a custom button instead.

Re: [solved] Multiple validation errors. Why?

2010-03-18 Thread Lynn Barton
On Mar 18, 2010, at 7:51 AM, Sean McBride wrote: > On Wed, 17 Mar 2010 21:05:06 -0700, Lynn Barton said: > >> the app quits, I get a "multiple validation errors occured" message. The >> console has no error messages. > > Stick this in your app delegate: > > - (NSError*)application:(NSApplicati

NSString after an UIAlertView..

2010-03-18 Thread Jon
I have a class set up, and in the header file, I have instances of NSString that i want to hang around for all the methods of the class to be able to use...(why they are declared in the header file). when i create an instance of the class to use I have a problem. I create one instance

Re: Manually adding objects to NSArrayController

2010-03-18 Thread Jenny M
Ahhh, thank you, that helped! What I did was add an NSArray property (though it could've been NSMutableArray), then called setValueForKey, and bound the ArrayController to that array. And it works great. Jenny On Thu, Mar 18, 2010 at 8:26 PM, Scott Anguish wrote: > Modify the model, not the con

Re: User-space threads and NSAutoreleasePool

2010-03-18 Thread Jeremy Pereira
On 18 Mar 2010, at 06:41, BJ Homer wrote: > On Wed, Mar 17, 2010 at 11:47 PM, Greg Guerin wrote: > doing one transaction updating 400-500 records.) Hence, we pipeline the HTTP > requests, starting transfer of the second before the first one is finished. > There are a large number of servers that

Re: Detecting if you're being debugged

2010-03-18 Thread Jeremy Pereira
On 18 Mar 2010, at 11:48, Peter Hudson wrote: > Technical Q&A QA1361 > Detecting the Debugger > > Does this code report on my app being debugged by any third party, even when > the app has been stripped of symbols ? > Would it work irrespective of the debugging tool used ? Did you read the war

NSComboBox problem in 10.6.2

2010-03-18 Thread H. Miersch
hi. I have a window with 3 comboboxes. one of them uses a data source. the problem is that it keeps throwing an exception, and i can't find out why. I've put the following methods in my appcontroller: -(NSInteger)numberOfItemsInComboBox:(NSComboBox *)aComboBox { return (NSInteger)[symbol

Re: NSComboBox problem in 10.6.2

2010-03-18 Thread Scott Anguish
what does the symbols array contain? are you sure it’s the length you think it is? and what is index? It says −1 or possibly larger. On Mar 18, 2010, at 3:38 PM, H. Miersch wrote: > hi. > I have a window with 3 comboboxes. one of them uses a data source. the > problem is that it keeps throwing

Re: Three odd iPhone dev problems

2010-03-18 Thread Scott Anguish
On Mar 18, 2010, at 11:55 PM, William Squires wrote: > 1) How does one save an XML back into its file? I've got a project that loads > an xml file via a UITableView's delegate methods - that all works; I can see > all the items in the NSMutableArray which was loaded from the XML file I > creat

Re: Printing an NSDocument

2010-03-18 Thread Scott Anguish
On Mar 18, 2010, at 7:17 PM, Jenny M wrote: > Sorry, no answer, I'm just having a similar issue. I need to print > columns of text, and all the examples I see indicate a manual creation > and placement of EACH line of text in an NSRect inside the view. ... > Is there really no better way to place

Re: Printing an NSDocument

2010-03-18 Thread Scott Anguish
well, getting that old demo to work seems more trouble than it’s worth. have you looked at the Printing Programming Topics for Cocoa in the documentation? On Mar 18, 2010, at 7:17 PM, Jenny M wrote: > Sorry, no answer, I'm just having a similar issue. I need to print > columns of text, and all