Re: Selected text in NSTextField

2012-02-02 Thread Laurent Daudelin
Dany, Start with the documentation. There will be some samples for some methods. That should get you started. There are also some good books available. Don't imagine you can start modifying Cocoa code without any or few knowledge, you're going to burn yourself. Usually, NSAlert are used only

Re: NSDateFormatter not working on iOS 5.

2012-02-02 Thread Peter Edberg
On Jan 31, 2012, at 2:35 PM, cocoa-dev-requ...@lists.apple.com wrote: -- Message: 1 Date: Tue, 31 Jan 2012 14:10:13 -0600 From: Heath Borders heath.bord...@gmail.com To: cocoa-dev cocoa-dev@lists.apple.com Subject: Re:

Multiple Selection in NSComboBoxCell

2012-02-02 Thread Abhijeet Singh
Hi,There are 5 columns in my table view.Col1 Non editable, Col2 NSComboBoxCell (editable), Col3 NSComboBoxCell (editable), Col4 NSComboBoxCell (editable), Col5 NSButtonCellMy requirement is in one of the NSComboBoxCell (col3) I want to give multiple selection option. Can I populate a list

Re: NSDateFormatter not working on iOS 5.

2012-02-02 Thread John Joyce
On Feb 2, 2012, at 2:20 AM, Peter Edberg wrote: On Jan 31, 2012, at 2:35 PM, cocoa-dev-requ...@lists.apple.com wrote: -- Message: 1 Date: Tue, 31 Jan 2012 14:10:13 -0600 From: Heath Borders heath.bord...@gmail.com To:

Re: Multiple Selection in NSComboBoxCell

2012-02-02 Thread Fritz Anderson
[Eliminated cross-post] On 2 Feb 2012, at 5:22 AM, Abhijeet Singh wrote: in one of the NSComboBoxCell (col3) I want to give multiple selection option. Can I populate a list of check boxes inside NSComboBoxCell for multiple selection? NSComboBox(Cell) is not a menu. It is a text field that

Re: PDFView focus ring

2012-02-02 Thread Sean McBride
On Thu, 2 Feb 2012 09:05:14 +1100, Graham Cox said: Some views don't actually implement a focus ring, leaving it to you. This is often the case if the view is typically used for content within a scrollview. Bear in mind also that the focus ring is drawn outside the frame of the view, so there has

Re: How to deactivate an app

2012-02-02 Thread Gerriet M. Denkmann
On 2 Feb 2012, at 00:51, Leo wrote: What happens if you send set frontmost of process yourApp to false then, using the name of your app? Will it reveal the previous app by a chance? It seems that process has to be followed by a number. I tried this in AppleScript Editor: tell

Re: Square NSWindow corners?

2012-02-02 Thread Stephane Sudre
Have you set some special flags in Interface Builder for this window? Is is a NSWindow or a NSPanel? On Thu, Feb 2, 2012 at 2:27 AM, Samuel Williams space.ship.travel...@gmail.com wrote: Hi, I seem to be getting some weird artefacts on my sheets: http://imgur.com/3L8Hk The corners next to

Addressing handlers in the First Responder list of another window ?

2012-02-02 Thread Erik Stainsby
Hello list, I have a context menu in one window (A) from which I need to dispatch to another (B) window's First Responder list. Do I need to bring in a reference to window B (or it's controller) into the nib/code of window A ? This seems to go against loose coupling practices, no? Or should this

Re: Addressing handlers in the First Responder list of another window ?

2012-02-02 Thread Quincey Morris
On Feb 2, 2012, at 11:13 , Erik Stainsby wrote: I have a context menu in one window (A) from which I need to dispatch to another (B) window's First Responder list. Do I need to bring in a reference to window B (or it's controller) into the nib/code of window A ? This seems to go against loose

Restoring custom view scroll position

2012-02-02 Thread Quincey Morris
Has anyone successful implemented Lion window state restoration that properly restores the scroll position for a custom view that's a scroll view's document view? The behavior that seems to break this is changing the frame of the custom view. AFAICT, it goes like this: I have a window nib

Re: Selected text in NSTextField

2012-02-02 Thread Graham Cox
On 31/01/2012, at 7:14 PM, Dany Golubitsky wrote: I am interested in opening NSAlert window that includes editable text field. Well, that's pretty daft :) NSAlert isn't designed for that purpose, so why try to make it fit somewhere it doesn't? Just use NSPanel, you'll find it a lot more

Re: Selected text in NSTextField

2012-02-02 Thread Quincey Morris
On Feb 2, 2012, at 14:23 , Graham Cox wrote: On 31/01/2012, at 7:14 PM, Dany Golubitsky wrote: I am interested in opening NSAlert window that includes editable text field. Well, that's pretty daft :) NSAlert isn't designed for that purpose, so why try to make it fit somewhere it

