Re: Conversation-style controls?

2009-04-25 Thread Benjamin Dobson
On 24 Apr 2009, at 15:44:51, Christopher Gillis wrote: How would I go about attaining a conversation-style layout. Tweetie ( http://www.atebits.com/tweetie-mac/ ) is a perfect example of the layout I would like to achieve. I can get something similar by subclassing NSTableView but it seems t

Re: CF autorelease?

2009-04-25 Thread Jean-Daniel Dupas
Le 25 avr. 09 à 07:57, Charles Srstka a écrit : On Apr 23, 2009, at 3:42 PM, Todd Heberlein wrote: Many of the Cocoa object allocation methods automatically do an autorelease before returning the pointer to the object, so I can call something like: foo( [NSString stringWithCString: "bar"

Re: Conversation-style controls?

2009-04-25 Thread Angus Hardie
On 24 Apr 2009, at 15:44, Christopher Gillis wrote: How would I go about attaining a conversation-style layout. Tweetie ( http://www.atebits.com/tweetie-mac/ ) is a perfect example of the layout I would like to achieve. I can get something similar by subclassing NSTableView but it seems to m

How to set tags for ComboBox cell items?

2009-04-25 Thread Arun
Hi All, In my application i use NSComboBoxCell in a table column. The ComboxCell has 3 pre-defined items in the drop down. How can i set tags or identifiers to these pre-defined items so that when user chooses one of the pre-defined items i can know which item he has chosen. I don't to use string

Re: parsing a string into words

2009-04-25 Thread Gerriet M. Denkmann
On 25 Apr 2009, at 09:21, Michael Ash wrote: On Fri, Apr 24, 2009 at 9:24 PM, Gerriet M. Denkmann wrote: I want to parse a string into words. Currently I do: NSString *theString = NSUInteger stringLength = [ theString length ]; NATextView *theTextView = [[NSTextView alloc] initWithFra

Auxiliary background executable without dock icon but with some UI

2009-04-25 Thread Oleg Krupnov
Hi, In my app's bundle I have two executables - the main one and an auxiliary one, launched by the main executable. The aux executable is a Distributed Objects server. In its main() function there's a simple run loop that is intended to accept connection events: while (!shouldTerminate) {

Re: How to clone a mutable dictionary

2009-04-25 Thread Mike Abdullah
On 24 Apr 2009, at 17:56, Steve Cronin wrote: Mike; Thank-you also. The "goodness' just doesn't stop... ;-) My bad on the NSObject code - thanks for clarifying... (How on earth could init yield a copy?) But at the end of your message you say "...there's a reason why Cocoa has both -copy a

Re: [NSOutlineView] _outlineCell and _trackingOutlineCell vs 64-bit

2009-04-25 Thread Iceberg-Dev
On Apr 22, 2009, at 8:16 PM, Corbin Dunn wrote: [...] There is no way to replace the outlinecell How could one then draw the disclosure triangle in white Leopard has a bug with them looking too dark; that is a known issue, and it will be fixed. There is no easy way to make them white,

Re: problems with live resize of NSTextView

2009-04-25 Thread Keary Suska
On Apr 24, 2009, at 3:06 PM, Stuart Malin wrote: I have an NSTextView in a custom view, it is set to resize with the containing view only in the horizontal dimension. When I resize the window, the text view does resize, and it does re-layout its content to fit, both on expanding and shrink

Re: [NSOutlineView] _outlineCell and _trackingOutlineCell vs 64-bit

2009-04-25 Thread Jean-Daniel Dupas
Le 25 avr. 09 à 15:12, Iceberg-Dev a écrit : On Apr 22, 2009, at 8:16 PM, Corbin Dunn wrote: [...] There is no way to replace the outlinecell How could one then draw the disclosure triangle in white Leopard has a bug with them looking too dark; that is a known issue, and it will be fi

figuring out which TableView I am?

2009-04-25 Thread David Scheidt
I've got a sub-class of NSTableView. I have windows that have more than one instance of this TableView in them, which need to behave slightly differently, based on which one they are. (There are three different classes of data that they'll display, and the designer wants the background al

undoMenuTitleForUndoActionName

2009-04-25 Thread norio ota
Hi, I need to localize the undo menu title. I made the subclass of NSUndoManager and overrode two methods: undoMenuTitleForUndoActionName and redoMenuTitleForUndoActionName. Bun they don't get called. Would you tell me who calls the functions and , if possible, how I should do to localize the t

Re: figuring out which TableView I am?

2009-04-25 Thread Dave DeLong
Simple way: have 3 IBOutlets, one for each tableView. In the datasource methods, just do a little bit of pointer comparison to figure out which tableview it is. The tableview requesting information is passed along as the first parameter, so you can easily do something like: if (aTableV

Re: figuring out which TableView I am?

2009-04-25 Thread WT
NSTableView inherits from NSControl, which has methods -tag and - setTag. I would suggest assigning a different tag value to each instance of your NSTableView subclass (you'd do that in your subclass' initializer or -awakeFromNib method) and use the -tag method to identify the instance when

Re: Clicking through a NSView with CALayers

2009-04-25 Thread Rowan Nairn
Hi Volker, I wasn't clear enough in my original question I think. Yes, my view is set up to handle clicks and is doing so just fine. It's the windows of *other* apps underneath my transparent view that I'm worried about. Here's how to reproduce my problem. Create a fullscreen transparent windo

Re: figuring out which TableView I am?

2009-04-25 Thread Dave DeLong
Aha. This makes the -setTag: and IBOutlet methods ineffective. Dave On Apr 25, 2009, at 11:14 AM, David Scheidt wrote: On Apr 25, 2009, at 1:06 PM, Dave DeLong wrote: Simple way: have 3 IBOutlets, one for each tableView. In the datasource methods, just do a little bit of pointer compari

Re: Trying to get flagsChanged: to work

2009-04-25 Thread Dave DeLong
After some more investigation... It seems that the responder chain is not set up during awakeFromNib (even though all the outlets are), because I moved the loop to my addGroup: IBAction, where it printed off my chain. My GroupListController was not in the chain. Shouldn't it be? Doesn't

Re: figuring out which TableView I am?

2009-04-25 Thread David Scheidt
On Apr 25, 2009, at 1:13 PM, WT wrote: NSTableView inherits from NSControl, which has methods -tag and - setTag. I would suggest assigning a different tag value to each instance of your NSTableView subclass (you'd do that in your subclass' initializer or -awakeFromNib method) and use the -t

Re: Trying to get flagsChanged: to work

2009-04-25 Thread Jim Correia
On Sat, Apr 25, 2009 at 1:19 PM, Dave DeLong wrote: > It seems that the responder chain is not set up during awakeFromNib (even > though all the outlets are), because I moved the loop to my addGroup: > IBAction, where it printed off my chain.  My GroupListController was not in > the chain.  Shoul

Re: figuring out which TableView I am?

2009-04-25 Thread WT
On Apr 25, 2009, at 7:26 PM, David Scheidt wrote: On Apr 25, 2009, at 1:13 PM, WT wrote: NSTableView inherits from NSControl, which has methods -tag and - setTag. I would suggest assigning a different tag value to each instance of your NSTableView subclass (you'd do that in your subclass'

Trying to get flagsChanged: to work

2009-04-25 Thread Dave DeLong
Hi everyone, I'm building a master-detail interface with several IB-instantiated NSViewController subclasses. I've got a controller for my group list on the left (GroupListController), a controller for the list of items (ItemListController), and another controller for the selected item (

Re: Trying to get flagsChanged: to work

2009-04-25 Thread Dave DeLong
Interesting. Coming from the world of iPhone dev, this seems wrong to me. On the iPhone, a view's controller is in the chain by default. Putting the following into GroupListController's awakeFromNib made it work just fine: NSResponder * next = [groupList nextResponder]; [g

Re: problems with live resize of NSTextView

2009-04-25 Thread Stuart Malin
On Apr 25, 2009, at 5:08 AM, Keary Suska wrote: On Apr 24, 2009, at 3:06 PM, Stuart Malin wrote: I have an NSTextView in a custom view, it is set to resize with the containing view only in the horizontal dimension. When I resize the window, the text view does resize, and it does re-layout

Re: Dividing NSView to subviews

2009-04-25 Thread Uli Kusterer
On 24.04.2009, at 14:02, Naresh Kongara wrote: Thanks peter for your reply, Now there is some improvement in the performance , but the image is not that much clear as the image we are getting with dataWithPDFInsideRect: is there any way to remove that blur. You're probably drawing the

Re: Dividing NSView to subviews

2009-04-25 Thread Uli Kusterer
On 24.04.2009, at 14:02, Naresh Kongara wrote: Thanks peter for your reply, Now there is some improvement in the performance , but the image is not that much clear as the image we are getting with dataWithPDFInsideRect: is there any way to remove that blur. Oh, forgot to include a link

Re: figuring out which TableView I am?

2009-04-25 Thread David Scheidt
On Apr 25, 2009, at 1:34 PM, WT wrote: On Apr 25, 2009, at 7:26 PM, David Scheidt wrote: On Apr 25, 2009, at 1:13 PM, WT wrote: NSTableView inherits from NSControl, which has methods -tag and - setTag. I would suggest assigning a different tag value to each instance of your NSTableView su

Re: undoMenuTitleForUndoActionName

2009-04-25 Thread Keary Suska
On Apr 25, 2009, at 10:49 AM, norio ota wrote: I need to localize the undo menu title. I made the subclass of NSUndoManager and overrode two methods: undoMenuTitleForUndoActionName and redoMenuTitleForUndoActionName. Bun they don't get called. Would you tell me who calls the functions and , if

Re: parsing a string into words

2009-04-25 Thread Aki Inoue
In AppKit land, -[NSAttributedString doubleClickAtIndex:] would help you. Aki from iPhone On 2009/04/25, at 2:15, "Gerriet M. Denkmann" wrote: On 25 Apr 2009, at 09:21, Michael Ash wrote: On Fri, Apr 24, 2009 at 9:24 PM, Gerriet M. Denkmann wrote: I want to parse a string into wo

Re: problems with live resize of NSTextView

2009-04-25 Thread Keary Suska
On Apr 25, 2009, at 12:05 PM, Stuart Malin wrote: On Apr 25, 2009, at 5:08 AM, Keary Suska wrote: On Apr 24, 2009, at 3:06 PM, Stuart Malin wrote: I have an NSTextView in a custom view, it is set to resize with the containing view only in the horizontal dimension. When I resize the window

Re: problems with live resize of NSTextView

2009-04-25 Thread Stuart Malin
On Apr 25, 2009, at 9:17 AM, Keary Suska wrote: On Apr 25, 2009, at 12:05 PM, Stuart Malin wrote: On Apr 25, 2009, at 5:08 AM, Keary Suska wrote: On Apr 24, 2009, at 3:06 PM, Stuart Malin wrote: I have an NSTextView in a custom view, it is set to resize with the containing view only in t

Re: Trying to get flagsChanged: to work

2009-04-25 Thread Sean McBride
Dave DeLong (davedel...@me.com) on 2009-04-25 1:46 PM said: >Interesting. Coming from the world of iPhone dev, this seems wrong to >me. On the iPhone, a view's controller is in the chain by default. NSViewController was added in 10.5. Perhaps automatically adding it to the chain would have cau

Re: NSButtonCell binds only readonly; Non-bool bindings OK.

2009-04-25 Thread Jerry Krinock
On 2009 Apr 23, at 11:27, Kyle Sluder wrote: Have you instead tried just dynamically unbinding and rebinding the columns in response to your user input? I have now. Thanks, Kyle! -- It took me less than 15 minutes to add that 10 lines of code and trash a whole file of crap I had written.

Re: Clicking through a NSView with CALayers

2009-04-25 Thread Bill Cheeseman
On Apr 25, 2009, at 1:15 PM, Rowan Nairn wrote: Here's how to reproduce my problem. Create a fullscreen transparent window with an empty view and position it over some other app. You'll see that when you click on the transparent area the view ignores the click and lets the app behind be activa

Re: NSButtonCell binds only readonly; Non-bool bindings OK.

2009-04-25 Thread Kyle Sluder
On Sat, Apr 25, 2009 at 5:15 PM, Jerry Krinock wrote: > I have now.  Thanks, Kyle! -- It took me less than 15 minutes to add that 10 > lines of code and trash a whole file of crap I had written.  I'm a fan of > -unbind: now. To me this just seems like the more logical approach. Glad to hear it w

Re: Auxiliary background executable without dock icon but with some UI

2009-04-25 Thread Jerry Krinock
On 2009 Apr 25, at 01:52, Oleg Krupnov wrote: In my app's bundle I have two executables - the main one and an auxiliary one, launched by the main executable Now I want to use the aux executable additionally to show some UI window. I added the corresponding function to the vended objec

Reporting bugs, doc enhancements, API suggestions (was: NSButtonCell binds only readonly; Non-bool bindings OK.)

2009-04-25 Thread WT
On Apr 25, 2009, at 11:29 PM, Kyle Sluder wrote: There's been some discussion on this list in the recent past regarding whether it was more useful to file bugs in radar (bugreport.apple.com) or use the documentation feedback thingy. I can't seem to find the actual discussion now, but remember t

Re: Best technology to use for overlays?

2009-04-25 Thread Daniel Vollmer
On Apr 24, 2009, at 14:34 , Mike Abdullah wrote: Just position your overlay view as a sibling to the scrollview. If you're using NSCollectionView, you're targeting Leopard+, where overlapping views are properly supported. True, but I just remembered I don't see how I can support NSCollec

Re: NSButtonCell binds only readonly; Non-bool bindings OK.

2009-04-25 Thread Jerry Krinock
On 2009 Apr 25, at 14:29, Kyle Sluder wrote: There's been some discussion on this list in the recent past regarding whether it was more useful to file bugs in radar (bugreport.apple.com) or use the documentation feedback thingy. Yes, I'd imagine that a bug report is better. But since I don't

Re: NSButtonCell binds only readonly; Non-bool bindings OK.

2009-04-25 Thread Jean-Daniel Dupas
Le 26 avr. 09 à 00:00, Jerry Krinock a écrit : On 2009 Apr 25, at 14:29, Kyle Sluder wrote: There's been some discussion on this list in the recent past regarding whether it was more useful to file bugs in radar (bugreport.apple.com) or use the documentation feedback thingy. it gave

Why is NSString->FSRef so hard?

2009-04-25 Thread Erg Consultant
I am trying to convert an NSString containing a path to a file directly to an FSRef. If there are no special characters in the path, it's easy - I can go from NSString to CFURL to FSRef. But if the path contains any special characters at all, both CFURL and NSURL creation routines fail. No matt

Re: undoMenuTitleForUndoActionName

2009-04-25 Thread Nor
Keary, Thank you very much. As you said, I didn't want my app to show the expression on those menu items: Undo and Redo by using -setActionName:. I could make it with your kind message. Let me thank you again. Norio 2009/4/26 Keary Suska > On Apr 25, 2009, at 10:49 AM, norio ota wrote: > > I

Re: Why is NSString->FSRef so hard?

2009-04-25 Thread Nick Zitzmann
On Apr 25, 2009, at 5:33 PM, Erg Consultant wrote: Isn't there some easy way to get an FSRef from an NSString that is a path containing special characters? What, specifically, have you tried? I don't think I've ever had +fileURLWithPath: fail on me with a path string, even if the string

Re: Why is NSString->FSRef so hard?

2009-04-25 Thread Michael Ash
On Sat, Apr 25, 2009 at 7:33 PM, Erg Consultant wrote: > I am trying to convert an NSString containing a path to a file directly to an > FSRef. If there are no special characters in the path, it's easy - I can go > from NSString to CFURL to FSRef. > > But if the path contains any special charact

Re: Why is NSString->FSRef so hard?

2009-04-25 Thread Stephen J. Butler
On Sat, Apr 25, 2009 at 6:33 PM, Erg Consultant wrote: > I am trying to convert an NSString containing a path to a file directly to an > FSRef. If there are no special characters in the path, it's easy - I can go > from NSString to CFURL to FSRef. > > But if the path contains any special charact

Re: Auxiliary background executable without dock icon but with some UI

2009-04-25 Thread Ken Thomases
On Apr 25, 2009, at 3:52 AM, Oleg Krupnov wrote: The problem #1 is that although the desired UI window appears, it does not accept mouse and keyboard input. I guess I haven't properly set up the run loop, or window server, but I don't know how to do this for such an auxiliary executable. Any hin

Re: Why is NSString->FSRef so hard?

2009-04-25 Thread Erg Consultant
I was using CFURLGetFSRef passing in the NSString which works fine as long as the path contains no special chars. If it does, CFURLGetFSRef returns nil. Erg From: Nick Zitzmann To: Erg Consultant Cc: cocoa-dev@lists.apple.com Sent: Saturday, April 25, 2009 4

Re: Why is NSString->FSRef so hard?

2009-04-25 Thread Stephen J. Butler
On Sat, Apr 25, 2009 at 7:28 PM, Erg Consultant wrote: > I was using CFURLGetFSRef passing in the NSString which works fine as long as > the path contains no special chars. If it does, CFURLGetFSRef returns nil. CFURLGetFSRef is great if what you have originally is a CF/NSURL. But if you just ha

Re: Why is NSString->FSRef so hard?

2009-04-25 Thread Erg Consultant
When I do that, the conversion from NSString to const UInt8 * path mangles the special characters in the path. From: Stephen J. Butler To: Cocoa-Dev List Sent: Saturday, April 25, 2009 5:48:09 PM Subject: Re: Why is NSString->FSRef so hard? On Sat, Apr 25, 2

Re: Why is NSString->FSRef so hard?

2009-04-25 Thread Steve Christensen
You'd said in an earlier thread that the file path characters are coming from a text file and that you're then storing those in a STL string. The STL string doesn't care what the encoding is since it's just a storage construct. When you try to create a CFString or NSString from those characters,

Re: Why is NSString->FSRef so hard?

2009-04-25 Thread Ken Thomases
On Apr 25, 2009, at 7:28 PM, Erg Consultant wrote: I was using CFURLGetFSRef passing in the NSString which works fine as long as the path contains no special chars. If it does, CFURLGetFSRef returns nil. File path strings aren't URLs. Even a string which looks a bit URL- ish (for example,

Re: Why is NSString->FSRef so hard?

2009-04-25 Thread Michael Ash
On Sat, Apr 25, 2009 at 8:28 PM, Erg Consultant wrote: > I was using CFURLGetFSRef passing in the NSString which works fine as long as > the path contains no special chars. If it does, CFURLGetFSRef returns nil. That's unlikely. CFURLGetFSRef needs a CFURLRef or NSURL, not an NSString. If you w

Re: Why is NSString->FSRef so hard?

2009-04-25 Thread Ken Thomases
On Apr 25, 2009, at 8:03 PM, Erg Consultant wrote: On Apr 25, 2009, at 7:48 PM, Stephen J. Butler wrote: On Sat, Apr 25, 2009 at 7:28 PM, Erg Consultant wrote: I was using CFURLGetFSRef passing in the NSString which works fine as long as the path contains no special chars. If it does, CFU

which technologie for layered sketch/vector-modelling ?

2009-04-25 Thread Stefan
Hi, i need some kind of modelling / sketch "graffling" (like omnigraffle, but simple) and i'm not sure which technologie seems to be the best. what i want to build is a tool to sketch something trivial (textboxes, rectangles, etc) but with different layers and: the objects have to be editabl

Re: which technologie for layered sketch/vector-modelling ?

2009-04-25 Thread Peter Zegelin
Have you looked @DrawKit? http://apptree.net/drawkit.htm regards, Peter On 25/04/2009, at 4:48 AM, Stefan wrote: Hi, i need some kind of modelling / sketch "graffling" (like omnigraffle, but simple) and i'm not sure which technologie seems to be the best. what i want to build is a tool

Re: Clicking through a NSView with CALayers

2009-04-25 Thread Rowan Nairn
On Sat, 25 Apr 2009 at 17:26 AM, Bill Cheeseman wrote: > I have an identical setup on an application I'm currently working on, > and clickthrough works just fine for me. Really? I hope we're talking about the same thing here. I just created a new blank Cocoa Application, and changed the window

Re: NSButtonCell binds only readonly; Non-bool bindings OK.

2009-04-25 Thread Kyle Sluder
Thanks, Jean-Daniel! --Kyle Sluder ___ 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 S

Re: parsing a string into words

2009-04-25 Thread Gerriet M. Denkmann
On 26 Apr 2009, at 02:09, Aki Inoue wrote: In AppKit land, -[NSAttributedString doubleClickAtIndex:] would help you. Thanks a lot! I tested all three methods and found that: 1. NSTextView takes about 900 μsec to parse a Thai sentence into 17 words. 2. NSAttributedString took only 530 μs

Re: parsing a string into words

2009-04-25 Thread Ken Thomases
On Apr 25, 2009, at 10:06 PM, Gerriet M. Denkmann wrote: One question though: why are "version4", "ปี2009" or "ทีมA" all parsed as one word? I would think that the change from letters to numbers, or from Thai to Latin would indicate a word-break. I haven't read it, myself, but the docs for

Multiple cell in a table column

2009-04-25 Thread Arun
Hi All, Is it possible to have multiple Cells in a single table column? I need to have NSTextFiledCell and NSPopUpButtonCell in a single table column. Thanks Arun KA ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reque

Editable PopUpButtons

2009-04-25 Thread Arun
Hi Is the any control which is similar to NSPopUpButtonCell but still editable? Thanks Arun KA ___ 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-

Re: parsing a string into words

2009-04-25 Thread Jeffrey Oleander
NSArray * tokens = [string componentsSeparatedByCharactersInSet: whitespaceCharacterSet]; ___ 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 co

NSTableColumn setHidden: and IB

2009-04-25 Thread David Scheidt
I've got a 10.5 app, which has a bunch of NSTableViews. I'd like to allow the user to choose which columns appear in the tableviews, using a popup contextual menu. so, that should be a simple matter of defining the NSTableColumns, establishing their bindings, making a menu of the table vi

Re: NSTableColumn setHidden: and IB

2009-04-25 Thread Steven Riggs
Make a class with IBOutlets to each tableColumn and in code, tell the tableColumns if they should be hidden. I'm not aware of an IB only solution for this one. Steven Riggs On Apr 26, 2009, at 12:42 AM, David Scheidt wrote: I've got a 10.5 app, which has a bunch of NSTableViews. I'd like

Re: NSTableColumn setHidden: and IB

2009-04-25 Thread David Scheidt
On Apr 26, 2009, at 12:54 AM, Steven Riggs wrote: Make a class with IBOutlets to each tableColumn and in code, tell the tableColumns if they should be hidden. I'm not aware of an IB only solution for this one. That's a better solution than the one that had occurred to me, which was to