Re: Best way to find files

2011-04-08 Thread Bhatnagar, Arvin
Dominic, I haven't done this yet, but need to set this up in the app I'm beginning to work on. From the searches I've done, perhaps the solution is NSMetadataQuery along with a UTI. Take a look at both the SpotlightFortunes and PhotoSearch sample code. The only drawback I can think of is that

NSWorkspaceWillPowerOffNotification not working with Qt Cocoa Mac Application

2011-04-08 Thread manoj
Hi, I am working on Mac application using Qt Cocoa. I want to track log out/shut down event. I looked at Qt for some solution however it seems to be more at OS level so Qt doesn't provide anything. So I switched to NSWorkspace and registered to get Sleep

Access main window of other Applications

2011-04-08 Thread Florian Pilz
Hi there! I'm looking for an easy way to access the main window of another Application, thus not my own. (The key window would be fine as well, if that is easier.) I already searched via Google to solve this task and I found the following solutions: * use AppleScript to perform this task and

NSWorkspaceWillPowerOffNotification not working with Qt Cocoa Mac Application

2011-04-08 Thread manoj
Hi, I am working on Mac application using Qt Cocoa. I want to track log out/shut down event. I looked at Qt for some solution however it seems to be more at OS level so Qt doesn't provide anything. So I switched to NSWorkspace and registered to get Sleep

Re: Access main window of other Applications

2011-04-08 Thread Eric Wing
On 4/7/11, Florian Pilz fpil...@googlemail.com wrote: Hi there! I'm looking for an easy way to access the main window of another Application, thus not my own. (The key window would be fine as well, if that is easier.) I already searched via Google to solve this task and I found the

Re: Localized sorting of a Core Data entity

