Surprise: -[NSInvocation retainArguments] also Autoreleases them

2009-07-31 Thread Jerry Krinock
The document for -[NSInvocation retainArguments] tells me: "If the receiver hasn’t already done so, retains the target and all object arguments of the receiver and copies all of its C-string arguments. ... Newly created NSInvocations don’t retain or copy their arguments, nor do they retain

Re: Core Data App With Auxiliary Panel

2009-07-31 Thread Quincey Morris
On Jul 31, 2009, at 20:03, Richard Somers wrote: I am having problems binding an auxiliary panel with the document's managed object context. The panel is in nib separate from the document nib. My code looks like this. @interface AuxPanelController : NSWindowController { @private NSManage

Re: How do I delete NSCollectionView item on right click?

2009-07-31 Thread Graham Cox
On 01/08/2009, at 4:12 PM, Graham Cox wrote: I've got an NSCollectionView with the prototype view subclassed and I'm overriding menuForEvent. I'm creating a menu that has Edit/ Delete and when the user clicks Delete I want to remove that collection view item. Where would you put the selec

Re: How do I delete NSCollectionView item on right click?

2009-07-31 Thread Graham Cox
On 01/08/2009, at 1:11 PM, Austin Grigg wrote: I've got an NSCollectionView with the prototype view subclassed and I'm overriding menuForEvent. I'm creating a menu that has Edit/ Delete and when the user clicks Delete I want to remove that collection view item. Where would you put the sel

Re: Core Data App With Auxiliary Panel

2009-07-31 Thread Kyle Sluder
Because you have a managedObjectContext ivar, you never change its value so it defaults to nil, and +[NSObject(NSKeyValueCoding) accessInstanceVariablesDirectly] returns YES, -[AuxPanelController objectForKey:@"managedObjectContext"] will always return nil. Ditch the ivar. Need to corr

Re: How to change focus ring color?

2009-07-31 Thread Alexander Bokovikov
On 01.08.2009, at 4:42, Joel Norvell wrote: You didn't say what objects you are drawing, so I should add this caveat: I'm not sure what variations, if any, would be induced by generalizing my approach to NSCell objects. OK, maybe I provided not so clear problem description. I have _stan

Re: Core Data App With Auxiliary Panel

