Re: Access main window of other Applications

2011-04-08 Thread Eric Wing
On 4/7/11, Florian Pilz 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 > following solutions: > >

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 NSLocalizedSt

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 solutions:

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 > wrote: > >> Have you tested using the Zombies Instrument? > I believe so. The executable's environment is "NSZombieEnable = YES" > and "NSAutoreleaseFreedObjectCheckEnabled = YES". Use Instruments

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 arrayWithObject:@"e

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) Pleas

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 fr

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 said: >I am creating CA layers like so: > >CALayer * imgLayer = [CALayer layer]; >imgLayer.contents = (id) image; >imgLayer.contentsGravity = kCAGravityResizeAspect; >imgLayer.delegate = nil; >

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 ha

Re: How To Increment CALayer Retain Count?

2011-04-08 Thread Matt Neuburg
On Thu, 07 Apr 2011 07:15:20 -0400, Jeffrey Walton 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 IBOutlets. Ac

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 a

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 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 > or another fo

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 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 I was to place

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 scr

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 c

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 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 Fr

Re: Class UITableViewCellContentView is implemented in both and . 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 UIKit,

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 b

Re: Class UITableViewCellContentView is implemented in both and . 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 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 http://playcontrol.net

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), 1

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 P

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,

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

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 r

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 name

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 Groups&Fil

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 surp

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

Re: Compiling screensaver for 10.5

2011-04-08 Thread Sherm Pendley
On Fri, Apr 8, 2011 at 2:48 PM, Nick Zitzmann 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 be changed to pp

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 __

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 Sub

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 host:@"test.my

Re: Test for TCP port

2011-04-08 Thread Kyle Sluder
On Fri, 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. The *only* way to correctly determine if a TCP port

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: 'CFXMLTree

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 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 = [[NSSocketPort alloc]

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 NSSoc

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 EXEC_BAD_ACCES

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 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

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 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 working. > When I lat

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 initt

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 a

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 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 was declared. C

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 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 because the compiler

Re: CFXMLTreeRef

2011-04-08 Thread Michael Dautermann
On Apr 8, 2011, at 7:29 PM, koko wrote: > 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/