Re: NSXMLDocument and threads

2010-03-26 Thread Marcel Weiher
On Mar 2, 2010, at 10:18 PM, Jeff Johnson wrote: My question is, how do I use NSXMLDocument safely on a non-main thread? I need to do this for performance reasons, otherwise my app can pinwheel during XML parsing. Maybe you need faster XML parsing? Marcel

Path to preference folder

2010-03-26 Thread Nikhil Khandelwal
Hi, I want to get the path of /User/library/Preference to put the plist file over there. For getting the path I am using NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) which gives me path to library. Is there anything which gives me directly path to Preference

Previous ShutDown Message : 3 received

2010-03-26 Thread Poonam Virupaxi Shigihalli
Hi All, Running our application(Soft Phone) on iMac, 2.66 GHz, core 2 duo. making calls from other end to iMac continuously, the system shuts down when about to sleep. After the system is restarted we get these messages in our console. 26/03/10 10:12:44 AMkernel Sleep failure code

NSWindow subclass VERY slow to resize

2010-03-26 Thread Daniel Weber
Ok, I finally managed to get all the drawing/event-handling code working for my borderless window subclass. The only problem I have left now is performance. I have a basic formula in the mouseDown method that does a little arithmetic and sets the window's new frame. It works fine when the window

Re: Determining an inter-application drag source

2010-03-26 Thread Matt Gough
A fragile way would be to see what other drag types are being put on the pasteboard. I imagine Finder has some esoteric old types for backwards compatibility and I would guess that Aperture has some image types that the Finder wouldn't normally use (except maybe for picture clippings) But as

Re: Sync .DS_Store files

2010-03-26 Thread gMail.com
Thank you Dave, Thank you Jens. I will ignore the .DS_Store files. I think the Finder will take care of them. Also I have got the same question on the hidden directory /.fseventsd As I know it contains log files created by Time Machine. I have tried to backup the files it contains but, even

Re: Core Data doesn't save toMany relations please HELP :S

2010-03-26 Thread Gustavo Pizano
Hello all again, So was digging more into the problem, and realize that the Items are being saved the ItemXInvoice are being saved and related to the invoice, but I can't acces the invoice detail (ItemXInvoice) immediately I get a console error: Cannot remove an observer NSTableBinder

Re: Sync .DS_Store files

2010-03-26 Thread Jean-Daniel Dupas
.fseventd is not a time machine specific folder. See FSEvent API for details. Le 26 mars 2010 à 13:21, gMail.com a écrit : Thank you Dave, Thank you Jens. I will ignore the .DS_Store files. I think the Finder will take care of them. Also I have got the same question on the hidden directory

Re: Determining an inter-application drag source

2010-03-26 Thread Jeffrey J. Early
I apparently didn't hit reply-all on my response to Steve. I wrote: When a user drags a photo from iPhoto to my application I need to be able to update iPhoto's database (via ScriptingBridge) with changes that are made while in my program. Other programs require different bits of extra work to

Re: NSWindow subclass VERY slow to resize

2010-03-26 Thread Jens Alfke
On Mar 26, 2010, at 3:36 AM, Daniel Weber wrote: Is there some way to speed this up? Could something else be going on? Sample it and find out. The way I do it is: sleep 5; sample MyApp 5 hit Return, immediately click your app’s window and start resizing. Keep going until the

Re: Determining an inter-application drag source

2010-03-26 Thread Jens Alfke
On Mar 26, 2010, at 7:00 AM, Jeffrey J. Early wrote: When a user drags a photo from iPhoto to my application I need to be able to update iPhoto's database (via ScriptingBridge) with changes that are made while in my program. Can you check the path to the file and see if it’s inside the

Re: Determining an inter-application drag source

2010-03-26 Thread Steve Christensen
I wouldn't say that there has been any argument over whether or not knowing the drag source is a good thing; we were simply asking why you needed to know. You could have just as easily made a bad assumption about something else and were trying to fix it in the drag. And if you would like

Re: Determining an inter-application drag source

2010-03-26 Thread Jeffrey J. Early
On Mar 26, 2010, at 10:23 AM, Jens Alfke wrote: On Mar 26, 2010, at 7:00 AM, Jeffrey J. Early wrote: When a user drags a photo from iPhoto to my application I need to be able to update iPhoto's database (via ScriptingBridge) with changes that are made while in my program. Can you

Re: Determining an inter-application drag source

2010-03-26 Thread Jeffrey J. Early
Gotcha -- sorry if I read into that a bit much. I haven't complained this as a missing feature here at all yet -- I was actually still under the impression that there was a mechanism to determine the drag source that I didn't know about. As the consensus appears to be that there isn't, I will

