Re: Odd crash only when Toast running

2009-06-02 Thread Graham Cox
On 02/06/2009, at 4:23 PM, Trygve Inda wrote: I have a user reporting an odd crash that I can't make happen here, nor has anyone else reported this, but the report is consistent and happens only when Toast is running. It seems very deep in the OS and as far as I know, I am not using libRI

Changing background color of a textview using colorwell?

2009-06-02 Thread rethish
Hi, I use a nscolorwell to change the back ground color of a nstextview. I use an action method to do this task. When I click the colorwell for the first time, the color panel window opens and if I type in textview , the text color will be of the colorwell¹s default color. Is this colorwell def

Re: Changing background color of a textview using colorwell?

2009-06-02 Thread Graham Cox
On 02/06/2009, at 5:17 PM, rethish wrote: Is this colorwell default behaviour? And if I select any color from the color panel the background color changes and if type In textview, the text will also appear in the same color., which makes the text invisible. I only want to change the ba

Re: Can't set header on NSURLRequest

2009-06-02 Thread Andrew Farmer
On 1 Jun 2009, at 23:44, Chris wrote: I'm having an issue with setting two headers for my NSURLRequest: [theRequest setValue: [NSString stringWithFormat:@"/principals/ __uids__/%@/\r\n",self.userGUID] forHTTPHeaderField:@"Originator"]; [theRequest setValue: [NSString stringWithForma

Re: Setting wantsLayer = YES; crashes on view load.

2009-06-02 Thread Kevin Ross
Turns out I did have an spurious NSNotificationCenter registration in a loaded view that was causing the crash. Thank you for your help Michael! On Jun 1, 2009, at 7:31 PM, Kevin Ross wrote: I looked at the msgSends dump of everything after setWantsLayer, and at the end it looks like a N

Re: [Core Data] mergeChangesFromContextDidSaveNotification: and thread safety

2009-06-02 Thread Aurélien Hugelé
Thanks for the explanation, I like when you have to bend the rules ;) Aurélien, Objective Decision Team On 29 mai 09, at 23:25, Ben Trumbull wrote: On May 29, 2009, at 2:49 AM, Aurélien Hugelé wrote: Core Data multithreading basic rule is to avoid passing managed objects across threads

Re: How to check whether a application is launch or not...?

2009-06-02 Thread Anshul jain
HI, I have figured it out how to get the root processes and its information. My only concern is how i will get a notification when a process is launched. I think there should be a way to get it. Because i think Activity Monitor does this. On 29-May-09, at 8:51 AM, Michael Ash wrote

Is it possible to open a URL in a specific browser rather than the default one ???

2009-06-02 Thread Parimal Das
Hello I want to open a particular URL in a specific browser (say firefox).If firefox is not present then open it in Safari. I am using NSWorkspace method openURL: but it always open the url in the users default browser. Is it possible to open a URL in specific browser ?? Advance Thanks -- -- Wa

Re: Is it possible to open a URL in a specific browser rather than the default one ???

2009-06-02 Thread Chunk 1978
i hate firefox, and although i have it on my system for backup, it would kinda piss me off if an app launched it for me instead of safari (which is often always open). i'm not sure you can do this without a hack, but i'm curious why you want to open in firefox as default? On Tue, Jun 2, 2009 at 8

Re: Can't set header on NSURLRequest

2009-06-02 Thread Doug Knowles
Hi, Chris, I had a similar problem the other day. Are you using an NSMutableURLRequest? Doug K; On Tue, Jun 2, 2009 at 2:44 AM, Chris wrote: > Hello, > > I'm having an issue with setting two headers for my NSURLRequest: > >[theRequest setValue: [NSString > stringWithFormat:@"/principa

Re: Is it possible to open a URL in a specific browser rather than the default one ???

2009-06-02 Thread Graham Cox
On 02/06/2009, at 11:04 PM, Chunk 1978 wrote: i hate firefox, and although i have it on my system for backup, it would kinda piss me off if an app launched it for me instead of safari (which is often always open). i'm not sure you can do this without a hack, but i'm curious why you want to ope

Proper way to release a QTMovie

