Re: Scripting Bridge and System Events

2008-12-27 Thread has
Kevin Wojniak wrote: I am trying to write a method to set the Desktop picture using Scripting Bridge and System Events. [...] The working AppleScript is: set picture of desktop 1 to POSIX file /Some/file.jpg FWIW, running your AppleScript through appscript's ASTranslate tool produces the

How do I include a URL in a preprocessed Info.plist?

2008-12-27 Thread Graham Cox
I'm preprocessing my info.plist file so I can automatically update it with version number, etc. I want to include a URL in my plist (to support Sparkle) but Xcode won't let me. If I include the URL directly, it causes an error (xml parse error). If I define a substitution for it in my

Re: How do I include a URL in a preprocessed Info.plist?

2008-12-27 Thread Andrew Farmer
On 27 Dec 08, at 04:22, Graham Cox wrote: I'm preprocessing my info.plist file so I can automatically update it with version number, etc. I want to include a URL in my plist (to support Sparkle) but Xcode won't let me. If I include the URL directly, it causes an error (xml parse error).

Re: How do I include a URL in a preprocessed Info.plist?

2008-12-27 Thread Graham Cox
On 27 Dec 2008, at 11:27 pm, Andrew Farmer wrote: Does your URL have an ampersand () in it? If so, try escaping it as amp;. No it doesn't - it's just a very straightforward URL like http://mysite.com/path/to/stuff.xml (I also tried quoting the string which makes no difference) --Graham

Re: NSSpeechRecognizer and Speech Recognition calibration

2008-12-27 Thread Ricky Sharp
On Dec 26, 2008, at 4:56 AM, Christopher Corbell wrote: I'm working on an accessibility app for the visually impaired and was hoping to use NSSpeechRecognizer. I've found it extremely difficult to get NSSpeechRecognizer to behave predictably on my system. Does anyone on the list have

Re: How do I include a URL in a preprocessed Info.plist?

