Re: NSApplicationMain question

2010-04-22 Thread Abhinay Kartik Reddyreddy
Try the NSApplicationDelegate . On Apr 21, 2010, at 6:50 PM, Bill Appleton wrote: > hi all, > > i am converting from carbon to cocoa > > with NSApplicationMain i need to know how to call some startup code before > receiving events use -applicationWillFinishLaunching > and upon quit i nee

Re: NSApplicationMain question

2010-04-22 Thread Abhinay Kartik Reddyreddy
bit confused on the event model > > > > thanks, > > bill > > > > > > > > > On Thu, Apr 22, 2010 at 12:39 PM, Abhinay Kartik Reddyreddy > wrote: > Try the NSApplicationDelegate . > > > On Apr 21, 2010, at 6:50 PM, Bill Appleton wrote:

Re: Seeking a graceful way to end a program

2010-04-29 Thread Abhinay Kartik Reddyreddy
On Apr 29, 2010, at 2:31 PM, Paul Johnson wrote: > I would like to have some guidance on the proper way to 'gracefully' > terminate a program that cannot proceed, for example, when some > critical resource can't be created or doesn't exist. > I guess if you cannot create a critical resource you

Re: baseURL problem with +fileURLWithPath:

2010-05-18 Thread Abhinay Kartik Reddyreddy
On May 18, 2010, at 7:52 AM, Robert Monaghan wrote: > Hi Mike, > > This is pretty trivial.. I have a string that is coming from an FCP XML file. > The string looks like this: > file:/localhost/Users/bob/Movies/ARRI/ELAP/shot_1_2/Imagery/Proxies/DMAG001_1_2_TAKE_005_RAWPROXY720P.mov > > I then

Re: singleton design pattern

2010-05-18 Thread Abhinay Kartik Reddyreddy
On May 18, 2010, at 6:42 PM, Mike Abdullah wrote: > > On 18 May 2010, at 23:28, Alejandro Marcos Aragón wrote: > >> Hi all, >> >> I've been staring at this piece of code now to try to find out what's wrong >> with it and I can't think of anything at this point. I'm trying to have a >> single

Re: singleton design pattern

2010-05-19 Thread Abhinay Kartik Reddyreddy
I have it inside, > I make sure that it's initialized before it's being used. > > aa > > > On May 18, 2010, at 5:58 PM, Abhinay Kartik Reddyreddy wrote: > >> >> On May 18, 2010, at 6:42 PM, Mike Abdullah wrote: >> >>> >>&g

Re: singleton design pattern

2010-05-19 Thread Abhinay Kartik Reddyreddy
Thanks GG. Apologies for the wrong remark. On May 19, 2010, at 6:33 PM, Greg Guerin wrote: > Abhinay Kartik Reddyreddy wrote: > >> everytime you ask for a uniqueInstance it looks like it retrieves a new >> instance not the existing instance... since you set the uniquei

NSTextView editing top-down and right to left.

2010-07-02 Thread Abhinay Kartik Reddyreddy
Hi, I was wondering if its possible to use NSTextView for top-down editing. I could not find a method to set it to top down. Also how do i get the right to left editing working properly [myTextView setBaseWritingDirection:NSWritingDirectionRightToLeft]; this results in a split caret with

Re: trapping each iteration of run loop?

2010-07-09 Thread Abhinay Kartik Reddyreddy
I think CFRunLoopObserver is what you are looking for. http://developer.apple.com/mac/library/documentation/CoreFoundation/Reference/CFRunLoopObserverRef/Reference/reference.html -Kartik On Jul 9, 2010, at 4:14 PM, Scott Ribe wrote: > Is there any way to get some code to run after each ev

Real-Time Validation in a NSTextField.

2010-02-18 Thread Abhinay Kartik Reddyreddy
I have a NSTextField which should only accept numbers in a certain range say (-72000.00 to 72000.00). I tried using NSFormatter whihc worked partially. when i hit any alphabet character on the keyboard, the value in the NSTextField stays numeric but the cursor moves forward which is not desire

Re: Real-Time Validation in a NSTextField.

2010-02-22 Thread Abhinay Kartik Reddyreddy
Thanks James, I wrote a subclass of NSNumberFormatter. It works like a charm. -Cheers, Abhinay On Feb 19, 2010, at 1:15 PM, James Walker wrote: > On 2/18/2010 2:18 PM, Abhinay Kartik Reddyreddy wrote: > >> I was wondering if there is any alternative / better approach >> f

Re: Writing string to pasteboard on 10.5 causes crash

2010-03-01 Thread Abhinay Kartik Reddyreddy
On Mar 1, 2010, at 11:17 AM, jonat...@mugginsoft.com wrote: > > On 1 Mar 2010, at 16:03, Martin Hewitson wrote: > >> Dear list, >> >> I have developed an app on SL but at all times compiled the app for 10.5. >> Today I got my hands on a leopard test machine to try out the app, and I get >> c

Re: xcode-debug style toolbar above editor area

2010-03-03 Thread Abhinay Kartik Reddyreddy
Look for NSToolbar in Interface Builder... On Mar 3, 2010, at 2:01 PM, Mazen M. Abdel-Rahman wrote: > Hi All, > > Thanks to everyone for helping me with my previous question. I had another > one though. > > When in a debugging session in xcode - but not in the main debug view - a > smal

NSScroller and Periodic Events

2010-03-10 Thread Abhinay Kartik Reddyreddy
Hi all, I have an application which uses periodic events to do some computation. The app works fine as long as i dont use a scrollbar. the moment i click a scrollbar it raises exception. The scroller is trying to start periodic events inside [NSScroller trackScrollButtons:]. since the app has a