Re: Determining an inter-application drag source

2010-03-26 Thread Jens Alfke
On Mar 26, 2010, at 7:40 AM, Jeffrey J. Early wrote: They actually don't have to be inside the library bundle... there's an Advanced preference to not copy the original into the library. In that case, the image file would be visible to other apps. So I might have dragged the photo from the

Re: Determining an inter-application drag source

2010-03-26 Thread Mike Abdullah
On 26 Mar 2010, at 14:43, Jeffrey J. Early wrote: Gotcha -- sorry if I read into that a bit much. I haven't complained this as a missing feature here at all yet -- I was actually still under the impression that there was a mechanism to determine the drag source that I didn't know about.

Re: NSXML Parsing Problem

2010-03-26 Thread Jeffrey Oleander
On Thu, 2010/03/25, Keary Suska cocoa-...@esoteritech.com wrote: Maybe a cool option for NSXML would be to be able to specify the pound ; sequence and have it map it to whatever... My XML is a little rusty but IIRC this is an XML issue, and any XML parser would choke. You have to

Re: Path to preference folder

2010-03-26 Thread Kyle Sluder
On Mar 26, 2010, at 1:54 AM, Nikhil Khandelwal nikhil_khandel...@persistent.co.in wrote: I want to get the path of /User/library/Preference to put the plist file over there. For getting the path I am using NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES) which

How to catch modal window appearance?

2010-03-26 Thread Alexander Bokovikov
Hi, All, Is there any notification or NSWindow delegate method, called immediately after the modal window is shown on screen? It looks like windowDidExposed doesn't come to a modal window. Is there any solution? Thanks. ___ Cocoa-dev mailing

Re: Sync .DS_Store files

2010-03-26 Thread gMail.com
Thank you Jean, I have now read that docs, so I will not copy the contents of that folder, nor copy it empty. Da: Jean-Daniel Dupas devli...@shadowlab.org Data: Fri, 26 Mar 2010 14:44:20 +0100 A: gMail.com mac.iphone@gmail.com Cc: cocoa-dev@lists.apple.com Oggetto: Re: Sync .DS_Store

Re: Determining an inter-application drag source

2010-03-26 Thread Jeffrey J. Early
On Mar 26, 2010, at 11:31 AM, Jens Alfke wrote: On Mar 26, 2010, at 7:40 AM, Jeffrey J. Early wrote: They actually don't have to be inside the library bundle... there's an Advanced preference to not copy the original into the library. In that case, the image file would be visible to

Re: Determining an inter-application drag source

2010-03-26 Thread Steve Christensen
Well, other than saying one could argue it's the failure of these digital asset managers... to suggest that there are missing features. :) And having a nil dragSource makes sense if the source and destination for the drag are in different processes. The drag source is an object (type

Creating NSMappingModel programmatically

2010-03-26 Thread Ulai Beekam
I'm trying to create an NSMappingModel manually between two models, but it's not working in that no data gets migrated over (I checked with an SQLite database browser) to the new store, the tables are just empty. The source model has one entity Person with two attributes: name and eyeColor.

RE: Creating NSMappingModel programmatically

2010-03-26 Thread Ulai Beekam
Ok, that code really looks bad through email, so I'm going to give you a link to the code in much more pleasant format: http://pastie.org/888526 I'm trying to create an NSMappingModel manually between two models, but it's not working in that no data gets migrated over (I checked with an

Re: NSWindow subclass VERY slow to resize

2010-03-26 Thread Daniel Weber
It appears that drawing the rounded rect vs. a regular rect is slow. Also, I am filling using a pattern image vs. a solid color. These things add up to a pretty slow redraw at large sizes. I can set the max size to something relative low, but does anyone have any other suggestions? How does a

Re: How to catch modal window appearance?

2010-03-26 Thread Fritz Anderson
On 26 Mar 2010, at 11:12 AM, Alexander Bokovikov wrote: Is there any notification or NSWindow delegate method, called immediately after the modal window is shown on screen? It looks like windowDidExposed doesn't come to a modal window. Is there any solution? Just to check on the obvious

Re: NSWindow subclass VERY slow to resize

2010-03-26 Thread Paul Sanders
Have a look at -[NSBezierPath setFlatness:]. A larger value might be faster (but might also look ugly). There's also a bit of code floating around in the web-o-sphere that might be faster than what you are using: http://lists.apple.com/archives/Cocoa-dev/2006/Mar/msg01940.html Paul Sanders

Re: NSWindow subclass VERY slow to resize

