Re: NS <-> CG Rect Conversion and screen coordinates

2009-03-31 Thread Chris Suter
Hi Trygve, 2009/4/1 Trygve Inda : > Using these two calls: > > NSRect nsRect = [screen frame]; > CGRect cgRect = CGDisplayBounds (displayID); > > I get for my two screens: > > NS    x=0        y=0      w=2560    h=1600  // screen A > CG    x=0        y=0      w=2560    h=1600 > > NS    x=-1920    

NS <-> CG Rect Conversion and screen coordinates

2009-03-31 Thread Trygve Inda
Using these two calls: NSRect nsRect = [screen frame]; CGRect cgRect = CGDisplayBounds (displayID); I get for my two screens: NSx=0y=0 w=2560h=1600 // screen A CGx=0y=0 w=2560h=1600 NSx=-1920y=184w=1920h=1200 // screen B CGx=-1920

Subclassing NSClipView

2009-03-31 Thread Kiel Gillard
Hi all, Bill Dudney provides this sample app to show a CATiledLayer presenting a large image in multiple levels of detail . In his sample code, he implements a rudamentary form of scrolling with the arrow keys. I'd like to sub

Deep thought about "Cannot remove an observer for the key path "count" .."

2009-03-31 Thread Celery01 Lin
Hi , list I'm working a project using a collection view. Everything is OK until I'm using the collection content array's count and indexSet's count to disable or enable some buttons. I've got a array called collectionArray , and a indexSet called collectionIndexSet . I bind the collectionArray to

Re: NSMutableArray is null?

2009-03-31 Thread Pierce Freeman
Thanks Roland, I probably shouldn't - It was just such a beginner's mistake. ;) And as for your mistake, I probably wouldn't have gotten that ever figured out. On 3/31/09 7:45 PM, "Roland King" wrote: > don't beat yourself up too much. > > I spent 30 minutes last night staring at this line of

Re: NSMutableArray is null?

2009-03-31 Thread Roland King
don't beat yourself up too much. I spent 30 minutes last night staring at this line of code and trying to figure out why it wouldn't compile. Checked headers, checked libraries, checked the definition of the function sin(). Pulled out hair by the handful, restarted XCode .. when it finally daw

Re: NSMutableArray is null?

2009-03-31 Thread Pierce Freeman
Hey Roland: Yeah, thanks to yourself and others I finally remembered that you have to "make" the variable somewhere. ;) And I know what a instance variable is, it's just that I couldn't think of the term when writing my original post. On 3/31/09 7:20 PM, "Roland King" wrote: > well no that's

Re: NSMutableArray is null?

2009-03-31 Thread Pierce Freeman
Ken: Note to self, don't go writing to support boards when I am already half asleep. ;) I realize that now, and I understand what instance variables are, just I couldn't think of the name when I was writing my original post. And in my instance variable programming, I forgot that you have to run t

Re: NSMutableArray is null?

2009-03-31 Thread Pierce Freeman
No, I didn't call it that. ;) And in my instance variable programming, I forgot that you have to run that code no matter what. On 3/31/09 7:17 PM, "Chris Suter" wrote: > On Wed, Apr 1, 2009 at 1:16 PM, Pierce Freeman > wrote: >> The global variable is in the Controller.h... Is this what you

Re: NSMutableArray is null?

2009-03-31 Thread Pierce Freeman
In my instance variable programming, I totally forgot that even for instance variables you have to do that code. :) Sorry for any inconvenience for such a stupid question. On 3/31/09 7:17 PM, "Bryan Henry" wrote: > You declared a pointer to an instance of NSMutableArray as an instance > variab

Re: NSMutableArray is null?