2009-06-02 Thread Ramakrishna Vavilala
So I have a QTMovieLayer which plays a QTMovie. QTMovie* movie = [QTMovie movieWithFileName:fileName]; QTMovieLayer* movieLayer = [[QTMovieLayer layerWithMovie:movie]; [superlayer addSublayers:movieLayer]; The user may or may not view the entire movie. If the user desires to stop the movie, I do

Re: Is it possible to open a URL in a specific browser rather than the default one ???

2009-06-02 Thread Adam R. Maxwell
On Jun 2, 2009, at 6:15 AM, Graham Cox wrote: On Tue, Jun 2, 2009 at 8:56 AM, Parimal Das wrote: Is it possible to open a URL in specific browser ?? Launch Services methods such as LSCopyApplicationURLsForURL would probably allow you to do that. I'd use -[NSWorkspace openURLs:with

Re: Is it possible to open a URL in a specific browser rather than the default one ???

2009-06-02 Thread Graham Cox
On 03/06/2009, at 12:04 AM, Adam R. Maxwell wrote: I'd use -[NSWorkspace openURLs:withAppBundleIdentifier:options:additionalEventParamDescriptor:launchIdentifiers :] or LSOpenFromURLSpec for this. Right - but presumably you'd want to gather the list of apps that you could use first then

Re: Odd crash only when Toast running

2009-06-02 Thread Shawn Erickson
On Tue, Jun 2, 2009 at 12:12 AM, Graham Cox wrote: > > On 02/06/2009, at 4:23 PM, Trygve Inda wrote: >> The only thing I can find that may be related (based on [NSWindow >> displayIfNeeded] being in the report) is that my app has a single window >> with a single view and I call: >> >> NSImage*  

Re: Keeping track of CGAffineTransform's action

2009-06-02 Thread David Duncan
On Jun 1, 2009, at 8:15 PM, Pierre Berloquin wrote: I keep moving an UIImageView with CGAffineTransformTranslate through a timer. That doesn't affect the view's frame and bounds. Is there a variable somewhere that I can read to keep track of the transform or must I create my own? Why not j

Re: Odd crash only when Toast running

2009-06-02 Thread Shawn Erickson
2009/6/1 Trygve Inda : > Thoughts? > > Exception Type:  EXC_BAD_ACCESS (SIGSEGV) > Exception Codes: KERN_INVALID_ADDRESS at 0x2c1f3000 > Crashed Thread:  0 > > Thread 0 Crashed: > com.apple.CoreGraphics    0x90afbac0 CGSConvertBGR888toRGBA + 160 > com.apple.CoreGraphics    0x90a5494b a

Re: How determine if file is in Trash, given Path or Alias

2009-06-02 Thread Shawn Erickson
For those that don't know about the interior pointer edge case... http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcUsing.html#//apple_ref/doc/uid/TP40008006-SW7 -Shawn ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Re: Keeping track of CGAffineTransform's action

2009-06-02 Thread Pierre Berloquin
Possible indeed but Quartz programming is seamless and less cumbersome.I always tend to favor one-liners over many-liners. 2009/6/2 David Duncan > On Jun 1, 2009, at 8:15 PM, Pierre Berloquin wrote: > > I keep moving an UIImageView with CGAffineTransformTranslate through a >> timer. That doesn'

Re: Keeping track of CGAffineTransform's action

2009-06-02 Thread David Duncan
On Jun 2, 2009, at 8:39 AM, Pierre Berloquin wrote: Possible indeed but Quartz programming is seamless and less cumbersome. I always tend to favor one-liners over many-liners. I suppose what I'm trying to imply is that if you want to move a view, then move it instead of transforming it. Yo

Re: Keeping track of CGAffineTransform's action

2009-06-02 Thread Pierre Berloquin
You are right on an efficiency point of view, except I also use other Quartz functions, for special text renderings for example, in view of later 3D treatments, and it's logically saner to remain in one programming context rather than shift between CGRect and Affine.Yet Apple's philosophy on the ma

Re: Keeping track of CGAffineTransform's action

2009-06-02 Thread Kyle Sluder
On Tue, Jun 2, 2009 at 8:55 AM, Pierre Berloquin wrote: > You are right on an efficiency point of view, except I also use other Quartz > functions, for special text renderings for example, in view of later 3D > treatments, and it's logically saner to remain in one programming context > rather than

Re: Odd crash only when Toast running

2009-06-02 Thread Trygve Inda
> And if you do find an unknown library in the list that proves > tone problematic, please file a bug describing the issue and including > the crash log. > > b.bum The only non-Apple ones are: +org.andymatuschak.Sparkle 1.5 Beta 6 +com.DivXInc.DivXDecoder 6.4.0 Sparkle is used in my app,

Re: Keeping track of CGAffineTransform's action

2009-06-02 Thread Pierre Berloquin
Sorry about 3.0. Actually I haven't downloaded it yet and I'm not under NDA. I got what little I know from a previous conversation here. 2009/6/2 Kyle Sluder > On Tue, Jun 2, 2009 at 8:55 AM, Pierre Berloquin > wrote: > > You are right on an efficiency point of view, except I also use other > Q

Re: Odd crash only when Toast running

2009-06-02 Thread Trygve Inda
> On Tue, Jun 2, 2009 at 12:12 AM, Graham Cox wrote: >> >> On 02/06/2009, at 4:23 PM, Trygve Inda wrote: > >>> The only thing I can find that may be related (based on [NSWindow >>> displayIfNeeded] being in the report) is that my app has a single window >>> with a single view and I call: >>> >>

Re: Odd crash only when Toast running

2009-06-02 Thread Bill Bumgarner
On Jun 2, 2009, at 9:32 AM, Trygve Inda wrote: +com.DivXInc.DivXDecoder 6.4.0 I would be suspect of that particular component. Plugging com.DivXInc.DivXDecoder yields a Mac OS X crash report as the first hit. :) Seriously, though, if that particular plugin is trying to unload itself or a

