Application is not available in the launched applications list.

2010-01-24 Thread Ramesh P
Hi all, My cocoa application is running successfully. But when I use this code NSLog(@"%@",[[NSWorkspace sharedworkspace]launchedapplication]); in another application, it is not printing my application name. What is the problem with my running application? Now I opened the Force Quit in my MAC. The

Re: NSAlert query

2010-01-24 Thread Graham Cox
On 25/01/2010, at 3:27 PM, Poonam Virupaxi Shigihalli wrote: > When alert messages are displayed using runModal, it blocks the thread until > the user clicks on the button. Is there anyway to avoid blocking of the > thread when alert is displayed? NSAlert does not block the thread, it runs mo

Re: Allow only root/admin users to execute the cocoa app

2010-01-24 Thread Gwynne Raskind
On Jan 25, 2010, at 1:47 AM, vincent habchi wrote: >>> I want to allow my cocoa app to be only launched by root/admin users. >>> How can i achieve this? >> As I think has already been mentioned, the UNIX approach is to set the >> application's owner as root and then make it only executable by the

Re: Allow only root/admin users to execute the cocoa app

2010-01-24 Thread vincent habchi
Le 24 janv. 2010 à 22:31, Todd Heberlein a écrit : >> I want to allow my cocoa app to be only launched by root/admin users. >> How can i achieve this? > > As I think has already been mentioned, the UNIX approach is to set the > application's owner as root and then make it only executable by the

Re: How to hook into the Apple clock timer API?

2010-01-24 Thread Matthew Lindfield Seager
On Monday, January 25, 2010, yuqi chang wrote: > I have heard that there are some apps that hook into the Apple processes > that will run in the background (namely, hooking into the Apple clock timer > API) If you want to time activities while your app isn't running (like a GPS or time tracking a

Re: Frame/layout rect

2010-01-24 Thread Kyle Sluder
On Sun, Jan 24, 2010 at 9:24 PM, Jo Meder wrote: > I'm pretty sure I know the answer to this one already, but is anyone aware of > a way to get/set the layout rect for a view? Or get a frame rect from a > layout rect, that sort of thing? This is the same layout rect we see in IB, > which I unde

Frame/layout rect

2010-01-24 Thread Jo Meder
Hi, I'm pretty sure I know the answer to this one already, but is anyone aware of a way to get/set the layout rect for a view? Or get a frame rect from a layout rect, that sort of thing? This is the same layout rect we see in IB, which I understand is only available in IB but which I'm hoping i

Re: Allow only root/admin users to execute the cocoa app

2010-01-24 Thread John Joyce
Just use parental controls on systems that non administrator users log in to. See the help menu. Sent from my iPhone On Jan 24, 2010, at 10:23 PM, cocoa-dev-requ...@lists.apple.com wrote: I want to allow my cocoa app to be only launched by root/admin users. How can i achieve this? As I t

NSAlert query