2009-07-31 Thread Kyle Sluder
On Jul 31, 2009, at 9:58 PM, Richard Somers wrote: My code here came out of Hillegass Third Edition Chapter 12. I will need to think about this. Doesn't matter; you must be prepared for super's initializer to return a different object (with the possible exception of -[NSObject init], b

Re: The mystery of the missing inverse relationship (was: Re: Fun (or not) with NSArrayControllers and CoreData.)

2009-07-31 Thread Quincey Morris
On Jul 31, 2009, at 17:19, Daniel DeCovnick wrote: I can put these in any included .h file, right? I don't have a custom subclass of Folder at all at the moment. I meant as a category of Folder -- which is a "custom subclass" of NSManagedObject in Core Data terminology. So, Folder.h (or wha

Re: IPhone Textview question

2009-07-31 Thread Luke Hiesterman
I'd make sure your tester is using at least os 3.0. I seem to recall slow typing issues in 2.x Luke Sent from my iPhone. On Jul 31, 2009, at 9:20 PM, Development wrote: I'm working on an app and it is fairly large. well... maybe not it's about 1.1 megs. I save as much memory as I can b

Re: Core Data App With Auxiliary Panel

2009-07-31 Thread Richard Somers
On Jul 31, 2009, at 9:33 PM, Kyle Sluder wrote: Unrelated note: you need to assign self = [super initWithWindowName: …]. My code here came out of Hillegass Third Edition Chapter 12. I will need to think about this. Because you have a managedObjectContext ivar, you never change its value

Re: How to set the name of open-with application for a specific file?

2009-07-31 Thread Jerry Krinock
On 2009 Jul 31, at 06:00, MATSUMOTO Satoshi wrote: I want to do this programmatically. I don't know if there are API to do this programatically or not. Search Xcode documentation for functions that "Start With" "LS". ___ Cocoa-dev mailing lis

IPhone Textview question

2009-07-31 Thread Development
I'm working on an app and it is fairly large. well... maybe not it's about 1.1 megs. I save as much memory as I can but I think its not enough. When typing in text fields and text views I get this strange lag in the keys. Do any of you happen to know what might cause this? I've turned off a

Re: Core Data App With Auxiliary Panel

2009-07-31 Thread Kyle Sluder
On Jul 31, 2009, at 8:03 PM, Richard Somers wrote: @interface AuxPanelController : NSWindowController { @private NSManagedObjectContext *managedObjectContext; } @implementation AuxPanelController - (id)init { if (![super initWithWindowNibName:@"AuxPanel"]) Unrelated note: you need t

How do I delete NSCollectionView item on right click?

2009-07-31 Thread Austin Grigg
I've got an NSCollectionView with the prototype view subclassed and I'm overriding menuForEvent. I'm creating a menu that has Edit/Delete and when the user clicks Delete I want to remove that collection view item. Where would you put the selector for the Delete menu item, and how would yo

Core Data App With Auxiliary Panel

2009-07-31 Thread Richard Somers
I am having problems binding an auxiliary panel with the document's managed object context. The panel is in nib separate from the document nib. My code looks like this. @interface AuxPanelController : NSWindowController { @private NSManagedObjectContext *managedObjectContext; } @implemen

Re: incorrect checksum for freed object

2009-07-31 Thread Shawn Erickson
On Fri, Jul 31, 2009 at 3:39 PM, kvic...@pobox.com wrote: > where interface and device are declared as follows: >       �...@property ( assign, nonatomic)  IOUSBDeviceInterface300** device; >       �...@property ( assign, nonatomic)  IOUSBInterfaceInterface300** > interface; Why are you use a poi

Re: Comparing NSImages

2009-07-31 Thread John C. Randolph
I wrote a sample project to find the difference image between to given images several years ago. You can find that code here: http://developer.apple.com/samplecode/Image_Difference/index.html These days, I'd do this kind thing in a Quartz Composer view. -jcr ___

The mystery of the missing inverse relationship (was: Re: Fun (or not) with NSArrayControllers and CoreData.)

2009-07-31 Thread Daniel DeCovnick
On Jul 31, 2009, at 3:41 PM, Quincey Morris wrote: Still, it's slightly disconcerting that setting the property doesn't set the inverse relationship. How are you supposed to change it later? I believe it *was* setting the inverse correctly, just not KVO- compliantly. That is, your data m

Ye Olde AEIdleProcPtr

2009-07-31 Thread Eric Long
Hi, In days of yore, when sending an AppleEvent with AESend, you could use an AE idleProc to allow for cancelling the event if you had reason to bail. The parameters also pass you an EventRecord and you are expected to handle window update events. Now, I have a Cocoa app that has to send an Apple

Re: incorrect checksum for freed object

2009-07-31 Thread kvic...@pobox.com
At 5:01 PM -0600 7/31/09, Nick Zitzmann wrote: On Jul 31, 2009, at 4:39 PM, kvic...@pobox.com wrote: these errors don't happen every time and i've yet to be able to determine a pattern that causes them. i realize that this is some sort of memory corruption problem, but i'm at a loss as to how

Re: incorrect checksum for freed object

2009-07-31 Thread Nick Zitzmann
On Jul 31, 2009, at 4:39 PM, kvic...@pobox.com wrote: these errors don't happen every time and i've yet to be able to determine a pattern that causes them. i realize that this is some sort of memory corruption problem, but i'm at a loss as to how to find it. i do have NSZombieEnabled set t

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-31 Thread Quincey Morris
On Jul 31, 2009, at 15:11, Daniel DeCovnick wrote: That worked! The result was wrong, but making the rootFolder relationship into rootFolders and making it to-many, changing getRootFolder to -(NSArray *)allContainingFolders, and sending everything in that the addAllDescendantsJobsObject: me

incorrect checksum for freed object

2009-07-31 Thread kvic...@pobox.com
(i'm not sure if this is the right list for this question or not, as i am developing a cocoa application using IOKit. if this isn't the right list, could someone please tell me the right list. thanx.) i'm just starting on developing a core data document base app that talks to a usb device. som

[MEET] August CocoaHeads Mac Developer Meetings

2009-07-31 Thread Stephen Zyszkiewicz
Greetings, CocoaHeads is an international Mac programmer's group. Meetings are free and open to the public. We specialize in Cocoa, but everything Mac programming related is welcome. Upcoming meetings: Australia Sydney- Thursday, August 6, 2009 18:30. Canada Ottawa/Gatineau- Thursday, Augu

Re: What is going on with CALayer

2009-07-31 Thread Agha Khan
You made me happy man. :-) Best regards Agha Khan On Jul 31, 2009, at 3:18 PM, Luke the Hiesterman wrote: Did you include QuartzCore in your project's linked frameworks? Luke On Jul 31, 2009, at 3:18 PM, Agha Khan wrote: HI: This is very strange problem. This code works fine with OS 2.2 but

Re: What is going on with CALayer

2009-07-31 Thread Nick Zitzmann
On Jul 31, 2009, at 4:18 PM, Agha Khan wrote: This code works fine with OS 2.2 but does not work with OS 3.x Can someone point me why it failed? [...] ".objc_class_name_CALayer", referenced from: ".objc_class_name_NumberLayer in NumberLayer.o symble(s) not found collect2: Id returned 1 exit s

Re: What is going on with CALayer

2009-07-31 Thread Luke the Hiesterman
Did you include QuartzCore in your project's linked frameworks? Luke On Jul 31, 2009, at 3:18 PM, Agha Khan wrote: HI: This is very strange problem. This code works fine with OS 2.2 but does not work with OS 3.x Can someone point me why it failed? Your help will be very much appreciated. Best

What is going on with CALayer

2009-07-31 Thread Agha Khan
HI: This is very strange problem. This code works fine with OS 2.2 but does not work with OS 3.x Can someone point me why it failed? Your help will be very much appreciated. Best regards -Agha But why? // NumberLayer.h #import #import @interface NumberLayer: CALayer { } @end and now Numbe

Re: NSTabView Tutorial

2009-07-31 Thread Boyd Collier
A couple of years ago, I made a copy of MultipleNibTabView to play around with in learning how to use tab views. I still have this (slightly modified) copy but couldn't find the original version from Apple on my computer. However, if you'd like a copy of the version that I have, I'd be ha

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-31 Thread Daniel DeCovnick
On Jul 31, 2009, at 2:26 PM, Quincey Morris wrote: On Jul 31, 2009, at 10:33, Daniel DeCovnick wrote: -(IBAction)newJob:(id)sender { id folder = [self currentFolder]; CCCEJob *newJob = [NSEntityDescription insertNewObjectForEntityForName:@"CCCEJob" inManagedObjectContext: [self ma

Re: How to change focus ring color?

2009-07-31 Thread Joel Norvell
Alexander, If you're drawing the focus ring yourself, you can change its color by setting it in the NSGraphicsContext that's active while it's being drawn. I draw NSView/NSControl focus rings by hand in one of my apps. I've posted the code that does this, below. I'm not changing the color of

Re: NSTabView Tutorial

2009-07-31 Thread Andy Lee
How about the examples linked to in the documentation? (See "Related sample code".) I don't know anything about them, but thought you might have overlooked them since you d

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-31 Thread Quincey Morris
On Jul 31, 2009, at 10:33, Daniel DeCovnick wrote: -(IBAction)newJob:(id)sender { id folder = [self currentFolder]; CCCEJob *newJob = [NSEntityDescription insertNewObjectForEntityForName:@"CCCEJob" inManagedObjectContext: [self managedObjectContext]]; [folder addJobsObject:n

Re: Hyperlinks in NSAttributedString?

2009-07-31 Thread James Walker
Rick Mann wrote: I may have found what I needed here: http://developer.apple.com/qa/qa2006/qa1487.html That QA omits the possibility of using NSCursorAttributeName to make the cursor change when you mouse over the link. However, to do that you need NSTextView, not NSTextField. -- James

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-31 Thread Daniel DeCovnick
On Jul 31, 2009, at 11:01 AM, Quincey Morris wrote: On Jul 31, 2009, at 10:33, Daniel DeCovnick wrote: What is selected in FolderTreeController's outline view? Your code above implies that you select a non-root folder prior to adding a new job (to the non-root folder). The "allDescendantsJ

Re: Exception-like behavior in save panel used for file choose

2009-07-31 Thread Kyle Sluder
On Fri, Jul 31, 2009 at 9:26 AM, Greg Titus wrote: > Typo there... it's objc_exception_throw(). Oops. Thanks Greg. *grumbles about mixed underscore vs. camel -case conventions* --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

Re: How to change focus ring color?

2009-07-31 Thread Kyle Sluder
On Fri, Jul 31, 2009 at 12:07 PM, Alexander Bokovikov wrote: > I can't find how I could change the focus ring color, for example, of > NSPathControl. The IB only lets me disable it. Is the color defined by the > color scheme hardly? Focus rings are drawn in the user's specified selection color. -

NSTabView Tutorial

2009-07-31 Thread Thomas Wetmore
I'm looking for a simple NSTabView tutorial. I've found references to the MultipleNIBTabView tutorial but I can't find it in the current Xcode Examples area or at the Developer site. Anyone know where it is located, or whether there is another tutorial around? Thanks, Tom Wetmore _

How to change focus ring color?

2009-07-31 Thread Alexander Bokovikov
Hi, All, I can't find how I could change the focus ring color, for example, of NSPathControl. The IB only lets me disable it. Is the color defined by the color scheme hardly? Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Application Preferences - a general question

2009-07-31 Thread Alexander Bokovikov
On 31.07.2009, at 23:09, Daniel DeCovnick wrote: Correct in practice, although the principle is more that preferences shouldn't be that onerous to change back to how they were. The lack of needing to click "Apply" helps here too: since each change is reflected instantly, if something goes

Re: Stumped by EXEC_BAD_ACCESS

2009-07-31 Thread Greg Parker
On Jul 30, 2009, at 1:37 PM, David Blanton wrote: When I quit my application it ends as expected. When I close the last window I get the EXEC_BAD_ACCESS message. Following Greg Parker's 2006 post at CocoaBuilder I get the following which according to that post respondsToSelector:" is being

Re: local statics, GC, and strong references

2009-07-31 Thread Quincey Morris
On Jul 31, 2009, at 10:30, Sean McBride wrote: Is there anything wrong with the below, in a GC app? - (void)drawRect:(NSRect)inRect { // Create the colour only once. static NSColor* colour = nil; if (!colour) { colour = [NSColor colorWith...]

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-31 Thread Quincey Morris
On Jul 31, 2009, at 10:33, Daniel DeCovnick wrote: If I unbind the Content Set of the JobArrayController (so I see all Jobs) adding some extra table columns showing the Folder name and root Folder name, adding and removing Jobs works fine (the data shows up in the table, and the Folder and

Re: Fun (or not) with NSArrayControllers and CoreData.

2009-07-31 Thread Daniel DeCovnick
Try this: -- Add an "allDescendantJobs" Core Data to-many relationship to the Folder entity in your Core Data model. Set its delete rule to Nullify. -- Add a "rootFolder" Core Data to-one relationship to the Job entity, and make it the inverse of "allDescendantJobs". Set its delete rule

Re: Application Preferences - a general question

2009-07-31 Thread Daniel DeCovnick
Correct in practice, although the principle is more that preferences shouldn't be that onerous to change back to how they were. The lack of needing to click "Apply" helps here too: since each change is reflected instantly, if something goes horribly wrong, the user knows EXACTLY what made i

Re: Application Preferences - a general question

2009-07-31 Thread Alex Kac
Typically I think a Mac user expects to be able to return to a previously saved value by using Undo. On Jul 31, 2009, at 11:54 AM, Alexander Bokovikov wrote: Hi, All, Hope this is not an offtopic here... I'm quite new in Mac world, and one of essential differences from Windows, which I've

Re: Exception-like behavior in save panel used for file choose

2009-07-31 Thread Quincey Morris
On Jul 30, 2009, at 23:04, Barry Press wrote: NSString *sFile = [textLogPath stringValue];; // stringByStandardizingPath; NSString *sFileWithoutLast = [sFile stringByDeletingLastPathComponent]; NSString *sFileOnly = [sFile substringFromIndex:[sFileWithoutLast length]+1]; ... This latte

Application Preferences - a general question

2009-07-31 Thread Alexander Bokovikov
Hi, All, Hope this is not an offtopic here... I'm quite new in Mac world, and one of essential differences from Windows, which I've noticed, is how Preferences changes are applied. Unlike to usual Windows GUI, preferences are applied instantly on Mac, i.e. just as user changes a value. The

Re: Exception-like behavior in save panel used for file choose

2009-07-31 Thread Greg Titus
On Jul 31, 2009, at 9:23 AM, Kyle Sluder wrote: On Jul 31, 2009, at 8:38 AM, Steve Christensen wrote: If you set a breakpoint on -[NSException raise], you can break when the exception actually happens. On Leopard you want to break on obj_exceptionThrow instead. Typo there... it's objc_e

Re: Exception-like behavior in save panel used for file choose

2009-07-31 Thread Kyle Sluder
On Jul 31, 2009, at 8:38 AM, Steve Christensen wrote: If you set a breakpoint on -[NSException raise], you can break when the exception actually happens. On Leopard you want to break on obj_exceptionThrow instead. --Kyle Sluder ___ Cocoa-dev ma

Re: Converting colors to CGFloat

2009-07-31 Thread Jesper Storm Bache
Given that QD is not color managed, I would expect that you should use [NSColor colorWithDeviceRed..] rather than the calibrated variation. (I must admit that I find the documentation regarding calibrated and device rather thin in various NSColor references). Jesper On Jul 31, 2009, at 8:44

Re: Converting colors to CGFloat

2009-07-31 Thread Steve Christensen
On Jul 31, 2009, at 2:31 AM, Matthias Schmidt wrote: how do I convert color values from longint or UInt16 as they were used with the carbon API to CGFloat used with NSColor? I assume you're talking about something like QuickDraw's RGBColor, where color components range from 0 to 65535? You

Re: Exception-like behavior in save panel used for file choose

2009-07-31 Thread Steve Christensen
You could very well be taking an exception. Given this possibility, why haven't you tried wrapping your code in -pushChooseButton: in a @try/@catch block and either just dumping out the exception (if any) and/or putting a breakpoint in the @catch to see what the state of the world is? If yo

Re: How to tell other controller that orientationDidChange

2009-07-31 Thread Fritz Anderson
On 30 Jul 2009, at 4:08 PM, Agha Khan wrote: I do see orientationDidChange in my AppDelegate but how can we receive same notification to other controllers. You should say what OS, and what version, you are talking about. I typed "orientation" into a search field and immediately found - [UIV

Converting colors to CGFloat

2009-07-31 Thread Matthias Schmidt
Hello, how do I convert color values from longint or UInt16 as they were used with the carbon API to CGFloat used with NSColor? thanks Matthias ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator c

Exception-like behavior in save panel used for file choose

2009-07-31 Thread Barry Press
I've written a small app that, from a preferences panel, uses a "Choose" button to open a save panel that's used to select the name of the file to which the app will log periodic data. That is, the preferences panel launches via this code: // ---

Re: NSMutableDictionary Poitners

2009-07-31 Thread DerNalia
thanks guys, this helps ^_^ On Jul 31, 2009, at 12:07 AM, Clark Cox wrote: On Thu, Jul 30, 2009 at 10:06 PM, Clark Cox wrote: On Thu, Jul 30, 2009 at 10:18 AM, DerNalia wrote: If I do something like: varName = [dictionaryName objectForKey:@"keyName"]; does that return a copy of what is in

Re: NSString and regular expressions

2009-07-31 Thread John Engelhart
On Thu, Jul 30, 2009 at 8:04 PM, BareFeet wrote: > Hi John and all, > > You might want to look at AGRegex which is very compact (one class) and >>> which uses PCRE: >>> >>> http://colloquy.info/project/browser/trunk/Frameworks/AGRegex >>> >>> >> Of note, Colloquy appears to have switched to Regex

Re: NSString and regular expressions

2009-07-31 Thread Alastair Houghton
On 31 Jul 2009, at 15:30, Jean-Daniel Dupas wrote: Le 31 juil. 09 à 11:30, Alastair Houghton a écrit : As far as I understood, the original reason for not providing the headers was that the C++ ABI was not stable and so a program linked against ICU on one version of Mac OS X might not work

Re: NSString and regular expressions

2009-07-31 Thread Jean-Daniel Dupas
Le 31 juil. 09 à 11:30, Alastair Houghton a écrit : On 31 Jul 2009, at 01:04, BareFeet wrote: The documentation notes: "Warning: Apple does not officially support linking to the libicucore.dylib library." In reality, how worried should I be about this? I wouldn't lose much sleep over it,

Re: How to set the name of open-with application for a specific file?

2009-07-31 Thread MATSUMOTO Satoshi
Dear Jerry Krinock, On 2009/07/31, at 21:43, Jerry Krinock wrote: Activate Finder. Select a subject document file. In main menu click File > Get Info. In the Info Window which appears, click "Open with..." and if desired click the "Change All" button. Thank you for your kind advice. :-)

Re: How to set the name of open-with application for a specific file?

2009-07-31 Thread Jerry Krinock
On 2009 Jul 31, at 01:02, MATSUMOTO Satoshi wrote: I want to choose a different application to associate with the file. Off-topic but, oh well, you wouldn't have known Activate Finder. Select a subject document file. In main menu click File > Get Info. In the Info Window which appea

Problem in copying files to the system clipboard

2009-07-31 Thread Deepa
Hi, I am developing an desktop application in which I want to copy the multiple image files to the system clipboard. When I try to paste it in the Finder, the image files should be pasted. This is the behavior similar to Finder Copy-Paste. (I want to copy the file paths which when pasted, a

[OT] Re: ASL issue

2009-07-31 Thread Alastair Houghton
On 31 Jul 2009, at 13:01, Santosh Sinha wrote: i am using Mac OS 10.5.7 and i am writing the error data in the asl log file, but after three day my data is automatically flushed from my system its possible. This isn't Cocoa related, hence is off-topic and should be asked somewhere else.

ASL issue

2009-07-31 Thread Santosh Sinha
Hello List, i am using Mac OS 10.5.7 and i am writing the error data in the asl log file, but after three day my data is automatically flushed from my system its possible. Thanks santosh ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: NSString and regular expressions

2009-07-31 Thread Alastair Houghton
On 31 Jul 2009, at 01:18, Charles Srstka wrote: ICU is an open-source project, so if you're concerned about the Apple-supplied one disappearing, you can just go download the latest sources, compile it yourself, and then either link it statically or include the dylib inside your bundle. ht

Re: NSString and regular expressions

2009-07-31 Thread Alastair Houghton
On 31 Jul 2009, at 01:04, BareFeet wrote: The documentation notes: "Warning: Apple does not officially support linking to the libicucore.dylib library." In reality, how worried should I be about this? I wouldn't lose much sleep over it, to be honest, as long as you stick to ICU's C API (a

Re: NSURL fileURLWithPath doesn't produce a valid URL

2009-07-31 Thread Alexander Bokovikov
On 31.07.2009, at 14:57, Dave Keck wrote: I'm confused: NSLog(@"%@", CFURLCreateStringByAddingPercentEscapes(nil, CFSTR("http://www.example.com?a+b & c = d"), nil, CFSTR("+=&"), kCFStringEncodingUTF8)); That doesn't do what you want? I've misunderstood. It was said "do it yourself" in the p

Re: Diagramming (a bit OT)

2009-07-31 Thread Loukas Kalenderidis
Thanks guys. On 31/07/2009, at 6:07 PM, WT wrote: Hi Loukas, there was an almost identical thread here a couple of months ago, with several responses. You might want to search the list archives and see if there are suggestions there that you might like. Wagner On Jul 31, 2009, at 5:19 A

Re: NSURL fileURLWithPath doesn't produce a valid URL

2009-07-31 Thread Dave Keck
I'm confused: NSLog(@"%@", CFURLCreateStringByAddingPercentEscapes(nil, CFSTR("http://www.example.com?a+b & c = d"), nil, CFSTR("+=&"), kCFStringEncodingUTF8)); That doesn't do what you want? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Plea

Re: NSURL fileURLWithPath doesn't produce a valid URL

2009-07-31 Thread Alexander Bokovikov
On 31.07.2009, at 14:02, Richard Frith-Macdonald wrote: Why do you think that's not a valid URL? It's because another code (Flash plugin) doesn't want to work if I provide a path (as a part of URL), containing "+" characters. At least I don't see other reasons, why the same function work

Re: Diagramming (a bit OT)

2009-07-31 Thread WT
Hi Loukas, there was an almost identical thread here a couple of months ago, with several responses. You might want to search the list archives and see if there are suggestions there that you might like. Wagner On Jul 31, 2009, at 5:19 AM, Loukas Kalenderidis wrote: Hey guys, Sorry, thi

Re: How to set the name of open-with application for a specific file?

2009-07-31 Thread MATSUMOTO Satoshi
Kyle Sluder, thank you for your response. I want to choose a different application to associate with the file. Satoshi On 2009/07/31, at 16:53, Kyle Sluder wrote: On Jul 31, 2009, at 12:40 AM, 慧 松本 wrote: I want to change the name of the app used to open the file. You want to actually

Re: NSURL fileURLWithPath doesn't produce a valid URL

2009-07-31 Thread Richard Frith-Macdonald
On 31 Jul 2009, at 08:34, Alexander Bokovikov wrote: On 31.07.2009, at 11:51, Dave Keck wrote: Check out CFURLCreateStringByAddingPercentEscapes(), and note that CFURL is toll-free bridged with NSURL. Just have tried it. No difference. I've used: surl = CFURLCreateStringByAddingPe

Re: How to set the name of open-with application for a specific file?

2009-07-31 Thread Kyle Sluder
On Jul 31, 2009, at 12:40 AM, 慧 松本 wrote: I want to change the name of the app used to open the file. You want to actually change the name of the application itself? Sorry, that's not yours to touch. The user might not even have the rights to make this modification (non-admin user, for e

Re: NSURL fileURLWithPath doesn't produce a valid URL

2009-07-31 Thread Kyle Sluder
On Jul 31, 2009, at 12:34 AM, Alexander Bokovikov wrote: where spath was the source string with "+" signs. You need to be providing a valid URL here. That's a string containing a URL, not a CFURLRef. In my opinion, all codes since 0x20 to 0x2F require escaping. Am I incorrect? There

Re: App Delegate in Document App

2009-07-31 Thread Michael Hoy
David, You should be adding the AppDelegate object to the MainMenu.xib, which is loaded first and once, what you want. Otherwise a new delegate object is created and set with each document loaded. ~Michael On Jul 28, 2009, at 1:46 PM, David Blanton wrote: In MyDocument.xib I added an obje

How to set the name of open-with application for a specific file?

2009-07-31 Thread 慧 松本
I can retrieve the name of the app used to open a file at the given path by NSWorkspace getInfoForFile method below. - (BOOL)getInfoForFile:(NSString *)fullPath application:(NSString **)appName type:(NSString **)type; I want to change the name of the app used to open the file. Does anybody

Re: NSURL fileURLWithPath doesn't produce a valid URL

2009-07-31 Thread Alexander Bokovikov
On 31.07.2009, at 11:51, Dave Keck wrote: Check out CFURLCreateStringByAddingPercentEscapes(), and note that CFURL is toll-free bridged with NSURL. Just have tried it. No difference. I've used: surl = CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,