Re: Keeping track of CGAffineTransform's action

2009-06-02 Thread Greg Guerin
Pierre Berloquin wrote: I keep moving an UIImageView with CGAffineTransformTranslate through a timer. That doesn't affect the view's frame and bounds. Is there a variable somewhere that I can read to keep track of the transform or must I create my own? What do you mean by "keep track of"?

How heavy is NSLayoutManager?

2009-06-02 Thread Frank Canova
I'm working on an app that will have various pieces of text laid out inside paths (i.e. a non-rectangular NSTextContainer). The requirements are: 1) Each chunk of text will be a separate object that has to know how to draw itself. 2) The objects can be moved, rotated, skewew *without* layo

Re: How heavy is NSLayoutManager?

2009-06-02 Thread Nick Zitzmann
On Jun 2, 2009, at 10:50 AM, Frank Canova wrote: But how heavy is NSLayoutManager? They're not too heavy to create, but in my experience, they take too long to deallocate. It has a bunch of private objects so it's hard to judge from looking at the header file. Would it be a problem hand

Re: How determine if file is in Trash, given Path or Alias

2009-06-02 Thread Sean McBride
On 6/1/09 9:31 PM, Quincey Morris said: >First, I believe Sean is wrong about (b), although the documentation >is a little unclear. I would love to be wrong, of course. >The description of [NSString UTF8String] says >that "the returned C string is automatically freed just as a returned >object w

Re: Odd crash only when Toast running

2009-06-02 Thread Ken Ferry
On Tue, Jun 2, 2009 at 7:57 AM, Shawn Erickson wrote: > On Tue, Jun 2, 2009 at 12:12 AM, Graham Cox > wrote: > > > > On 02/06/2009, at 4:23 PM, Trygve Inda wrote: > > >> The file that this image comes from will be deleted later on, but once > >> initWithContentsOfFile is called, I assume it no l

Re: How heavy is NSLayoutManager?

2009-06-02 Thread Seth Willits
On Jun 2, 2009, at 9:50 AM, Frank Canova wrote: But how heavy is NSLayoutManager? It has a bunch of private objects so it's hard to judge from looking at the header file. Would it be a problem handing out several dozen of them? Any time you draw an attributed string, it creates a temporary

Re: Referring to file by Alias ^or^ path

