Re: Trouble forking my project

2010-03-24 Thread Eli Bach
On Mar 23, 2010, at 6:48 PM, Graham Cox wrote: I'm having a problem making settings in a new target apply in my code. I'm sure this is really simple and I'm missing something obvious. The point is to permit me to release bugfixes to my existing codebase while moving it forward in a more

NSNotificationCenter and a modal window - a problem

2010-03-24 Thread Alexander Bokovikov
Hi, All, I have a project where a progress of NSTask is indicated through this code: if ([self popup] != nil) anObj = [self popup]; else anObj = self; [[NSNotificationCenter defaultCenter] addObserver:anObj

Re: NSNotificationCenter and a modal window - a problem

2010-03-24 Thread Ken Thomases
On Mar 24, 2010, at 2:11 AM, Alexander Bokovikov wrote: [[NSNotificationCenter defaultCenter] addObserver:anObj selector:@selector(getData:)

Allowing incoming connections.

2010-03-24 Thread John C. Randolph
So, I've got this app that connects to RTSP streams, and I'd rather not nag the user every time it's launched with that Do you wan the application to accept incoming network connections? dialog box. Anyway to have the user authorize it once and have that authorization stick, or is this a

Re: Allowing incoming connections.

2010-03-24 Thread Ken Thomases
On Mar 24, 2010, at 2:50 AM, John C. Randolph wrote: So, I've got this app that connects to RTSP streams, and I'd rather not nag the user every time it's launched with that Do you wan the application to accept incoming network connections? dialog box. Anyway to have the user authorize it

Re: NSNotificationCenter and a modal window - a problem [solved]

2010-03-24 Thread Alexander Bokovikov
On 24.03.2010, at 12:48, Ken Thomases wrote: You need to invoke -readInBackgroundAndNotifyForModes: and pass an array of modes which includes NSModalPanelRunLoopMode (or NSRunLoopCommonModes, which includes NSModalPanelRunLoopMode by default). Many thanks! Really I should look at that

NSSortDescriptor and Block

2010-03-24 Thread Jochen Moeller
Hello List, while experimenting with sorting methods I got a strange error message with -sortDescriptorWithKey:ascending:comparator:. In the following listing (as simple as possible) an Array can be sorted with -sortedArrayUsingDescriptors: with a selector, and -sortedArrayUsingComparator:

Fwd: NSTreeController, NSBrowser image setting

2010-03-24 Thread Tony Romano
From: Tony Romano tony...@hotmail.com Date: March 24, 2010 1:57:04 AM PDT To: Cocoa Developers Cocoa-dev@lists.apple.com Subject: Re: NSTreeController, NSBrowser image setting Thanks Ken, that was somewhat helpful. However, I am still having trouble mapping the arguments passed via(-

Re: Automating Photoshop CS4?

2010-03-24 Thread Bill Cheeseman
On Mar 23, 2010, at 10:10 AM, jyoun...@kc.rr.com jyoun...@kc.rr.com wrote: Just curious if there's any way to automate Adobe Photoshop CS4 with Cocoa/Objective-C? I'm new to this language. I know I can call NSAppleScript, but was just curious if there's another way to control the

How to only get color change messages when the user changes color?

2010-03-24 Thread Gideon King
Hi All I have an NSTextView subclass, and when I make it first responder, it updates the color in the color panel, which causes the color panel to send a changeColor: message. Ditto when I change the selection. In some cases, the color of my text is affected by things other than my textview,

re: NSSortDescriptor and Block

2010-03-24 Thread Ben Trumbull
while experimenting with sorting methods I got a strange error message with -sortDescriptorWithKey:ascending:comparator:. In the following listing (as simple as possible) an Array can be sorted with -sortedArrayUsingDescriptors: with a selector, and -sortedArrayUsingComparator: But

Re: NSSortDescriptor and Block

2010-03-24 Thread Jochen Moeller
Hello Ben, thanks very much for your answer. Your idea with the nil keypath works! So changing the line in question to: NSSortDescriptor *descr3 = [ NSSortDescriptor sortDescriptorWithKey:nil ascending:YES comparator:^NSComparisonResult(id obj1, id obj2) { is sorting the array without

The fastest way to render bitmaps to screen in Cocoa on Snow Leopard?

2010-03-24 Thread Oleg Krupnov
Hi, I need to open a bitmap file, perhaps do some filtering, and render it to the screen with the maximum possible performance. I am allowed to assume Snow Leopard. Now I am a bit confused what technology (-ies) I should use to achieve this in the fastest and easiest, and the most up-to-date

Re: Automating Photoshop CS4?

2010-03-24 Thread Matt Neuburg
On Tue, 23 Mar 2010 14:10:20 +, jyoun...@kc.rr.com said: Just curious if there's any way to automate Adobe Photoshop CS4 with Cocoa/Objective-C? I'm new to this language. I know I can call NSAppleScript, but was just curious if there's another way to control the application? You can use

Can I add my own characters to strings in text fields?

2010-03-24 Thread Jerry Krinock
In presenting technical information I'd often like to display, in a text field, a character which is either not available in the Unicode charts, or looks ugly when rendered by Cocoa. For example, as a shorthand for indicating that 5 items were moved up or down, I'd like to display ↕5. That

Re: Can I add my own characters to strings in text fields?

2010-03-24 Thread Mike Abdullah
Have you tried using an attributed string to render that character at a particular size or font? Rather than resort to an image attachment, it might well allow you to force the arrow to show up as you want it. On 24 Mar 2010, at 14:58, Jerry Krinock wrote: In presenting technical information

Re: Attempt to nest an NSCollectionView fails.

2010-03-24 Thread Kevin Perry
Actually, you can still give this a try. The Leopard-style NSCollectionViewItem was restricted to replicating just the prototype view so the array controller the prototype view was bound to would not be replicated. Since SnowLeopard uses a nib for the prototype view, the entire nib will be

Re: How to eliminate field editor from NSTextField?

2010-03-24 Thread Tron Thomas
I finally figured out how to solve the problem. The problem was when trying to cancel and edit via the cancelOperation method that gets calls. The code as calling the abortEditing method on the NSTextField to cancel the text editing, and it also needed to call setEditable with a value of NO

Re: Can I add my own characters to strings in text fields?

2010-03-24 Thread Jerry Krinock
On 2010 Mar 24, at 08:15, Mike Abdullah wrote: Have you tried using an attributed string to render that character at a particular size or font? Rather than resort to an image attachment, it might well allow you to force the arrow to show up as you want it. Thank you, Mike. Not with this

code folding in NSTextView

2010-03-24 Thread Martin Hewitson
Dear list, I guess this is an old chestnut, but a google search didn't reveal any good clues as how one might go about doing code folding in an NSTextView subclass. So, does anyone have any suggestions how one might implement such a feature? This is for a LaTeX editor so I'm interested in

Layout timing (was Re: setStringValue problems with dynamically loaded views.)

2010-03-24 Thread Kevin Brock
On Mar 17, 2010, at 3:20 PM, Kevin Brock wrote: On Mar 17, 2010, at 2:42 PM, Kyle Sluder wrote: which is designed for just this kind of scenario. NSViewController doesn't have an analog for -windowDidLoad; instead you are expected to override -loadView, call super's implementation, and then

Re: code folding in NSTextView

2010-03-24 Thread Kyle Sluder
On Mar 24, 2010, at 9:46 AM, Martin Hewitson martin.hewit...@aei.mpg.de wrote: So, does anyone have any suggestions how one might implement such a feature? This is for a LaTeX editor so I'm interested in folding blocks of code between, for example, \begin{} \end{} tags, collapsing

Re: Toolbar customizer crashes on Leopard when using menu delegate

2010-03-24 Thread Markus Spoettl
On Mar 23, 2010, at 10:02 PM, Markus Spoettl wrote: My toolbar contains an item hosting a NSPopUpButton which has a menu. That menu contains regular items and a sub-menu which has its delegate assigned to the File's Owner because it's dynamic and needs to be rebuilt each time it is

Re: code folding in NSTextView

2010-03-24 Thread Jon Pugh
At 5:46 PM +0100 3/24/10, Martin Hewitson wrote: I guess this is an old chestnut, but a google search didn't reveal any good clues as how one might go about doing code folding in an NSTextView subclass. I would consider trying to use an NSOutlineView instead. You'd have to identify lines which

Re: code folding in NSTextView

2010-03-24 Thread Kyle Sluder
On Wed, Mar 24, 2010 at 10:18 AM, Jon Pugh jonp...@frostbitefalls.com wrote: I would consider trying to use an NSOutlineView instead.  You'd have to identify lines which could be folded, in order to make them collapsible, but I think it has the basics of what you need. NSOutlineView does not

Re: How to hide new objects in a NSTableView?

2010-03-24 Thread Joanna Carter
Hi folks Well, I have found a very simple way to avoid secondary MOCs or new objects appearing in the table view, whilst adding new objects. My example is to use a modal sheet to allow the editing of a new object. In the NIB for the modal sheet, add a NSObjectController, set it to Class mode,

Re: code folding in NSTextView

2010-03-24 Thread Martin Hewitson
Hi Kyle, I already have the model objects being backed by individual NSTextContainers which then adopt the text view when they need to (using setTextView:). I was just wondering if there are any recommendations how to conceptually handle code folding, especially as I have line numbering. So,

Re: Can I add my own characters to strings in text fields?

2010-03-24 Thread Mike Abdullah
On 24 Mar 2010, at 16:16, Jerry Krinock wrote: On 2010 Mar 24, at 08:15, Mike Abdullah wrote: Have you tried using an attributed string to render that character at a particular size or font? Rather than resort to an image attachment, it might well allow you to force the arrow to show

Re: Can I add my own characters to strings in text fields?

2010-03-24 Thread Kyle Sluder
On Wed, Mar 24, 2010 at 7:58 AM, Jerry Krinock je...@ieee.org wrote: Now I know that I could create a black-and-white graphic which would look much better than that, but I'm a Dummy regarding fonts.  I've read that Unicode has an area for private use.  Is it practical or even possible to

Re: Can I add my own characters to strings in text fields?

2010-03-24 Thread Jerry Krinock
On 2010 Mar 24, at 12:14, Mike Abdullah wrote: Even better, write an NSFormatter subclass which has -attributedStringForObjectValue:withDefaultAttributes: exactly for your sort of scenario. Use the default attributes to create an attributed string from your model string. Then, modify any

Re: Can I add my own characters to strings in text fields?

2010-03-24 Thread Kyle Sluder
On Wed, Mar 24, 2010 at 1:35 PM, Jerry Krinock je...@ieee.org wrote: Can a custom font be accessed from my application package, or do I need an installer (eeek!) to put it into Library/Fonts, as I have seen apps do? You can put the font in your Resources folder and activate it manually,

Re: NSSortDescriptor and Block

2010-03-24 Thread Ben Trumbull
Well, if you need a nil keypath you probably shouldn't be using sort descriptors. The primary value of sort descriptors are (a) the KVC caching and (b) an OO representation of a sort criteria. The standard -sortedArrayUsingComparator: is for blocks like the one you wrote that are completely

Re: Can I add my own characters to strings in text fields?

2010-03-24 Thread Quincey Morris
On Mar 24, 2010, at 13:35, Jerry Krinock wrote: Can a custom font be accessed from my application package, or do I need an installer (eeek!) to put it into Library/Fonts, as I have seen apps do? I presume that the task of creating the font is not related to Cocoa and will search

Re: NSTreeController, NSBrowser image setting

2010-03-24 Thread Tony Romano
I've determined that what I want to do is not possible with using a NSTreeController and a NSBrowser. As I stated below, the willDisplayCell doesn't have the correct parameters to determine the represented object. Notice the cousin to NSBrowser, NSOutlineView, delegate willDisplayCell has the

Re: Trouble forking my project

2010-03-24 Thread Graham Cox
On 24/03/2010, at 5:05 PM, Eli Bach wrote: I can only suggest with the utmost conviction that you actually fork the code base, [as in, have completely separate 'bug fix' and 'radical change' branches]. Either your radical changes will leak into your bug fix version, or you won't be able

Re: Trouble forking my project

2010-03-24 Thread Dave Carrigan
On Mar 24, 2010, at 4:35 PM, Graham Cox wrote: Thanks Eli (and Mike too, who voiced much the same opinion). I guess the term 'fork' in my title was a bit misleading. The change isn't that radical. Basically I want to add a major new feature but in the meantime make it possible to release

Re: Trouble forking my project

2010-03-24 Thread Jon Pugh
At 4:48 PM -0700 3/24/10, Dave Carrigan wrote: Actually, a subversion branch is exactly what you want. Not to start the inevitable version control flamewar, but Subversion's branching is weak in comparison to other systems, except cvs of course. Perforce has strong branching and merging also.

Re: Trouble forking my project

2010-03-24 Thread Kyle Sluder
On Wed, Mar 24, 2010 at 5:10 PM, Jon Pugh jonp...@frostbitefalls.com wrote: Not to start the inevitable version control flamewar, but Subversion's branching is weak in comparison to other systems, except cvs of course.   Perforce has strong branching and merging also. Agreed. I recently had

[Xcode 3.1.4] Step Into broken on Leopard

2010-03-24 Thread Brian Willoughby
Hi folks, I am having trouble with Xcode where the Step Into button in the debugger is acting just like Step Over. One project is newly created under 3.1.4, as a Foundation Tool, and I find that I cannot Step Into any of my Objective C methods. The only workaround is to place

Re: code folding in NSTextView

2010-03-24 Thread Gerriet M. Denkmann
On 25 Mar 2010, at 00:02, Martin Hewitson martin.hewit...@aei.mpg.de wrote: I guess this is an old chestnut, but a google search didn't reveal any good clues as how one might go about doing code folding in an NSTextView subclass. So, does anyone have any suggestions how one might

Re: [Xcode 3.1.4] Step Into broken on Leopard

2010-03-24 Thread Nick Zitzmann
On Mar 24, 2010, at 7:44 PM, Brian Willoughby wrote: Another potentially important detail is that I am running Leopard 10.5.8 on a 1.67 GHz PowerPC G4 PowerBook with 2 GB RAM. Any ideas how to fix this? Do I need an even older release of Xcode 3.x to get proper debugger operations on

Re: Toolbar customizer crashes on Leopard when using menu delegate

2010-03-24 Thread Peter Ammon
Hi Markus, Yes, this is a known problem on Leopard. The issue is that when NSToolbar shows the customization palette, well, a view can't be in the toolbar and the customization palette simultaneously, so NSToolbar copies the popup via NSKeyedArchiver. Unfortunately, NSMenu's encodeWithCoder:

Re: [Xcode 3.1.4] Step Into broken on Leopard

2010-03-24 Thread Gideon King
I sometimes have that problem on Snow Leopard too. Relatively rare, thank goodness, but certainly an issue sometimes. Gideon On 25/03/2010, at 12:17 PM, Nick Zitzmann wrote: On Mar 24, 2010, at 7:44 PM, Brian Willoughby wrote: Another potentially important detail is that I am running

Tooltips over buttons ?

2010-03-24 Thread Bill Hernandez
I've looked for a couple of hours trying to find a simple example on how to implement tooltips over three graphic buttons. I just want to do something simple like show what they do. {add, insert, modify, delete, print, etc}. Actually you can tell pretty much what all the icons do except for the

Re: How to hide new objects in a NSTableView?

2010-03-24 Thread Jerry Krinock
On 2010 Mar 24, at 11:02, Joanna Carter wrote: Well, I have found a very simple way to avoid secondary MOCs or new objects appearing in the table view, whilst adding new objects. My example is to use a modal sheet to allow the editing of a new object and you don't even create the

Re: Tooltips over buttons ?

2010-03-24 Thread Quincey Morris
On Mar 24, 2010, at 21:10, Bill Hernandez wrote: I've looked for a couple of hours trying to find a simple example on how to implement tooltips over three graphic buttons. I just want to do something simple like show what they do. {add, insert, modify, delete, print, etc}. Actually you can

Re: Can I add my own characters to strings in text fields?

2010-03-24 Thread Gerriet M. Denkmann
On 25 Mar 2010, at 10:16, Jerry Krinock je...@ieee.org wrote: The font cascade list is mentioned briefly in Core Text Programming Guide, but there is no clue as to how to access it. Any documentation references on these topics would be appreciated! I have no documentation references but I