2010-03-26 Thread Jens Alfke
On Mar 26, 2010, at 11:08 AM, Daniel Weber wrote: It appears that drawing the rounded rect vs. a regular rect is slow. Also, I am filling using a pattern image vs. a solid color. These things add up to a pretty slow redraw at large sizes. I wouldn't expect those to be slow enough to notice.

Accessing Regional iVars: Best Design Method

2010-03-26 Thread Frederick C . Lee
Environment: iPhone SDK 3.1+ Greetings: I wish to design a UITabBarController application where each descendent member of a particular UITabBarItem has access to its regional iVars, stored within the UITabBarItem. Hence we could multiple tabs, each having the SAME hierarchy of member view

Sending a Cmd-V keystroke

2010-03-26 Thread Jim Graham
Hi This is a problem that occurred a few months back in a project. I Never actually used it in the project but it has bugged me ever since. I have simplified the problem into a small example There is a window with three NSTextFields and a button. The button is connected to the doPaste action

Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'

2010-03-26 Thread Alec Stewart
This compiler warning 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:' is driving me up the wall. I don't understand why I am getting the warning because, by all indications, +dateWithTimeInterval:sinceDate: has not been deprecated. I would be extremely grateful for any insight.

NSOutlineView Data Source setObjectValue not being called

2010-03-26 Thread Venkat
Hello I have an outline view with a custom NSCell on one column with a custom field editor for editing. The field editor is a subclass of NSTextView. On Leopard, the above custom NSCell correctly displays the data as well as I am able to edit the contents using the field editor. On Snow

Re: Sending a Cmd-V keystroke

2010-03-26 Thread Dave DeLong
I think you're probably moving too fast. Pasting is not a synchronous operation. What I'm guessing is happening is that you're filling the pasteboard, pasting, filling, pasting, filling, and pasting, but the pasteboard hasn't starting actually *pasting* until you've already refilled it a

Re: Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'

2010-03-26 Thread Quincey Morris
On Mar 26, 2010, at 01:23, Alec Stewart wrote: date = [NSDate dateWithTimeInterval:hundredthsToAdd sinceDate:dateWithoutHundredths]; //This is the line the warning shows up on The NSDate class reference states that this is available in Mac OS 10.6 or later. Chances are your project is

Re: Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'

2010-03-26 Thread David Duncan
On Mar 26, 2010, at 1:23 AM, Alec Stewart wrote: This compiler warning 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:' is driving me up the wall. Quincey already answered why you are likely getting this error, but you can use -initWithTimeInterval:sinceDate: with to create

Re: Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'

2010-03-26 Thread Alec Stewart
Thanks very much! That took care of the problem. On Fri, Mar 26, 2010 at 10:12 AM, David Duncan david.dun...@apple.comwrote: On Mar 26, 2010, at 1:23 AM, Alec Stewart wrote: This compiler warning 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:' is driving me up the wall.

Re: Sending a Cmd-V keystroke

2010-03-26 Thread Ross Carter
On Mar 26, 2010, at 12:23 AM, Jim Graham wrote: [textField1 becomeFirstResponder]; From the docs: Use the NSWindow makeFirstResponder: method, not this method, to make an object the first responder. Never invoke this method directly. ___

Re: Sending a Cmd-V keystroke

2010-03-26 Thread Jim Correia
On Mar 25, 2010, at 8:23 PM, Jim Graham wrote: This is a problem that occurred a few months back in a project. I Never actually used it in the project but it has bugged me ever since. I have simplified the problem into a small example There is a window with three NSTextFields and a

Re: Sending a Cmd-V keystroke

2010-03-26 Thread Jim Correia
On Mar 25, 2010, at 8:23 PM, Jim Graham wrote: This is a problem that occurred a few months back in a project. I Never actually used it in the project but it has bugged me ever since. I have simplified the problem into a small example There is a window with three NSTextFields and a

Re: Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'

2010-03-26 Thread Nick Peelman
According to the docs, that method is only available in 10.6 and later. Are you building for 10.5? http://developer.apple.com/mac/library/documentation/Cocoa/Reference/Foundation/Classes/NSDate_Class/Reference/Reference.html#//apple_ref/doc/uid/2188-SW14 -nick -- Nick Peelman

Re: Compiler Warning: 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:'

2010-03-26 Thread Philip Mobley
On Mar 26, 2010, at 1:23 AM, Alec Stewart wrote: This compiler warning 'NSDate' may not respond to '+dateWithTimeInterval:sinceDate:' is driving me up the wall. I don't understand why I am getting the warning because, by all indications, +dateWithTimeInterval:sinceDate: has not been