ARC and 10.6

2012-02-02 Thread Georg Seifert
Hi, I try to convert my app to use xCode 4.2 and ARC. My app uses several custom frameworks and plugins. I used the migration tool to enable ARC for all of them. As I still want to support Snow Leopard, I set the SDKROOT to 10.7 and the Deployment Target to 10.6. But if I do that, on the

Re: Selected text in NSTextField

2012-02-02 Thread Graham Cox
On 03/02/2012, at 9:37 AM, Quincey Morris wrote: You're the second person who's scorned the idea of adding things to an alert. In fact, NSAlert is explicitly designed to allow adding controls via an accessory subview:

Re: ARC and 10.6

2012-02-02 Thread Greg Parker
On Feb 2, 2012, at 2:51 PM, Georg Seifert georg.seif...@gmx.de wrote: I try to convert my app to use xCode 4.2 and ARC. My app uses several custom frameworks and plugins. I used the migration tool to enable ARC for all of them. As I still want to support Snow Leopard, I set the SDKROOT to

Re: Selected text in NSTextField

2012-02-02 Thread Dave Fernandes
I'm still a little unclear on when to use an NSWindow and when to use an NSPanel. I thought you used an NSPanel if you did *not* want it to become key. But for input, you do want it to become key, don't you? I'm sure I've missed some basic Cocoa 101 here, but I found the docs clear as mud on

Re: Selected text in NSTextField

2012-02-02 Thread Graham Cox
NSPanel inherits NSWindow. If you look at the methods that NSPanel adds to NSWindow, it's really a very small set. It allows: a) the window to be a floating window b) it allows the window to not become key unless necessary, which is very useful to prevent a floater from stealing focus away

Re: Selected text in NSTextField

2012-02-02 Thread Dave Fernandes
I see. I've been having trouble forcing an NSTextField to get focus in document-modal sheets, and I wondered whether NSPanel/NSWindow should make a difference. (Experimentally it does not.) I found on Snow Leopard that the following always worked: [sheetController window]; // load the NIB

Re: Selected text in NSTextField

2012-02-02 Thread Jens Alfke
On Feb 2, 2012, at 4:10 PM, Graham Cox wrote: NSPanel inherits NSWindow. If you look at the methods that NSPanel adds to NSWindow, it's really a very small set. Another difference is that NSPanels don’t become ‘main’. The primary effect of this is that the frontmost document (i.e.

Re: Selected text in NSTextField

2012-02-02 Thread Graham Cox
On 03/02/2012, at 11:39 AM, Dave Fernandes wrote: Am I trying the right things here? It should just work if you set the 'initialFirstResponder' outlet to be your text field. No other code needed, except possibly NOT calling -setBecomesKeyOnlyIfNeeded:YES. The docs suggest this is only

Re: Restoring custom view scroll position

2012-02-02 Thread Quincey Morris
On Feb 2, 2012, at 14:06 , Quincey Morris wrote: I have a window nib that contains a scroll view controlling a custom view. This custom view has an essentially arbitrary size in the nib -- it's resized at window load time to a suitable size. (It's a kind of canvas, so its size depends on

NSTextView

2012-02-02 Thread koko
I want to get the data that is entered into an NSTextView and convert it to a null terminated C string. Is there a quick way to get the text or do I have to get the storage container, get the characters and process the characters array? IS there not an 'easy' way? -koko

Re: NSTextView

2012-02-02 Thread Graham Cox
On 03/02/2012, at 12:34 PM, koko wrote: IS there not an 'easy' way? theString = [theTextView string]; followed by [theString cStringUsingEncoding:] how mush easier could it be? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Selected text in NSTextField

2012-02-02 Thread Dave Fernandes
On 2012-02-02, at 8:11 PM, Graham Cox wrote: On 03/02/2012, at 11:39 AM, Dave Fernandes wrote: Am I trying the right things here? It should just work if you set the 'initialFirstResponder' outlet to be your text field. No other code needed, except possibly NOT calling

Re: Re: Multiple Selection in NSComboBoxCell

2012-02-02 Thread Abhijeet Singh
Earlier I used to work on Windows platform. On Windows I have seen interface in that we can have list of check boxes inside combo box. So I thought I might have done something similar here. If not NSComboBoxCell please suggest how can i give multiple selection option inside NSTableView cell

Re: Re: Multiple Selection in NSComboBoxCell

2012-02-02 Thread Abhijeet Singh
Beside NSPopupButtonCell Is there any other control that i can use in place of NSComboBoxCell.Earlier I was using NSPopupButtonCell only. But the problem was by default in Cocoa applications NSPopupButton doesnt respond to Tab key press on Keyboard. We have to change the Keybaord settings in