2009-03-31 Thread Stephen J. Butler
On Tue, Mar 31, 2009 at 9:16 PM, Pierce Freeman wrote: > The global variable is in the Controller.h... Is this what you are asking > for? @interface Foo : NSObject { NSMutableArray *objects; } @end @implementation Foo - (id) init { if (self = [super init]) { objects = [[NSMutableArray

Re: NSMutableArray is null?

2009-03-31 Thread Roland King
well no that's just the declaration of the NSMutableArray pointer, you have to actually make it somewhere, in the initializer of your Example_Class (and release it somewhere too) And that variable isn't global, it's a class instance variable. You might want to go back to the Objective-C 2.0 Pr

Re: NSMutableArray is null?

2009-03-31 Thread Graham Cox
On 01/04/2009, at 1:16 PM, Pierce Freeman wrote: The global variable is in the Controller.h... Is this what you are asking for? No. Just declaring doesn't actually make an instance of NSMutableArray. You have to write code to do that. Where is it? If you haven't done this, that's your

Re: NSMutableArray is null?

2009-03-31 Thread Ken Thomases
On Mar 31, 2009, at 9:12 PM, Pierce Freeman wrote: Whoops, sorry I didn't put that in... @interface Example_Class : NSObject { IBOutlet NSTableView *tableView; NSMutableArray *globalVariable; } That's not a global variable. It's an instance variable. That's a massive conceptual err

Re: NSMutableArray is null?

2009-03-31 Thread Bryan Henry
You declared a pointer to an instance of NSMutableArray as an instance variable of Example_Class (its in no way global) there, but you didn't create an instance of NSMutableArray. Did you do something like this at some point? globalVariable = [[NSMutableArray alloc] init]; - Bryan On Mar

Re: NSMutableArray is null?

2009-03-31 Thread Chris Suter
On Wed, Apr 1, 2009 at 1:16 PM, Pierce Freeman wrote: > The global variable is in the Controller.h... Is this what you are asking > for? Unless you set globalVariable to something (I do hope you haven't actually called it that BTW), it will remain nil forever. Messages to nil will yield nil. We'

Re: NSMutableArray is null?

2009-03-31 Thread Graham Cox
On 01/04/2009, at 1:12 PM, Pierce Freeman wrote: @interface Example_Class : NSObject { IBOutlet NSTableView *tableView; NSMutableArray *globalVariable; } globalVariable isn't assigned, therefore it's null. --Graham ___ Cocoa-dev mailin

Re: NSMutableArray is null?

2009-03-31 Thread Pierce Freeman
The global variable is in the Controller.h... Is this what you are asking for? On 3/31/09 7:14 PM, "Chris Suter" wrote: > On Wed, Apr 1, 2009 at 1:12 PM, Pierce Freeman > wrote: >> Whoops, sorry I didn't put that in... >> >> @interface Example_Class : NSObject { >> >>    IBOutlet NSTableView

Re: NSMutableArray is null?

2009-03-31 Thread Chris Suter
On Wed, Apr 1, 2009 at 1:12 PM, Pierce Freeman wrote: > Whoops, sorry I didn't put that in... > > @interface Example_Class : NSObject { > >    IBOutlet NSTableView *tableView; >    NSMutableArray *globalVariable; > } :-D You still haven't put it in! Where do you set globalVariable to something?

Re: NSMutableArray is null?

2009-03-31 Thread Pierce Freeman
Whoops, sorry I didn't put that in... @interface Example_Class : NSObject { IBOutlet NSTableView *tableView; NSMutableArray *globalVariable; } On 3/31/09 7:09 PM, "I. Savant" wrote: > >We *can't* assume anything. You left out the most relevant part of > your code: how are you cre

Re: NSMutableArray is null?

2009-03-31 Thread I. Savant
We *can't* assume anything. You left out the most relevant part of your code: how are you creating "globalVariable"? -- I.S. On Mar 31, 2009, at 10:05 PM, Pierce Freeman wrote: Hi everyone: I am having a strange problem with NSMutableArray which is that it doesn't seem to work with

Re: NSMutableArray is null?

2009-03-31 Thread Roland King
where did you allocate and initialize your globalVariable? Pierce Freeman wrote: Hi everyone: I am having a strange problem with NSMutableArray which is that it doesn't seem to work with addObjectsFromArray. I try setting this for a "global variable" (forget what they are called in Cocoa) and

NSMutableArray is null?

2009-03-31 Thread Pierce Freeman
Hi everyone: I am having a strange problem with NSMutableArray which is that it doesn't seem to work with addObjectsFromArray. I try setting this for a "global variable" (forget what they are called in Cocoa) and it just returned null. Here is my code (assuming that global Variable is the global

Re: How do I time a Cocoa app?

2009-03-31 Thread Chris Suter
On Wed, Apr 1, 2009 at 12:53 PM, Debajit Adhikary wrote: > What is an easy way to time a Cocoa application? (Alternatively, any > good way to measure performance would suffice). > > (I have two different frameworks and would like to compare their > performances over some fixed input data) Google:

How do I time a Cocoa app?

2009-03-31 Thread Debajit Adhikary
What is an easy way to time a Cocoa application? (Alternatively, any good way to measure performance would suffice). (I have two different frameworks and would like to compare their performances over some fixed input data) ___ Cocoa-dev mailing list (Co

Re: Measuring time between keypresses?

2009-03-31 Thread Ken Thomases
On Mar 31, 2009, at 8:27 PM, Debajit Adhikary wrote: I'm trying to write an app where I need to accept keypresses, and call a function whenever the user has stopped typing (or when there is a specified delay between keystrokes). How do I measure the time between two keystrokes? Measuring the

Re: Measuring time between keypresses?

2009-03-31 Thread Chris Suter
On Wed, Apr 1, 2009 at 12:27 PM, Debajit Adhikary wrote: > I'm trying to write an app where I need to accept keypresses, and call > a function whenever the user has stopped typing (or when there is a > specified delay between keystrokes). > > How do I measure the time between two keystrokes? Have

Measuring time between keypresses?

2009-03-31 Thread Debajit Adhikary
I'm trying to write an app where I need to accept keypresses, and call a function whenever the user has stopped typing (or when there is a specified delay between keystrokes). How do I measure the time between two keystrokes? ___ Cocoa-dev mailing list

Re: [BUG] Cursor Flicker

2009-03-31 Thread Graham Cox
On 01/04/2009, at 4:46 AM, Eric Gorr wrote: There is a bug when changing from [[NSCursor arrowCursor] set] to a NSCursor based on a 64x64 PNG. Basically, there is some horrible cursor flickering. For a demonstration of this bug, please check out the sample application at: http://ericgor

Re: [NSView noob] How to be detect when a scroll view scrolls its document view

2009-03-31 Thread Graham Cox
On 01/04/2009, at 10:01 AM, Stuart Malin wrote: I have an NSScrollView with a document view that contains many subviews. I need to perform some processing on these views as they become visible or not visible because of scrolling of the ScrollView. I'm sure this must be straightforward to d

Re: Best Strategy to Control iTunes

2009-03-31 Thread Michael Ash
On Tue, Mar 31, 2009 at 3:57 PM, Luca C. wrote: > 2009/3/31 Ammar Ibrahim >> If I want to add a track to iTunes, I need to make sure iTunes is >> responsive. >> >> > Are you sure it is that important? Actually, if you run an AS script wich, > say, opens with the Finder some mp3 files whilst iTune

Re: clarification regarding properties

2009-03-31 Thread Michael Ash
On Tue, Mar 31, 2009 at 3:56 PM, Jeremy Pereira wrote: > If you're a Java programmer, it might help to think of the objective C > property like this: > > bar = self.foo;   // is equivalent to bar = this.getFoo(); > self.foo = bar;   // is equivalent to this.setFoo(bar); Or better, keep it all in

Re: Network Errors

2009-03-31 Thread Michael Ash
On Tue, Mar 31, 2009 at 3:47 PM, Barry Fawthrop wrote: > Writing an app for the iPhone > > (1) In tracing the packet from my app using wireshark >    I see that all UDP packets sent from app to server has >    UDP checksum error.  Why would this be ?   How to adrress this ? My guess would be a fa

Re: How to detect curly quotes

2009-03-31 Thread Greg Guerin
Steve Cronin wrote: I'm reading input from a text file (stringWithContentsOfFile) I have no control over. Testing is going well until a I encounter a phrase is wrapped in curly quotes. (Note phrases wrapped in straight quotes are fine) Without trying to digest the entirety of the Mac OS Tex

Re: (un)mounting volumes

2009-03-31 Thread Torsten Curdt
Wow! there are even... man 2 mount man 2 umount Wasn't aware they exist. Thanks for the pointer! What's the difference to using FSMountServerVolume ? cheers -- Torsten On Tue, Mar 31, 2009 at 01:32, Greg Guerin wrote: > Torsten Curdt wrote: > >> How do I list all mounted volumes (and their

[NSView noob] How to be detect when a scroll view scrolls its document view

2009-03-31 Thread Stuart Malin
I have an NSScrollView with a document view that contains many subviews. I need to perform some processing on these views as they become visible or not visible because of scrolling of the ScrollView. I'm sure this must be straightforward to detect, but alas, I don't have a deep enough under

Re: Shortcut handling in different keyboard layouts

2009-03-31 Thread Eric Schlegel
On Mar 31, 2009, at 2:39 AM, Rimas M. wrote: The code above returns unichar - symbol (!) code 0-65535. While keyboard layout is US for example, pressing "P" (lowercase, without shift or any other modifiers) gives code 112 (ASCII lowercase 'p', ASCII and Unicode 0-255 matches). Meanwhile after s

Re: How to detect curly quotes

2009-03-31 Thread Nick Zitzmann
On Mar 31, 2009, at 4:21 PM, Steve Cronin wrote: Without trying to digest the entirety of the Mac OS Text Encoding system, can someone suggest a simple way to detect these characters? You can use NSScanner with a character set containing quote characters. The ones you probably want are 0x

How to detect curly quotes

2009-03-31 Thread Steve Cronin
Folks; I'm reading input from a text file (stringWithContentsOfFile) I have no control over. Testing is going well until a I encounter a phrase is wrapped in curly quotes. (Note phrases wrapped in straight quotes are fine) Without trying to digest the entirety of the Mac OS Text Encoding

Re: Best way to modify user input into NSTextView

2009-03-31 Thread Kirk Swenson
On Mar 31, 2009, at 8:12 AM, cocoa-dev-requ...@lists.apple.com wrote: From: Zac Samuel Date: March 31, 2009 3:47:26 AM PDT To: cocoa-dev@lists.apple.com Subject: Best way to modify user input into NSTextView I'd like to override the behavior of an NSTextView so that when a certain character

Re: Best Strategy to Control iTunes

2009-03-31 Thread Nate Weaver
On Mar 30, 2009, at 5:44 PM, Ammar Ibrahim wrote: - It's known that if any dialog is open in iTunes it freezes any communication through the scriptable interface, how can I detect that and put all my "messages" in a queue, so that when iTunes is responsive, I can send my messages? W

Re: custom toolbar item autoresizing?

2009-03-31 Thread John Mikros
Thanks for the response! Indeed it works -- there was code later in my - toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar: method that was re-setting the min and max size to the bounds of the view. D'oh! thanks -john On Mar 31, 2009, at 12:36 PM, Peter Ammon wrote: On Mar 31, 20

Re: Processing data maintained with Core Data

2009-03-31 Thread Ben Trumbull
Given your existing code base, and RT constraints, I would suggest you consider pushing changes over to the RT thread in batches. Basically, update the configuration the RT thread is using in response to the NSManagedObjectContextDidSaveNotification. It's sinking in that this might be an even be

Re: Converting non-English date string to NSDate

2009-03-31 Thread Nick Zitzmann
On Mar 31, 2009, at 1:33 PM, Kyle wrote: Is there better way to convert string date values to NSDate values, especially non-English string date values? You could try using NSDateFormatter in 10.0 behavior mode to try and make sense of the natural language string, but if that doesn't work,

Re: Best Strategy to Control iTunes

2009-03-31 Thread Luca C.
2009/3/31 Ammar Ibrahim > > My application will be adding/removing tracks to iTunes. I will not be > controlling playback or anything like that, it's mainly to manipulate the > database and playlists. > If you want that, you may want to use NSAppleScript. > If I want to add a track to iTunes,

Re: clarification regarding properties

2009-03-31 Thread Jeremy Pereira
On 27 Mar 2009, at 18:31, WT wrote: First, thanks to all who responded to my question. On Mar 27, 2009, at 6:34 PM, Quincey Morris wrote: The 'foo' in 'self.foo' is a property. The 'foo' in 'just foo' is *not* a property, but an instance variable. It's really important to know that the tw

Network Errors

2009-03-31 Thread Barry Fawthrop
Writing an app for the iPhone (1) In tracing the packet from my app using wireshark I see that all UDP packets sent from app to server has UDP checksum error. Why would this be ? How to adrress this ? (2) sending a packet it bombs out on the recvmsg(socket, msp_p, flags); Previous

Re: custom toolbar item autoresizing?

2009-03-31 Thread Peter Ammon
On Mar 31, 2009, at 12:16 PM, John Mikros wrote: Hello all, I have a custom view in an NSToolbar. I would like this item to expand as much as possible, similar to NSToolbarFlexibleSpaceItemIdentifier, or similar to the address bar in Safari. I was hoping that setting the min and max s

Converting non-English date string to NSDate

2009-03-31 Thread Kyle
My app imports tab-delimited data, and to convert a string date value to a NSDate value, it uses this method: NSDate *theDate = [NSDate dateWithNaturalLanguageString:theStr locale:[[NSUserDefaults standardUserDefaults] dictionaryRepresentation]]; This works fine for English date strings, b

custom toolbar item autoresizing?

2009-03-31 Thread John Mikros
Hello all, I have a custom view in an NSToolbar. I would like this item to expand as much as possible, similar to NSToolbarFlexibleSpaceItemIdentifier, or similar to the address bar in Safari. I was hoping that setting the min and max size on the NSToolbarItem would cause this to happe

SOLVED: Strange NSCell subclass issue ...

2009-03-31 Thread Mic Pringle
Please ignore this cry for help as it turns out I made a bit of a 'school boy' error. The line [separator drawInRect:NSMakeRect(cellFrame.origin.x, cellFrame.size.height - 10.0f, cellFrame.size.width, 2.0f) fromRect:NSZeroRect operati

Re: Strange NSCell subclass issue ...

2009-03-31 Thread Benjamin Stiglitz
On Tue, Mar 31, 2009 at 07:37:03PM +0100, Mic Pringle wrote: > Hi, > > I have subclassed NSCell and implemented only the following method ... > > - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView > { > NSImage *separator = [NSImage imageNamed:@"Separator.png"]; > [s

Re: Programmatically opened NSPanel not responding to actions

2009-03-31 Thread Benjamin Stiglitz
> I am adding the NSPanel with the addWindowsItem, and display it consequently > with > a deminiaturize call. You should instead just orderFront: the window or showWindow:, depending on whether you have an NSWindowController. -Ben ___ Cocoa-dev mailing

Re: [BUG] Cursor Flicker

2009-03-31 Thread Eric E. Dolecki
For what it's worth, I see the flicker for only about the first second of the app and then it smooths out and seems fine (during that while loop) You do have a warning there on line 25 while ( theEvent = [myWindow nextEventMatchingMask:eventMask] && x < 30 ) { (assignment makes pointer from intege

Programmatically opened NSPanel not responding to actions

2009-03-31 Thread Jan Bernard Marsman
I would like to ask your expert opinion on a very brief issue: In my controller I am constructing an Utility NSPanel with a NSButton component, without a problem, yet any control I add, does not seem to function when using it. Is there a call or binding I need to set before the button appears to fu

Strange NSCell subclass issue ...

2009-03-31 Thread Mic Pringle
Hi, I have subclassed NSCell and implemented only the following method ... - (void)drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { NSImage *separator = [NSImage imageNamed:@"Separator.png"]; [separator setScalesWhenResized:YES]; [separator setFlipped:YES];

Re: Strange cast for CFURLRef

2009-03-31 Thread Patrick Burleson
Forgot to copy list. On Tue, Mar 31, 2009 at 1:12 PM, Jim Correia wrote: > On Mar 31, 2009, at 1:32 PM, Patrick Burleson wrote: > >> I ran into something I don't quite understand and was hoping to get >> some enlightenment. There's a method defined on AudioPlayer that goes >> like this: >> >> - (

Re: Strange cast for CFURLRef

2009-03-31 Thread Jim Correia
On Mar 31, 2009, at 1:32 PM, Patrick Burleson wrote: I ran into something I don't quite understand and was hoping to get some enlightenment. There's a method defined on AudioPlayer that goes like this: - (id) initWithURL: (CFURLRef) fileURL; [...] The question I have is on the line: AudioP

Re: [BUG] Cursor Flicker

2009-03-31 Thread Eric Gorr
On Mar 31, 2009, at 1:51 PM, Eric E. Dolecki wrote: For what it's worth, I see the flicker for only about the first second of the app and then it smooths out and seems fine (during that while loop) Yes, after the while loop ends, it's not going to flicker and that is why is smoothes out.

[BUG] Cursor Flicker

2009-03-31 Thread Eric Gorr
There is a bug when changing from [[NSCursor arrowCursor] set] to a NSCursor based on a 64x64 PNG. Basically, there is some horrible cursor flickering. For a demonstration of this bug, please check out the sample application at: http://ericgorr.net/cocoadev/CursorFlicker.zip I have filed

Strange cast for CFURLRef

2009-03-31 Thread Patrick Burleson
Hello all, I've been going through the SpeakHere sample code from the iPhone SDK and trying to repurpose some of the code for what I'm working on. I ran into something I don't quite understand and was hoping to get some enlightenment. There's a method defined on AudioPlayer that goes like this:

How to animate the drawing of UIImages inside a drawRect: method of a UIView?

2009-03-31 Thread WT
Hello again, in anticipation that the answer to my question might be to add UIImageViews as subviews rather than to draw UIImages from within the superview's drawRect:, I tried the following little test, which works like a charm. The question remains, though, whether this is the right/ bes

CABasicAnimation causes crash on close/order out of window

2009-03-31 Thread Volker in Lists
Hi list, a similar problem was already reported with no answers in january (?) 2009 - layers with CIFilter animations running may crash the app on a window close call. If the animation is not running, no crash happens. I have a Layer-Backed NSScrollView displaying a couple of layers with

Re: Need help for user interface in COCOA + Objective C

2009-03-31 Thread Lyndsey Ferguson
On Mar 31, 2009, at 10:46 AM, Shawn Erickson wrote: On Tue, Mar 31, 2009 at 5:40 AM, Mangesh Kute wrote: Hi, I am using COCOA + Objective C for creating user interface for my application. "Cocoa" Are you sure that he doesn't mean COCOA: Computations in Commutative Algebra (taken fr

Re: NSTextField and clickable links

2009-03-31 Thread Vijay Kanse
Thanks For your reply, I got it work now following thread : http://forums.macrumors.com/showthread.php?t=677713 Thanks. On Tue, Mar 31, 2009 at 9:02 PM, Brandon Walkin wrote: > http://developer.apple.com/qa/qa2006/qa1487.html > > It has to be selectable and allow editing text attributes. >

Re: NSTextField and clickable links

2009-03-31 Thread Brandon Walkin
http://developer.apple.com/qa/qa2006/qa1487.html It has to be selectable and allow editing text attributes. On 31-Mar-09, at 9:15 AM, Vijay Kanse wrote: Hello List, I have successfully set Url to text field with attributed strings. I am not able to get hand cursor on textfield. I am using

How to animate the drawing of UIImages inside a drawRect: method of a UIView?

2009-03-31 Thread WT
Hello, in the drawRect: method of one of my app's UIViews, I'm drawing a grid of images, one per grid point. The code below works great except, of course, that it ignores the animating argument. I would like to animate the drawing by drawing what appears to the user as one image at a time

Thanks!

2009-03-31 Thread James Cicenia
Just wanted to say thanks to this list for being patient with me. My first "public" iPhone was accepted by Apple and is now on the store. What'sFresh is the name of the application. Again, thank you very much. I have found that whether it be cocoa or webobjects the people on these lists are i

Re: Need help for user interface in COCOA + Objective C

2009-03-31 Thread Shawn Erickson
On Tue, Mar 31, 2009 at 5:40 AM, Mangesh Kute wrote: > Hi, > > I am using COCOA + Objective C for creating user interface for my application. "Cocoa" > I created nib for displaying message to user. > When I load this nib from main thread, it works fine. > But when I load it from thread it displa

Re: Need help for user interface in COCOA + Objective C

2009-03-31 Thread Chris Backas
Hello, Short answer is "Use the main thread." Nearly all of AppKit is unsafe to use on secondary threads. Better answer is to read the Thread Programming Guide here: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/Introduction/Introduction.html Good luck, Chris Backa

How to know when a UISwitch is being touched

2009-03-31 Thread Joan Lluch-Zorrilla
I need to know whether the user is touching inside a UISwitch control. The UIControlEvent(s) do fire, but then isTouchInside always gives NO. My code is: - (void)switchTouched:(UIControl *)sender { NSLog( @"switchtouched:%d", [sender isTouchInside]) ; } The switchTouched method was

Best way to modify user input into NSTextView

2009-03-31 Thread Zac Samuel
Hi, I'd like to override the behavior of an NSTextView so that when a certain character is typed, a different character is inserted. For example I'd like "×" to be inserted when the user types "*". This can be done really easily using the shouldChangeTextInRanges:replacementStrings delegate method

Need help for user interface in COCOA + Objective C

2009-03-31 Thread Mangesh Kute
Hi, I am using COCOA + Objective C for creating user interface for my application. I created nib for displaying message to user. When I load this nib from main thread, it works fine. But when I load it from thread it displays blank white window and processor get hogged. For loading nib I am using

NSTextField and clickable links

2009-03-31 Thread Vijay Kanse
Hello List, I have successfully set Url to text field with attributed strings. I am not able to get hand cursor on textfield. I am using this code for clickable link. [thetextfield setAllowsEditingTextAttributes:YES]; NSMutableAttributedString *attrstr = [[NSMutableAttributedString alloc]

Re: Testing iphone application using simulator

2009-03-31 Thread Mahaboob
I was changed the Executable to iphone Simulator(2.2) and Active SDK to Simulator - iphone(2.2) but, it is not working. I'm attaching the screen shot of Overview menu. On 3/31/09 3:38 PM, "WT" wrote: > Make sure you select the correct Executable and Active SDK options > from the "Overview" menu

Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy

2009-03-31 Thread jonat...@mugginsoft.com
On 31 Mar 2009, at 08:16, Ali Ozer wrote: Likely so, and likely one that's fixed already... But the workaround is your best bet for now. Ali For what it's worth I am occasionally seeing similar behaviour when writing to the pasteboard. #pragma warning possible problem here // Progra

Re: Shortcut handling in different keyboard layouts

2009-03-31 Thread Rimas M.
On Tue, Mar 31, 2009 at 3:21 AM, Eric Schlegel wrote: > > You probably want this: [[theEvent characters] characterAtIndex:0]. > > -eric The code above returns unichar - symbol (!) code 0-65535. While keyboard layout is US for example, pressing "P" (lowercase, without shift or any other modifiers)

Testing iphone application using simulator

2009-03-31 Thread Mahaboob
I created one application and is working fine in simulator under debug mode. Now I build the application under Release mode but, it is not opened in simulator.When I'm double click the application it crashes. Is it possible to test the application in simulator? If yes how can I do it? Thanks in ad

Re: EXC_BAD_ACCESS and NSAttributedString driving me crazy

2009-03-31 Thread Ali Ozer
Likely so, and likely one that's fixed already... But the workaround is your best bet for now. Ali 30.Mar.2009 tarihinde 22:32 saatinde, Chris Idou şunları yazdı: That's a good trick to know! When I bracket the calls thus, it crashes in a different but similar place: #0 0x95a8