2009-06-02 Thread Jerry Krinock
On 2009 Jun 01, at 17:12, James Walker wrote: Jerry Krinock wrote: My app needs a reference to files that may or may not exist (yet). When the file exists, I prefer to use the Alias because it tracks if the user moves it, etc. But if the file does not exist yet, my + [NSData aliasRecordFro

Re: How determine if file is in Trash, given Path or Alias

2009-06-02 Thread Quincey Morris
On Jun 2, 2009, at 08:05, Shawn Erickson wrote: For those that don't know about the interior pointer edge case... http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcUsing.html#/ /apple_ref/doc/uid/TP40008006-SW7 For completeness, I just want to add (after

Re: Referring to file by Alias ^or^ path

2009-06-02 Thread Stephen J. Butler
Couple notes on string encodings... On Tue, Jun 2, 2009 at 4:50 PM, Jerry Krinock wrote: > + (NSData*)aliasRecordFromPath:(NSString*)path { >if ([path length] == 0) { >return nil ; >} > >const char* pathC = [path UTF8String] ; This should be [path fileSystemRepresentation]; Y

Re: How determine if file is in Trash, given Path or Alias

2009-06-02 Thread Greg Guerin
Quincey Morris wrote: For completeness, I just want to add (after a bit of discussion off- list) that it remains unclear whether the pointer returned by 'UTF8String' or 'fileSystemRepresentation' is to be regarded as an interior pointer or not. (My guess is "not".) So I submitted feedback

Re: Referring to file by Alias ^or^ path

2009-06-02 Thread Nick Zitzmann
On Jun 2, 2009, at 5:18 PM, Stephen J. Butler wrote: This should be [path fileSystemRepresentation]; Yes, this is UTF-8, but IIRC it puts the string in a certain normalized form before UTF-8 encoding it. No, it returns a UTF-8 string. The reason why you should use - fileSystemRepresentation

Re: Setting wantsLayer = YES; crashes on view load.

2009-06-02 Thread Michael Vannorsdel
Great glad you found it. Those are pretty hard to track down sometimes. On Jun 2, 2009, at 2:36 AM, Kevin Ross wrote: Turns out I did have an spurious NSNotificationCenter registration in a loaded view that was causing the crash. Thank you for your help Michael!

svnversion from Run Script in Xcode

2009-06-02 Thread Mitchell Livingston
In Xcode I have a Run Script phase using the /bin/sh shell. The script consists of: "sh anotherscript.sh". In this other script I can svnversion. This works in terminal, but fails in Xcode. I managed to get it to work by adding, before calling anotherscript.sh: "export PATH=$PATH:/opt/subve

Re: Several Questions

2009-06-02 Thread Ammar Ibrahim
On Mon, Jun 1, 2009 at 2:58 PM, Jelle De Laender wrote: > why should your app stops responding? > > Do you want to detect time-outs (network-times, IO-timeouts, ...) or will > your app be crap and full with bugs? I find your answer irritating. All software Apps I've used do crash, even once in

Re: Several Questions

2009-06-02 Thread Ammar Ibrahim
On Tue, Jun 2, 2009 at 3:48 AM, Todd Heberlein wrote: > Great, so I understand from what you're saying that I can launch a GUI app >> using launchd? >> > > Out of curiosity, I just tried this. I created a basic Cocoa app (I made no > changes to it, I just built the default skeleton application tha

Re: How heavy is NSLayoutManager?

2009-06-02 Thread Graham Cox
On 03/06/2009, at 2:50 AM, Frank Canova wrote: 1) Each chunk of text will be a separate object that has to know how to draw itself. 2) The objects can be moved, rotated, skewew *without* layout by changing the CTM when drawing. 3) If the path is changed by moving a control point, the tex

Re: How determine if file is in Trash, given Path or Alias

2009-06-02 Thread Michael Ash
On Tue, Jun 2, 2009 at 2:09 PM, Sean McBride wrote: > On 6/1/09 9:31 PM, Quincey Morris said: > >>The description of [NSString UTF8String] says >>that "the returned C string is automatically freed just as a returned >>object would be released", which implies (to me) that the returned >>pointer is

Re: How determine if file is in Trash, given Path or Alias

2009-06-02 Thread Michael Ash
On Tue, Jun 2, 2009 at 7:28 PM, Greg Guerin wrote: > Quincey Morris wrote: > >> For completeness, I just want to add (after a bit of discussion off- list) >> that it remains unclear whether the pointer returned by 'UTF8String' or >> 'fileSystemRepresentation' is to be regarded as an interior point

Re: Referring to file by Alias ^or^ path

2009-06-02 Thread Michael Ash
On Tue, Jun 2, 2009 at 7:51 PM, Nick Zitzmann wrote: > > On Jun 2, 2009, at 5:18 PM, Stephen J. Butler wrote: > >> This should be [path fileSystemRepresentation]; Yes, this is UTF-8, >> but IIRC it puts the string in a certain normalized form before UTF-8 >> encoding it. > > > No, it returns a UTF

Re: Referring to file by Alias ^or^ path

2009-06-02 Thread Kyle Sluder
On Tue, Jun 2, 2009 at 7:22 PM, Michael Ash wrote: > This step is unnecessary and pointless (although it was useful on > really old OS X versions where the kernel's normalization routines > didn't always handle everything correctly) but it is there last I > checked Is -fileSystemRepresentatio

Internationalizing Bundle Icon

2009-06-02 Thread Richard Holliday
Hi, The new icon icns file for my cocoa application (10.4 +) has text on it which needs to change based on the machine locale. I have localized the rest of the application (strings, nibs) etc. but I¹m trying to see if it¹s possible to have the finder present a different bundle icon based on the l