2010-01-24 Thread Poonam Virupaxi Shigihalli
hi all, When alert messages are displayed using runModal, it blocks the thread until the user clicks on the button. Is there anyway to avoid blocking of the thread when alert is displayed? Regards, Poonam. ___ Cocoa-dev mailing list (Cocoa-dev@lis

Re: NSURL crash

2010-01-24 Thread Jerry Krinock
On 2010 Jan 24, at 19:19, Scott Anguish wrote: > without seeing code, it’s almost impossible to figure out the original > poster’s problem. Another thing the original poster should investigate is whether the crash occurs if and only if the user is running Mac OS 10.5, as the crash report snip

Re: How to hook into the Apple clock timer API? (IPhone)

2010-01-24 Thread Roland King
No. (and if you think there is such an app I'd love to see it .. what's it called?) yuqi chang wrote: I have heard that there are some apps that hook into the Apple processes that will run in the background (namely, hooking into the Apple clock timer API), which will allow some non-UI backgro

How to hook into the Apple clock timer API?

2010-01-24 Thread yuqi chang
I have heard that there are some apps that hook into the Apple processes that will run in the background (namely, hooking into the Apple clock timer API), which will allow some non-UI background process on your 3rd party app to continue to run. Is this legitimate? Supposedly, there are some GPS-tra

Re: NSURL crash

2010-01-24 Thread Scott Anguish
nsurl still lives happily in Foundation. not sure where you’re getting this info from.. without seeing code, it’s almost impossible to figure out the original poster’s problem. On Jan 24, 2010, at 7:45 PM, Nick Zitzmann wrote: > > On Jan 24, 2010, at 3:23 PM, Mac Lancer wrote: > >> As you can

runModalForWindow crash

2010-01-24 Thread Jo Meder
Hi, In my app I'm showing a modal window by calling [NSApp runModalForWindow] with the window. When I want to close the dialog I essentially do this: NSWindow* macWindow = ( NSWindow* )theDialog.GetNativeWindow(); if ( [NSApp modalWindow] == macWindow ) { [NSApp abortModal]; }

Re: NSURL crash

2010-01-24 Thread Nick Zitzmann
On Jan 24, 2010, at 3:23 PM, Mac Lancer wrote: > As you can see it failed to find NSURL symbol. I'm confused as to whether > this could happen. > > Does anyone know what should I do to avoid this? Some linker flags or > something other? NSURL was in the Foundation framework in Leopard and earli

Re: UIButton's Sender Control Events

2010-01-24 Thread Chunk 1978
i meant it's clear that it's not possible with UIControlEvents... or at least not simply so. On Sun, Jan 24, 2010 at 6:35 PM, Graham Cox wrote: > > On 25/01/2010, at 10:22 AM, Chunk 1978 wrote: > >> i wanted to simplify the code (one button per method) by using the >> buttons UIControlEvents of t

Re: UIButton's Sender Control Events

2010-01-24 Thread Graham Cox
On 25/01/2010, at 10:22 AM, Chunk 1978 wrote: > i wanted to simplify the code (one button per method) by using the > buttons UIControlEvents of touchDown and touchUpInside/touchUpOutside > and produce: > > - (IBAction)toggleLight > { > //toggle light > } > > it's clear now that it's not possibl

Re: UIButton's Sender Control Events

2010-01-24 Thread Chunk 1978
what i was requesting information about and trying to accomplish was to simply amalgamate two (or more) methods into one that would be controlled by one button. so instead of having the following: - (IBAction)turnLightOn { //turn light on } - (IBAction)turnLightOFF { //turn light off } i wanted

Re: UIButton's Sender Control Events

2010-01-24 Thread Graham Cox
On 25/01/2010, at 10:12 AM, Chunk 1978 wrote: > so it's considered better to have the following: > > - (IBAction)button1 > { > //button 1 action > } > > - (IBAction)button2 > { > //button 2 action > } > > - (IBAction)button3 > { > //button 3 action > } > . > > than to have the following: > >

Re: UIButton's Sender Control Events

2010-01-24 Thread Chunk 1978
so it's considered better to have the following: - (IBAction)button1 { //button 1 action } - (IBAction)button2 { //button 2 action } - (IBAction)button3 { //button 3 action } . than to have the following: - (IBAction)buttons:(id)sender { switch ([sender tag]) case 1: //button 1 action; break;

NSURL crash

2010-01-24 Thread Mac Lancer
Hello, Gentlemen, One more issue with my application. Some users reported that the application crashes on startup with the following log: Process: AnimalsAndEarth [6617] Path: /Applications/AnimalsAndEarth.app/Contents/MacOS/AnimalsAndEarth Identifier: com.AnimalsAndEarth.AnimalsAndE

Re: UIButton's Sender Control Events

2010-01-24 Thread Graham Cox
On 25/01/2010, at 5:27 AM, Chunk 1978 wrote: > refactoring code so one method for the same button can handle a small > if/else statement could easily be considered more ideal than having > two separate methods. No, not really. This is object-oriented programming, having separate methods is eff

Re: Allow only root/admin users to execute the cocoa app

2010-01-24 Thread Todd Heberlein
> I want to allow my cocoa app to be only launched by root/admin users. > How can i achieve this? As I think has already been mentioned, the UNIX approach is to set the application's owner as root and then make it only executable by the owner. However, Apple largely discourages programmers from

Re: UIButton's Sender Control Events

2010-01-24 Thread Andy Lee
On Jan 24, 2010, at 3:10 PM, Andy Lee wrote: > On Jan 24, 2010, at 2:48 PM, mmalc Crawford wrote: >> On Jan 24, 2010, at 10:27 am, Chunk 1978 wrote: >> >>> refactoring code so one method for the same button can handle a small >>> if/else statement could easily be considered more ideal than having

Re: Coding double modifier global hotkeys?

2010-01-24 Thread Eric Schlegel
On Jan 24, 2010, at 10:11 AM, Sumner Trammell wrote: > It seems that interpreting the events produced by the rapid double > press/release of a modifier key is a way to do double modifier global > hotkey detection...? That sounds like a reasonable approach. I don't know how the other apps do this

Re: UIButton's Sender Control Events

2010-01-24 Thread Andy Lee
On Jan 24, 2010, at 2:48 PM, mmalc Crawford wrote: > On Jan 24, 2010, at 10:27 am, Chunk 1978 wrote: > >> refactoring code so one method for the same button can handle a small >> if/else statement could easily be considered more ideal than having >> two separate methods. >> > No, it couldn't. If

Re: UIButton's Sender Control Events

2010-01-24 Thread mmalc Crawford
On Jan 24, 2010, at 10:27 am, Chunk 1978 wrote: > refactoring code so one method for the same button can handle a small > if/else statement could easily be considered more ideal than having > two separate methods. > No, it couldn't. If you have different actions that should happen in response t

Re: UIButton's Sender Control Events

2010-01-24 Thread Chunk 1978
refactoring code so one method for the same button can handle a small if/else statement could easily be considered more ideal than having two separate methods. i understand your concern, but you haven't provided an answer. in fact, i've searched for hours and i can't find an answer. at this poin

Re: UIButton's Sender Control Events

2010-01-24 Thread Alexander Spohr
If each event needs different action why not program different actions? What is the benefit of having one method containing a big if-else-else construct? atze Am 24.01.2010 um 19:12 schrieb Chunk 1978: > linking several control events to one method is what i'm trying to do, > but i do

Re: UIButton's Sender Control Events

2010-01-24 Thread Chunk 1978
linking several control events to one method is what i'm trying to do, but i do not know how to decipher which control event is calling the method. On Sun, Jan 24, 2010 at 12:12 PM, Tharindu Madushanka wrote: > Hi, > > You can link IBAction method using Interface builder. You can create a link >

Re: Coding double modifier global hotkeys?

2010-01-24 Thread Sumner Trammell
Thanks Eric. I'm not surprised. It seems that interpreting the events produced by the rapid double press/release of a modifier key is a way to do double modifier global hotkey detection...? -s On Sun, Jan 24, 2010 at 12:52 PM, Eric Schlegel wrote: > > On Jan 24, 2010, at 9:17 AM, Sumner Tram

Re: Coding double modifier global hotkeys?

2010-01-24 Thread Eric Schlegel
On Jan 24, 2010, at 9:17 AM, Sumner Trammell wrote: > This code does a fine job of setting up standard "modifier key + > regular key" global hotkeys, but I can't figure out how to do double > modifier hotkeys. For example: > > command-command > option-option The Carbon hotkey API doesn't suppor

Coding double modifier global hotkeys?

2010-01-24 Thread Sumner Trammell
Hi, I've been playing with code to create global hotkeys. I found some sample code here: http://dbachrach.com/blog/2005/11/program-global-hotkeys-in-cocoa-easily (To my dismay, these things require Carbon knowledge, but thanks to the sample code, it seems that I can once again get away with know

UIButton's Sender Control Events

2010-01-24 Thread Chunk 1978
is it not possible to handle a sender's controlEvents inside a single method instead of sending it off to another method? -(IBAction)myButton:(id)sender { if (sender.UIControlEvent = forControlEvents:UIControlEventTouchUpInside) NSLog(@"touchUp"); } ___

Re: Allow only root/admin users to execute the cocoa app

2010-01-24 Thread Clark S. Cox III
Let me say: running Cocoa peograms as root is a *very* bad idea. There are many ways to get code loaded into applications, and if said program is running as root, that code will be running as root as well. Show me a GUI application running as root, and I'll shoe you a trivially compromised

Re: Allow only root/admin users to execute the cocoa app

2010-01-24 Thread Sherm Pendley
On Sun, Jan 24, 2010 at 4:19 AM, Arun wrote: > > I want to allow my cocoa app to be only launched by root/admin users. > How can i achieve this? Use Authorization Services to check for admin authority, and exit if your app doesn't have it.

Bizarre locking issue

2010-01-24 Thread Tom Davie
Hi, I have a project, based on the non-document-based core data application template. I've added a small amount of UI, and a tiny bit of code to fill an NSOutlineView with one item. Since doing so though, I'm getting a bit of an odd error. When my outline view's data is first loaded, I get the

[iPhone] Implementing VOIP for iPhone App

2010-01-24 Thread Tharindu Madushanka
Hi I am currently in 4th year student of University of Moratuwa, Sri Lanka. I am thinking of creating iPhone client and server application (using Java) for my final year project. I have following things in my mind. I would like to have some instructions or guides about this idea specially on possi

Re: QTMovieLayer with CIFilter returning bigger content

2010-01-24 Thread Keith Duncan
On 24 Jan 2010, at 03:03, David Duncan wrote: > On Jan 23, 2010, at 6:06 AM, Keith Duncan wrote: > >> I'm trying to apply CIFilters to images (using CALayer) and movies (using >> QTMovieLayer). However, some of these filters return a bigger image than the >> original content image/movie, such

Re: Call UIWebView From Different Class File.

2010-01-24 Thread Izidor Jerebic
Hi, You can't directly access stuff in separate xib file. You need to pass the url to the second controller, and then the second controller can then do whatever is necessary to show the url in its own xib. izidor On 24.1.2010, at 14:18, Philip Juel Borges wrote: Hi, OBJECTIVE When I

Re: Imitating Behavior of a Sheet Window

2010-01-24 Thread Andreas Mayer
Am 24.01.2010 um 14:04 Uhr schrieb Oleg Krupnov: BTW, to my surprise, it appears that the standard sheets are NOT child windows. That's because sheets are older than child windows. Sheets are available since 10.0, child windows since 10.2. Andreas ___

Re: Imitating Behavior of a Sheet Window

2010-01-24 Thread Oleg Krupnov
Hi Andy, After some failing attempts with child windows, I followed your advice and tried to use the standard sheets again. And this time it worked like a charm! I've got exactly that behavior that I wanted. The focus problem is gone, and the window buttons problem is gone. To suppress the slide d

Re: Allow only root/admin users to execute the cocoa app (PS)

2010-01-24 Thread vincent habchi
Le 24 janv. 2010 à 10:19, Arun a écrit : > Hi All, > > I want to allow my cocoa app to be only launched by root/admin users. > How can i achieve this? Ah, I forgot. If you want also the admin users to launch your app, the owner should be root:admin and permissions should be 774 or you should t

Re: Allow only root/admin users to execute the cocoa app

2010-01-24 Thread vincent habchi
Le 24 janv. 2010 à 10:19, Arun a écrit : > Hi All, > > I want to allow my cocoa app to be only launched by root/admin users. > How can i achieve this? That's Unix, not Cocoa. Either set you app to owner root (chown -R root.wheel myapp) and then chmod to 744 (chmod -R 700 myapp), so that nobody

CFTimeZoneCreate crash when using NSLog

2010-01-24 Thread Mark Woods
One of my customers on OS X 10.5.8 is reporting a crash when my app uses the NSLog command. It seems like his computer is having difficulty timestamping the log, as can be seen from the relevant part of the crash log below: Thread 1 Crashed: 0 libSystem.B.dylib 0x068

Allow only root/admin users to execute the cocoa app

2010-01-24 Thread Arun
Hi All, I want to allow my cocoa app to be only launched by root/admin users. How can i achieve this? Thanks Arun ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the m

Re: Weird exception

2010-01-24 Thread vincent habchi
Dobre dien, privet, poka! Le 24 janv. 2010 à 08:38, Alexander Bokovikov a écrit : > On 24.01.2010, at 1:12, Kyle Sluder wrote: >> You should turn on zombies and run your app in the debugger on 10.4. > > Could you please describe it more particularly, as it's not clear for me what > should I do