2008-12-27 Thread James W. Walker
On Dec 27, 2008, at 7:22 AM, Graham Cox wrote: I'm preprocessing my info.plist file so I can automatically update it with version number, etc. I want to include a URL in my plist (to support Sparkle) but Xcode won't let me. If I include the URL directly, it causes an error (xml parse

RE: How do I include a URL in a preprocessed Info.plist?

2008-12-27 Thread Philippe.Casgrain
Sparkle supports quoted urls in the plist file (I wrote the patch exactly for the problem you are experiencing). In my case, I #define MyURL HTTP://www.myurl.com/myupdate.xml in my pre-processing source file, then use MyURL in the plist file. Works like a charm! Phil

NSColor may not respond to colorWithCalibratedRed

2008-12-27 Thread Joseph Ayers
I'm trying to create a dark green color. In NSColor * darkGreenColor; darkGreenColor = [[NSColor alloc] init]; [[darkGreenColor colorWithCalibratedRed:5.0 green:150.0 blue:15.0 alpha:0.5] set]; I get a compile warning 'NSColor' may not respond to

Re: NSColor may not respond to colorWithCalibratedRed

2008-12-27 Thread jonat...@mugginsoft.com
On 27 Dec 2008, at 14:54, Joseph Ayers wrote: I'm trying to create a dark green color. In NSColor * darkGreenColor; darkGreenColor = [[NSColor alloc] init]; [[darkGreenColor colorWithCalibratedRed:5.0 green:150.0 blue:15.0 alpha:0.5] set]; I get a compile warning

Re: NSColor may not respond to colorWithCalibratedRed

2008-12-27 Thread Ross Carter
try darkGreenColor = [NSColor colorWithCalibratedRed:5.0 green:150.0 blue:15.0 alpha:0.5]; ... and change your arguments so they are between 0.0 and 1.0. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: NSColor may not respond to colorWithCalibratedRed

2008-12-27 Thread Steve Christensen
That's because you're trying to call a class method as an instance method. It's defined as: + (NSColor *)colorWithCalibratedRed:(float)red green:(float)green blue:(float)blue alpha:(float)alpha; which means you'd use it (in your example) like this: [[NSColor colorWithCalibratedRed:5.0

Crash when NSPersistentDocument tries to present error during saveDocument:

2008-12-27 Thread Jerry Krinock
I was hoping someone could give me a clue about what might be causing this repeatable crash I get when saving a (Core Data) NSPersistentDocument: #0 objc_msgSend #1 -[NSDocumentController(NSInternal) _fixedFailureReasonFromError:] #2 -[NSDocument _willPresentSavingError:forOperation:url:] #3

Re: Memory Management question

2008-12-27 Thread Scott Ribe
if it's only been retained once it will only take one release message to trigger dealloc. If an other method releases it without having retained it, that is a bug that should be fixed, not patched up crudely and ineffectively in callers. -- Scott Ribe scott_r...@killerbytes.com

Crash when sorting tree bound to NSOutlineView

2008-12-27 Thread Markus Spoettl
Hi All, I have a problem with an NSOutlineView which crashes deep in the framework (full stack below). The tree structure is bound to the outline and all operations including sort are done on arrays obtained by using -mutableArrayValueForKey: on the respective sub-tree array. Up until

Re: How do I include a URL in a preprocessed Info.plist?

2008-12-27 Thread Gregory Weston
Graham Cox wrote: On 27 Dec 2008, at 11:27 pm, Andrew Farmer wrote: Does your URL have an ampersand () in it? If so, try escaping it as amp;. No it doesn't - it's just a very straightforward URL like http:// mysite.com/path/to/stuff.xml (I also tried quoting the string which makes no

Re: Crash when NSPersistentDocument tries to present error during saveDocument:

2008-12-27 Thread Jerry Krinock
Well, the problem is not in my 200 lines of inserting objects, setting attributes and relationships into the document, because I removed and simply ran this: BmxBk* bmxBk = [documentController openUntitledDocumentAndDisplay:NO

Re: Crash when NSPersistentDocument tries to present error during saveDocument:

2008-12-27 Thread Kyle Sluder
On Sat, Dec 27, 2008 at 4:13 PM, Jerry Krinock je...@ieee.org wrote: BmxBk* bmxBk = [documentController openUntitledDocumentAndDisplay:NO error:error] ; [bmxBk setFileURL:[NSURL fileURLWithPath:docPath]] ; [bmxBk saveDocument:self] ;

Re: Crash when NSPersistentDocument tries to present error during saveDocument:

2008-12-27 Thread Jerry Krinock
Thank you, Kyle. Actually, since - saveToURL:ofType:forSaveOperation:error: has a setFileURL built into it, I don't need setFileURL: So, this works for creating an NSPersistentDocument programatically - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {

Re: How do I include a URL in a preprocessed Info.plist?

2008-12-27 Thread Graham Cox
On 28 Dec 2008, at 6:41 am, Gregory Weston wrote: In a fit of optimism, entered the terms Info.plist and preprocess in Google and found this: http://developer.apple.com/technotes/tn2007/tn2175.html To work around this feature of the C preprocessor, we can pass the - traditional flag to the

Re: Live editing an NSTextView

2008-12-27 Thread Arved von Brasch
Just a follow up: I found that calling my function using performSelector:withObject:afterDelay: allows live editing to work as expected and allows the undo/redo operations to work as expected. It seems the problems with the undo stack only occur if the editing occurs in the same event

Re: Best way to get messages OUT

2008-12-27 Thread Ken Thomases
On Dec 24, 2008, at 2:49 PM, Ashley Perrien wrote: I'm still relatively new to Cocoa (and programming in general) and very new to iPhone but this is more of a general question I've been struggling with. What is the best / most accepted way to get a message out of an object? Have you

CATextLayer not visible when added as a sub-layer . . .

2008-12-27 Thread Michael A. Crawford
I've been using multiple layers to create custom displays for my flight simulator instrumentation. The graphics sub-layers are displaying just fine but when I add a CATextLayer as sub-layer to the top-layer of my NSView, I can't see the text. If I make the CATextLayer the top-layer of

Borderless NSColorWell: bug or feature?

2008-12-27 Thread WT
Hello, I just found by experimenting with NSColorWell objects that merely setting them borderless in IB disables their ability to show the color selection panel. Looking at the NSColorWell class reference document, the Choosing Colors With Color Wells and Color Panels document, and the

Re: Borderless NSColorWell: bug or feature?

2008-12-27 Thread Andy Lee
The border is the part you click to bring up the color panel. If you take away the border, there's nothing to click. --Andy On Dec 28, 2008, at 1:10 AM, WT wrote: Hello, I just found by experimenting with NSColorWell objects that merely setting them borderless in IB disables their

Re: Borderless NSColorWell: bug or feature?

2008-12-27 Thread WT
Hi Andy, thanks for replying to my message. Nothing to click? What about the area inside the border, the part that shows the color the control is set to? Incidentally, I just tried clicking on the very center of a bordered color well and it did show the color panel, so it's not true that

Re: Borderless NSColorWell: bug or feature?

2008-12-27 Thread Andy Lee
On Dec 28, 2008, at 1:37 AM, WT wrote: Nothing to click? What about the area inside the border, the part that shows the color the control is set to? Incidentally, I just tried clicking on the very center of a bordered color well and it did show the color panel, so it's not true that you

NSTableView, NSButtonCell and performClick:

2008-12-27 Thread Ashley Clark
I have an NSTableView with two columns, one is an NSButtonCell checkbox and the other an NSTextFieldCell describing the row. These columns are using bindings and are bound to their appropriate key paths. Earlier in my application's history I could have a row selected and hit the space bar

Discovering host to use in rootProxyForConnectionWithRegisteredName:host:

2008-12-27 Thread Ken Tozier
Hi I'm trying to set up a distributed object client, but can't see any way to get the local domain (not localhost) to use in rootProxyForConnectionWithRegisteredName:host: The documentation for NSConnection states that: The host name. The domain name hostName is an Internet domain name