2011-04-08 Thread Ray
First: Quincey, Dado, Chase, WT, thanks for your comments, much appreciated! On Apr 7, 2011, at 6:53 PM, Quincey Morris wrote: On Apr 7, 2011, at 03:06, Ray wrote: Right, I tried something like this earlier, but when I use - (NSString*) localizedName { return NSLocalizedString

Re: Access main window of other Applications

2011-04-08 Thread Peter Lübke
Am 07.04.2011 um 17:01 schrieb Florian Pilz: Hi there! I'm looking for an easy way to access the main window of another Application, thus not my own. (The key window would be fine as well, if that is easier.) I already searched via Google to solve this task and I found the following

Re: How To Increment CALayer Retain Count?

2011-04-08 Thread Mike Abdullah
On 7 Apr 2011, at 21:44, Jeffrey Walton wrote: On Thu, Apr 7, 2011 at 8:30 AM, Mike Abdullah cocoa...@mikeabdullah.net wrote: Have you tested using the Zombies Instrument? I believe so. The executable's environment is NSZombieEnable = YES and NSAutoreleaseFreedObjectCheckEnabled = YES.

Re: diable localization

2011-04-08 Thread Georg Seifert
Hi, Many thanks. That worked perfectly. I need this to allow my users to disable localization. I use this: - (IBAction) setDisableLocalization:(id) sender { if ([sender state] == NSOnState) { [[NSUserDefaults standardUserDefaults] setObject:[NSArray

Re: Access main window of other Applications

2011-04-08 Thread Bill Cheeseman
On Apr 7, 2011, at 11:01 AM, Florian Pilz wrote: c) I couldn't find any examples on using the NSAccessibility protocol to retrieve the main window, not mentioning the discomfort that the user may activate access to accessibility features first. The NSAccessibility protocol is intended for

Re: NSWorkspaceWillPowerOffNotification not working with Qt Cocoa Mac Application

2011-04-08 Thread John C. Randolph
On Apr 7, 2011, at 11:34 PM, manoj wrote: I am working on Mac application using Qt Cocoa. Please help me to figure out what is the difference between two. You'll have to ask Nokia. -jcr ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Display a Red frame on the screen

2011-04-08 Thread eveningnick eveningnick
Hello I have two monitors attached to the computer, and when i click in System Preferences/Displays Preferences on the display image (Display arrangement tab), the screen of the clicked scematic monitor's image monitor is being surrounded by a red frame. How could i do something like this from my

Re: Can an image be rejected by CALayer?

2011-04-08 Thread Matt Neuburg
On Wed, 06 Apr 2011 18:44:04 +0800, Gabriel Zachmann z...@tu-clausthal.de said: I am creating CA layers like so: CALayer * imgLayer = [CALayer layer]; imgLayer.contents = (id) image; imgLayer.contentsGravity = kCAGravityResizeAspect; imgLayer.delegate

Re: Two Applications Sharing Same Core Data Database

2011-04-08 Thread Carter R. Harrison
On Apr 7, 2011, at 7:04 PM, Carter R. Harrison wrote: On Apr 7, 2011, at 6:38 PM, Nick Zitzmann wrote: On Apr 7, 2011, at 4:24 PM, Carter R. Harrison wrote: I really appreciate all of your help. I gave your suggestion a shot and I've run into problems. Here's what happens. 1. I

Re: How To Increment CALayer Retain Count?

2011-04-08 Thread Matt Neuburg
On Thu, 07 Apr 2011 07:15:20 -0400, Jeffrey Walton noloa...@gmail.com said: Hi All, I have a UIViewController as follows. Its just an About Box, with a navigation bar and button (to cancel) and two labels. The controller was built with Interface Builder. The Navigation Bar and two labels are

Framework Installation Directory

2011-04-08 Thread Mr. Gecko
I need help with the Installation Directory for a framework that will be shared between a application and 2 daemons within side it. I think I may be able to do it if I were to have the 2 daemons executables in the MacOS path or another folder such as one named Daemons in the Contents folder. I

Re: Framework Installation Directory

2011-04-08 Thread Vyacheslav Karamov
08-Apr-11 15:53, Mr. Gecko пишет: I need help with the Installation Directory for a framework that will be shared between a application and 2 daemons within side it. I think I may be able to do it if I were to have the 2 daemons executables in the MacOS path or another folder such as one named

Re: Framework Installation Directory

2011-04-08 Thread Sherm Pendley
On Fri, Apr 8, 2011 at 8:53 AM, Mr. Gecko grmrge...@gmail.com wrote: I need help with the Installation Directory for a framework that will be shared between a application and 2 daemons within side it. I think I may be able to do it if I were to have the 2 daemons executables in the MacOS path

Re: Framework Installation Directory

2011-04-08 Thread Mr. Gecko
So basically once I've compiled the daemon, have it run a post script that will change the path to go back 4 directories instead of 1 if I was to place it in Contents/Daemon/Daemon.app/Contents/MacOS/Daemon? Thanks for the response, Mr. Gecko On Apr 8, 2011, at 8:48 AM, Sherm Pendley wrote:

Re: Framework Installation Directory

2011-04-08 Thread Sherm Pendley
Yeah, that's how I'd do it, add a run script build phase to the daemon target. sherm-- On Fri, Apr 8, 2011 at 9:57 AM, Mr. Gecko grmrge...@gmail.com wrote: So basically once I've compiled the daemon, have it run a post script that will change the path to go back 4 directories instead of 1 if

Re: Framework Installation Directory

2011-04-08 Thread Jean-Daniel Dupas
Or do a symlink of MyApp.app/Contents/Frameworks into your daemon Contents directory (using a build script too). cd Daemon.app/Contents/ ln -s ../../../Frameworks Frameworks (I didn't check the count of '..' so it may be wrong, but you get the idea). Yeah, that's how I'd do it, add a run

Re: Framework Installation Directory

2011-04-08 Thread Mr. Gecko
True, I forgot all about symbolic links. On Apr 8, 2011, at 10:05 AM, Jean-Daniel Dupas wrote: Or do a symlink of MyApp.app/Contents/Frameworks into your daemon Contents directory (using a build script too). cd Daemon.app/Contents/ ln -s ../../../Frameworks Frameworks (I didn't check

Re: Framework Installation Directory

2011-04-08 Thread Sherm Pendley
True! There's more than one way to skin that cat. :-) sherm-- On Fri, Apr 8, 2011 at 11:05 AM, Jean-Daniel Dupas devli...@shadowlab.org wrote: Or do a symlink of MyApp.app/Contents/Frameworks into your daemon Contents directory (using a build script too). cd Daemon.app/Contents/ ln -s

Re: Class UITableViewCellContentView is implemented in both here and there. One of the two will be used. Which one is undefined.

2011-04-08 Thread Luke Hiesterman
It means that UIKit now defines a class called UITableViewCellContentView and that collides with one of your classes. Objective C has this inherent weakness that if a class with the same name is implemented in more than one place, they fight for which one gets used. Since you can't change

Re: Display a Red frame on the screen

2011-04-08 Thread David Duncan
On Apr 8, 2011, at 3:39 AM, eveningnick eveningnick wrote: Hello I have two monitors attached to the computer, and when i click in System Preferences/Displays Preferences on the display image (Display arrangement tab), the screen of the clicked scematic monitor's image monitor is being

Re: Class UITableViewCellContentView is implemented in both here and there. One of the two will be used. Which one is undefined.

2011-04-08 Thread Laurent Daudelin
Thanks Luke. I initially didn't understand how I could have done this because I'm careful about the names I give my classes, having done Objective-C for 15 years. But I found one implementation. I remember yesterday when googling that there was an issue on Stack Overflow at some point with SDK

Re: Framework Installation Directory

2011-04-08 Thread Eric Wing
On 4/8/11, Vyacheslav Karamov ubuntul...@yandex.ru wrote: I'm not sure what you need exactly, but it hope it would be helpful for you http://www.dribin.org/dave/blog/archives/2009/11/15/rpath/ I agree with Vyacheslav. You should look at @rpath. -Eric -- Beginning iPhone Games Development

Re: Display a Red frame on the screen

2011-04-08 Thread eveningnick eveningnick
Hi David, thanks for the answer I was thinking about the window. But then it has to be something with a big hole inside. This hole ought to be transparent for mouse clicks (so if there's something below my window, that 'something' has to be clickable and focused, and receive keyboard input)? Is

Re: Compiling screensaver for 10.5

2011-04-08 Thread Michael Diehr
On Apr 1, 2011, at 12:13 AM, Gabriel Zachmann wrote: Yeah, that would do it. 3.2.6 didn't completely drop PPC support, but it did drop it from the list of standard architectures. I'm building a .saver file -- in 3.2.5 I was able to build a universal .saver file that worked on 10.4 (PPC),

Re: Compiling screensaver for 10.5

2011-04-08 Thread Nick Zitzmann
On Apr 8, 2011, at 11:35 AM, Michael Diehr wrote: I'm building a .saver file -- in 3.2.5 I was able to build a universal .saver file that worked on 10.4 (PPC), 10.5-10.6 (PPC, 32 bit Intel, and 64 bit Intel). I have the exact same issue: updated XCode to 3.2.6 and now I can't build PPC

Re: Display a Red frame on the screen

2011-04-08 Thread Andreas Mayer
Am 08.04.2011 um 19:24 schrieb eveningnick eveningnick: I was thinking about the window. But then it has to be something with a big hole inside. This hole ought to be transparent for mouse clicks (so if there's something below my window, that 'something' has to be clickable and focused, and

Re: Compiling screensaver for 10.5

2011-04-08 Thread Michael Diehr
On Apr 8, 2011, at 11:00 AM, Nick Zitzmann wrote: Is this perhaps an XCode bug? No. Any ideas what to do here? What's the difference between PBXNativeTarget and PBXProject? Projects and targets can have different configuration settings. Settings assigned to the target apply only

Re: Display a Red frame on the screen

2011-04-08 Thread Peter Lübke
Am 08.04.2011 um 19:24 schrieb eveningnick eveningnick: I was thinking about the window. But then it has to be something with a big hole inside. This hole ought to be transparent for mouse clicks (so if there's something below my window, that 'something' has to be clickable and focused, and

Re: Compiling screensaver for 10.5

2011-04-08 Thread Michael Diehr
Ok, a few issues: Issue 1: Nick, you were right in that I was totally misunderstanding the distinction between Project and Target -- this didn't matter in XCode 3.2.5 since the architecture macros were fine, but in 3.2.6 this changed. It also didn't help that my xcode file name, project

Re: Compiling screensaver for 10.5

2011-04-08 Thread Quincey Morris
On Apr 8, 2011, at 11:14, Michael Diehr wrote: Architectures: i386, x86_64, ppc, ppc64, ppc7400, ppc970 Surely this isn't what you mean. You want 6 architectures in your executable? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Compiling screensaver for 10.5

2011-04-08 Thread Nick Zitzmann
On Apr 8, 2011, at 12:14 PM, Michael Diehr wrote: Ok, you may be right that I'm confused about Target vs. Project settings. However, I'm pretty sure there is an actual bug here: In 3.2.6: * double-click MyProject.xcodeproj in the finder * with the root item selected in GroupsFiles *

Re: Compiling screensaver for 10.5

2011-04-08 Thread Nick Zitzmann
On Apr 8, 2011, at 12:39 PM, Michael Diehr wrote: Issue 2: started getting link errors when trying to build including ppc64. Removed that and now it compiles links just fine. The ppc64 architecture was never actually used by the screen saver engine or framework, so this isn't too

Re: Compiling screensaver for 10.5

2011-04-08 Thread Laurent Daudelin
On Apr 8, 2011, at 11:39, Michael Diehr wrote: Should I just use: archs = i386 x86_64 ppc or perhaps archs = i386 x86_64 ppc ppc7400 ppc970 If I recall correctly, ppc is the basic, G3 architecture which is supported by the G4 and the G5 so even though the generated code would not be

Re: Compiling screensaver for 10.5

2011-04-08 Thread Sherm Pendley
On Fri, Apr 8, 2011 at 2:48 PM, Nick Zitzmann n...@chronosnet.com wrote: ppc. The linker may change this to ppc7400 under certain circumstances. This is normal, and only means that your screen saver will not load on G3 Macs. This has to do with the deployment target, right? That is, it will

Re: Compiling screensaver for 10.5

2011-04-08 Thread Nick Zitzmann
On Apr 8, 2011, at 2:28 PM, Sherm Pendley wrote: This has to do with the deployment target, right? That is, it will be changed to ppc7400 if your deployment target is an OS version that requires a G4 anyway... Correct. Nick Zitzmann http://www.chronosnet.com/

Re: Display a Red frame on the screen

2011-04-08 Thread eveningnick eveningnick
thanks andreas, i'll look at that ___ 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/Unsubscribe/Update your

Test for TCP port

2011-04-08 Thread Heizer, Charles
Hello, What is the best way to test to see if a TCP port is reachable and will answer connections? I was trying to use NSSocketPort and NSConnection but I'm not getting a valid connection. Thanks, Charles NSSocketPort *sendPort = [[NSSocketPort alloc] initRemoteWithTCPPort:3600

Re: Test for TCP port

2011-04-08 Thread Kyle Sluder
On Fri, Apr 8, 2011 at 3:26 PM, Heizer, Charles heiz...@llnl.gov wrote: What is the best way to test to see if a TCP port is reachable and will answer connections? I was trying to use NSSocketPort and NSConnection but I'm not getting a valid connection. The *only* way to correctly determine

CFXMLTreeRef

2011-04-08 Thread koko
I am adding an iOS target to an existing project. I am getting the errors: /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.2.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks/WebServicesCore.framework/Headers/WSMethodInvocation.h:759: error:

NSDateFormatter setDoesRelativeDateFormatting: broken?

2011-04-08 Thread Laurent Daudelin
Is it me or is NSDateFormatter's setDoesRelativeDateFormatting: is broken? Here is the code I use to create a new NSDateFormatter instance: NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] initWithDateFormat:@%Y-%m-%d %H:%M:%S allowNaturalLanguage:YES];

Re: Test for TCP port

2011-04-08 Thread Sherm Pendley
On Fri, Apr 8, 2011 at 6:26 PM, Heizer, Charles heiz...@llnl.gov wrote: What is the best way to test to see if a TCP port is reachable and will answer connections? I was trying to use NSSocketPort and NSConnection but I'm not getting a valid connection. NSSocketPort *sendPort =

Re: Test for TCP port

2011-04-08 Thread Dave Carrigan
On Apr 8, 2011, at 3:26 PM, Heizer, Charles wrote: What is the best way to test to see if a TCP port is reachable and will answer connections? I was trying to use NSSocketPort and NSConnection but I'm not getting a valid connection. You have to connect to it. Unfortunately, neither

Storing a block in a CF/NSMutableDictionary?

2011-04-08 Thread Rick Mann
Hi. In my garbage collection-required app, I'm trying to store a code block (void (^)(void)) in a CFMutableDictionary. The docs says copy/retain/release can be sent to a block, suggesting this can be done. But it's not working. When I later retrieve the block and call it, I get an

Re: NSDateFormatter setDoesRelativeDateFormatting: broken?

2011-04-08 Thread Rick Mann
On Apr 8, 2011, at 16:44 , Laurent Daudelin wrote: NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] initWithDateFormat:@%Y-%m-%d %H:%M:%S allowNaturalLanguage:YES]; My guess would be the format you're initting it with is overriding the relative date setting.

Re: Storing a block in a CF/NSMutableDictionary?

2011-04-08 Thread Dave DeLong
Please post your code. Dave Sent from my iPhone On Apr 8, 2011, at 5:25 PM, Rick Mann rm...@latencyzero.com wrote: Hi. In my garbage collection-required app, I'm trying to store a code block (void (^)(void)) in a CFMutableDictionary. The docs says copy/retain/release can be sent to a

Re: Storing a block in a CF/NSMutableDictionary?

2011-04-08 Thread Kyle Sluder
On Fri, Apr 8, 2011 at 5:25 PM, Rick Mann rm...@latencyzero.com wrote: Hi. In my garbage collection-required app, I'm trying to store a code block (void (^)(void)) in a CFMutableDictionary. The docs says copy/retain/release can be sent to a block, suggesting this can be done. But it's not

Re: Storing a block in a CF/NSMutableDictionary?

2011-04-08 Thread Rick Mann
Hmm. Reading the docs there again, it also says: Typically, you shouldn’t need to copy (or retain) a block. You only need to make a copy when you expect the block to be used after destruction of the scope within which it was declared. Copying moves a block to the heap. So, I expressly copied

Re: NSDateFormatter setDoesRelativeDateFormatting: broken?

2011-04-08 Thread Laurent Daudelin
On Apr 8, 2011, at 17:26, Rick Mann wrote: On Apr 8, 2011, at 16:44 , Laurent Daudelin wrote: NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] initWithDateFormat:@%Y-%m-%d %H:%M:%S allowNaturalLanguage:YES]; My guess would be the format you're initting it

Re: Test for TCP port

2011-04-08 Thread Heizer, Charles
Thanks, This is what I kind of suspected. Are there any wrappers around bsd socket to make it easier? Thanks, Charles On Apr 8, 2011, at 5:17 PM, Dave Carrigan wrote: On Apr 8, 2011, at 3:26 PM, Heizer, Charles wrote: What is the best way to test to see if a TCP port is reachable and

Re: Storing a block in a CF/NSMutableDictionary?

2011-04-08 Thread Kyle Sluder
On Fri, Apr 8, 2011 at 5:56 PM, Rick Mann rm...@latencyzero.com wrote: Hmm. Reading the docs there again, it also says: Typically, you shouldn’t need to copy (or retain) a block. You only need to make a copy when you expect the block to be used after destruction of the scope within which it

Re: Storing a block in a CF/NSMutableDictionary?

2011-04-08 Thread Kyle Sluder
On Fri, Apr 8, 2011 at 9:03 PM, Kyle Sluder kyle.slu...@gmail.com wrote: If you reference a stack variable from your block, you cannot allow that block to escape the scope of that variable. Well, I suppose it's worth mentioning that read-only NSObject variables are okay to use in this fashion