Validation of toolbaritem based on certain action is encountered?

2009-06-02 Thread archana udupa
Hi. I m havin a list of toolbar.I m working on application similar to winmerge in windows,which shows difference between 2 files.When i click toolbar item Previous difference ma cursor ll move to previous difference.But after it reaches the first difference, i want to disable that toolbar item

Re: Validation of toolbaritem based on certain action is encountered?

2009-06-02 Thread Andrew Farmer
On 2 Jun 2009, at 19:48, archana udupa wrote: I m havin a list of toolbar.I m working on application similar to winmerge in windows,which shows difference between 2 files.When i click toolbar item Previous difference ma cursor ll move to previous difference.But after it reaches the first differen

how can i color NSTextView by using RGB component value?

2009-06-02 Thread archana udupa
hi list ... I wanted t color ma textview by using rgb component value.how can i do that?can i use below method? wot value should i set for below method? + (NSColor *)colorWithCalibratedRed:(float)red green:(float)green blue:(float)blue alpha:(float)alpha -- With Regards,

window does not seem to respond to orderOut:

2009-06-02 Thread Robert Olivier
I'm implementing a shared inspector and following the guidance at http://borkware.com/rants/inspectors/ I have a method in my NSWindowController subclass: - (void) toggle { if(!visible) { visible = true; [self setDocument: [[NSDocumentController sharedDocumentControlle

Re: how can i color NSTextView by using RGB component value?

2009-06-02 Thread Graham Cox
On 03/06/2009, at 1:11 PM, archana udupa wrote: I wanted t color ma textview by using rgb component value.how can i do that?can i use below method? wot value should i set for below method? + (NSColor *)colorWithCalibratedRed:(float)red green:(float)green blue:(float)blue alpha:(float)alpha

Re: how can i color NSTextView by using RGB component value?

2009-06-02 Thread I. Savant
On Jun 2, 2009, at 11:11 PM, archana udupa wrote: I wanted t color ma textview by using rgb component value.how can i do that?can i use below method? wot value should i set for below method? + (NSColor *)colorWithCalibratedRed:(float)red green:(float)green blue:(float)blue alpha:(float)alpha

NSDictionary dictionaryWithContentsOfURL problem

2009-06-02 Thread Mr. Gecko
Hello. For some reason, one of my customers is having a problem which I determined to be NSDictionary dictionaryWithContentsOfURL can't connect to my server for some odd reason. I can't determine what reason because it works for all my other customers and so it's just this one guy. He can g

Re: How to check whether a application is launch or not...?

2009-06-02 Thread Ken Thomases
On Jun 2, 2009, at 5:05 AM, Anshul jain wrote: I have figured it out how to get the root processes and its information. My only concern is how i will get a notification when a process is launched. I think there should be a way to get it. Because i think Activity Monitor does this. I dou

Re: How determine if file is in Trash, given Path or Alias

2009-06-02 Thread Ken Thomases
On Jun 2, 2009, at 9:21 PM, Michael Ash wrote: The NSString methods are unlikely to be problematic here. NSData is troublesome because it's returning an internal pointer. In other words, it's a pointer to some memory that it already holds on to in the normal course of things, and it gives you th

Re: Referring to file by Alias ^or^ path

2009-06-02 Thread Ken Thomases
On Jun 2, 2009, at 9:35 PM, Kyle Sluder wrote: On Tue, Jun 2, 2009 at 7:22 PM, Michael Ash wrote: This step is unnecessary and pointless (although it was useful on really old OS X versions where the kernel's normalization routines didn't always handle everything correctly) but it is there las

Re: Referring to file by Alias ^or^ path

2009-06-02 Thread Ed Wynne
On Jun 3, 2009, at 12:43 AM, Ken Thomases wrote: On Jun 2, 2009, at 9:35 PM, Kyle Sluder wrote: Is -fileSystemRepresentation smart enough to deal with filenames that point to volumes on which the canonicalization is different than that used on HFS+? Its purpose isn't to match the canonicaliza

Re: window does not seem to respond to orderOut:

2009-06-02 Thread Robert Olivier
Never mind ... silly newbie mistake .. didn't have the window outlet set in IB. rjo On Jun 2, 2009, at 8:15 PM, Robert Olivier wrote: I'm implementing a shared inspector and following the guidance at http://borkware.com/rants/inspectors/ I have a method in my NSWindowController subclass: -