Re: How to empty the Trash programmatically?

2010-04-15 Thread Oleg Krupnov
But the progress-bar window will still pop up... On Fri, Apr 16, 2010 at 9:41 AM, Dave Keck wrote: > tell application "Finder" to empty trash without warns before emptying > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: How to empty the Trash programmatically?

2010-04-15 Thread Dave Keck
tell application "Finder" to empty trash without warns before emptying ___ 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.

Re: How to empty the Trash programmatically?

2010-04-15 Thread Oleg Krupnov
Yes, I see that I can use AppleScript. But is this really the only way? I would like to avoid Finder UIs popping up. On Fri, Apr 16, 2010 at 9:30 AM, Jens Alfke wrote: > > On Apr 15, 2010, at 11:05 PM, Oleg Krupnov wrote: > >> Is there a way to programmatically empty the Trash can? > > Send the F

Re: How to empty the Trash programmatically?

2010-04-15 Thread Oleg Krupnov
What is "securely" in this context? On Fri, Apr 16, 2010 at 9:14 AM, Dave Carrigan wrote: > > On Apr 15, 2010, at 11:05 PM, Oleg Krupnov wrote: > >> I could delete all files from /Users//.Trash folder, but I am >> not sure if it's a legitimate way. > > It's not, because it will anger anybody who

Re: How to empty the Trash programmatically?

2010-04-15 Thread Jens Alfke
On Apr 15, 2010, at 11:05 PM, Oleg Krupnov wrote: > Is there a way to programmatically empty the Trash can? Send the Finder an ‘Empty Trash’ AppleEvent. You can use the scripting bridge API to do this pretty easily. —Jens___ Cocoa-dev mailing list (

Re: program termination after releasing self defined NSXMLParser class

2010-04-15 Thread Jens Alfke
On Apr 15, 2010, at 10:39 PM, Dominic Dauer wrote: > The debugger shows this: > > Program received signal: “EXC_BAD_ACCESS” Yes, but what functions are on the stack? (They show up in a list, and also you can type “bt” at the gdb prompt to get a textual list.) —Jens_

Re: How to empty the Trash programmatically?

2010-04-15 Thread Charles Srstka
On Apr 16, 2010, at 1:05 AM, Oleg Krupnov wrote: > Hi, > > Is there a way to programmatically empty the Trash can? > > I could delete all files from /Users//.Trash folder, but I am > not sure if it's a legitimate way. Also it will not include trashed > files from other volumes, stored in /.Trash

Re: How to empty the Trash programmatically?

2010-04-15 Thread Stephen J. Butler
On Fri, Apr 16, 2010 at 1:05 AM, Oleg Krupnov wrote: > Hi, > > Is there a way to programmatically empty the Trash can? This code is ancient, but it should give you an idea where to start writing a modern version: http://developer.apple.com/mac/library/samplecode/MoreAppleEvents/Listings/MoreFind

Re: How to empty the Trash programmatically?

2010-04-15 Thread Dave Carrigan
On Apr 15, 2010, at 11:05 PM, Oleg Krupnov wrote: > I could delete all files from /Users//.Trash folder, but I am > not sure if it's a legitimate way. It's not, because it will anger anybody who prefers to empty the trash "securely". ___ Cocoa-dev m

How to empty the Trash programmatically?

2010-04-15 Thread Oleg Krupnov
Hi, Is there a way to programmatically empty the Trash can? I could delete all files from /Users//.Trash folder, but I am not sure if it's a legitimate way. Also it will not include trashed files from other volumes, stored in /.Trashes/. The latter are generally not accessible even to list them w

Re: Setting front window when launched from another application

2010-04-15 Thread Eli Bach
On Apr 15, 2010, at 11:11 PM, Gaurav Srivastava wrote: > So, is there any way to prevent the user interaction with the parent > application and still keep receiving events from child application. Um, perhaps you could describe what you are trying to accomplish, as the normal way to prevent a us

Re: program termination after releasing self defined NSXMLParser class

2010-04-15 Thread Dominic Dauer
On 16.04.2010, at 01:45, Jens Alfke wrote: > Run the app with the debugger and it should tell you where it's crashing. > That may help pin it down. The debugger shows this: Program received signal: “EXC_BAD_ACCESS” Dominic ___ Cocoa-dev ma

Re: Setting front window when launched from another application

2010-04-15 Thread Gaurav Srivastava
So, is there any way to prevent the user interaction with the parent application and still keep receiving events from child application. On Thu, Apr 15, 2010 at 11:44 PM, Jens Alfke wrote: > > On Apr 15, 2010, at 10:32 AM, Gaurav Srivastava wrote: > > > When user performs certain action, the par

Re: Help with crash in -[NSKeyValueNestedProperty matchesWithoutOperatorComponentsKeyPath:]

2010-04-15 Thread Ken Thomases
On Apr 15, 2010, at 11:03 AM, wrote: > Unfortunately i have very little data on what was actually going on before > the crash. The crash report itself starts with some important information that you've omitted: the actual nature of the crash. What kind of signal or exception was received?

Re: Does XCode 3.2 Documentation Browser Stink?

2010-04-15 Thread Kyle Sluder
On Thu, Apr 15, 2010 at 5:28 PM, Kyle Sluder wrote: > On Thu, Apr 15, 2010 at 4:48 PM, Chris Tracewell wrote: >> Okay, so now that I flew off the handle in this rant, will someone please >> tell me I am wrong and there is a "classic" doc browser option or third >> party browser? > > There is no

Re: Does XCode 3.2 Documentation Browser Stink?

2010-04-15 Thread Kyle Sluder
On Thu, Apr 15, 2010 at 4:48 PM, Chris Tracewell wrote: > Okay, so now that I flew off the handle in this rant, will someone please > tell me I am wrong and there is a "classic" doc browser option or third party > browser? There is not. Regardless of its validity, this rant really belongs on x

Does XCode 3.2 Documentation Browser Stink?

2010-04-15 Thread Chris Tracewell
Am I missing something or does the new Documentation viewer for XCode 3.2 suck? I just upgraded my dev machine to Snow Leopard and installed XCode 3.2 and went to look up some Obj-C classes and everything is wacked. Gone is the filtered search results TableView above my the documentation pages -

Re: How can we Pause And Play the Animations on UIView

2010-04-15 Thread Jens Alfke
On Apr 14, 2010, at 10:35 PM, Kalyanraju M wrote: How can we Pause And Play the Animations on UIView. www.gerv.net/hacking/how-to-ask-good-questions/ —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests o

Re: program termination after releasing self defined NSXMLParser class

2010-04-15 Thread Jens Alfke
On Apr 15, 2010, at 3:43 PM, Dominic Dauer wrote: Everything works fine until call the release method to the parser. In the simulator the app is terminating without any message in the log. I guess I do a fundamental mistake. Run the app with the debugger and it should tell you where it's

program termination after releasing self defined NSXMLParser class

2010-04-15 Thread Dominic Dauer
Hi all, I am writing on an app for the iPhone/iPod which parses a xml Document to display the data in table views. I want to ask something fundamental. I created my own class of NSXMLParser: - XMLParser.h #import @interface XML

Measuring aliased text for drawing

2010-04-15 Thread Jonah Petri
Hello, I need to measure and draw some text in a non-antialiased NSGraphicsContext. Drawing is no problem: just setShouldAntialias:NO in the context, and I'm good. Measuring, however, is proving more difficult. I've been using the simple -[NSString sizeWithAttributes:] method, which works gr

How can we Pause And Play the Animations on UIView

2010-04-15 Thread Kalyanraju M
Hi  How can we Pause And Play the Animations on UIView. Thanks in advance for your suggestions. ___ 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 coc

Re: NSNumberFormatter not working for me ?

2010-04-15 Thread Bill Hernandez
On Apr 15, 2010, at 1:38 PM, Chris Kane wrote: > I think people are confusing two issues, one being the abstract "phone > numbers aren't numbers and NSNumberFormatter is only for quantities", and the > other is the reason you don't get what you want out of NSNumberFormatter, in > trying to exp

How to find all clipping siblings for a view?

2010-04-15 Thread Alexander Bokovikov
Hi, All, For some reason I need to do a job which NSWindow usually does, when it redraws itself (AFAIU) - I need to find all its views, which have z- order higher than my view, then get their bounding rectangles, unite them, subtract from the window content view bounding rectangle and sect

Re: NSNumberFormatter not working for me ?

2010-04-15 Thread Bill Hernandez
On Apr 15, 2010, at 12:14 PM, Murat Konar wrote: > On Apr 14, 2010, at 8:21 PM, Bill Hernandez wrote: > >> The point is that NSNumberFormatter appears to me missing some flexibility >> in dealing with other than its own set of formatting converters, whatever >> the programmers thought they woul

Re: iPhone: A memory leak I can't explain

2010-04-15 Thread Tino Rachui
2010/4/15 David Duncan > On Apr 15, 2010, at 12:32 PM, Tino Rachui wrote: > > 2010/4/15 David Duncan > >> On Apr 15, 2010, at 11:50 AM, Tino Rachui wrote: >> >> > Well, yes but only one line at a time if I'm not wrong(?) which makes >> copying the whole stack a rather cumbersome task. >> >> Shif

Re: iPhone: A memory leak I can't explain

2010-04-15 Thread David Duncan
On Apr 15, 2010, at 12:32 PM, Tino Rachui wrote: > 2010/4/15 David Duncan > On Apr 15, 2010, at 11:50 AM, Tino Rachui wrote: > > > Well, yes but only one line at a time if I'm not wrong(?) which makes > > copying the whole stack a rather cumbersome task. > > Shift-click to extend the range bet

Re: iPhone: A memory leak I can't explain

2010-04-15 Thread Tino Rachui
2010/4/15 David Duncan > On Apr 15, 2010, at 11:50 AM, Tino Rachui wrote: > > > Well, yes but only one line at a time if I'm not wrong(?) which makes > copying the whole stack a rather cumbersome task. > > Shift-click to extend the range between two points, command-click to select > specific line

Re: iPhone: A memory leak I can't explain

2010-04-15 Thread David Duncan
On Apr 15, 2010, at 11:50 AM, Tino Rachui wrote: > Well, yes but only one line at a time if I'm not wrong(?) which makes copying > the whole stack a rather cumbersome task. Shift-click to extend the range between two points, command-click to select specific lines. > But anyhow here we go: > >

Re: iPhone: A memory leak I can't explain

2010-04-15 Thread Tino Rachui
2010/4/15 David Duncan > On Apr 14, 2010, at 10:41 PM, Tino Rachui wrote: > > in my app I'm accessing the photo library (in my opinion exactly as in > sample programs I have seen from Apple). When leak-testing the app on the > iPhone using Instrument the following leak is being reported (see stac

Re: NSNumberFormatter not working for me ?

2010-04-15 Thread Chris Kane
On Apr 14, 2010, at 6:38 PM, Bill Hernandez wrote: > On Apr 14, 2010, at 5:25 PM, Greg Guerin wrote: > >> Your code formats strings (more specifically, characters in strings). It >> does not format numbers, as such. > > This is the work-around that I did because I could not make do with > NSN

Re: Setting a subclass of NSButtonCell in code

2010-04-15 Thread Lee Ann Rucker
On Apr 15, 2010, at 2:14 AM, Arun wrote: Hi All, I have subclassed NSButtonCell and overridden some methods. I know that we need to set the name of the subclass in the IB to get the effects of the subclass. Instead of setting it in the IB, is it possible to set the class in the code itse

Re: Setting front window when launched from another application

2010-04-15 Thread Jens Alfke
On Apr 15, 2010, at 10:32 AM, Gaurav Srivastava wrote: > When user performs certain action, the parent application launches > another application B. It does so by doing fork(). Whoa — don’t do this. GUI apps should be launched by calling LaunchServices (or NSWorkspace, which is a wrapper around

Re: iPhone: A memory leak I can't explain

2010-04-15 Thread Gary L. Wade
David If you have any influence, it would be REALLY nice to allow Instruments to copy the leak contents section as well as being able to view the data in alternate formats. If it can be expedited, my bug report for this request is rdar://7776006 On 04/15/2010 10:42 AM, "David Duncan" wrote: >

Re: iPhone: A memory leak I can't explain

2010-04-15 Thread David Duncan
On Apr 14, 2010, at 10:41 PM, Tino Rachui wrote: > in my app I'm accessing the photo library (in my opinion exactly as in > sample programs I have seen from Apple). When leak-testing the app on the > iPhone using Instrument the following leak is being reported (see stack > trace) and I don't know

Setting front window when launched from another application

2010-04-15 Thread Gaurav Srivastava
Hi, I am facing some issues with setting an application as front process when it is launched from another application. Basically, I have a parent application A. When user performs certain action, the parent application launches another application B. It does so by doing fork(). In child process, i

Re: Text file

2010-04-15 Thread vincent habchi
Hi, > 0x91dc507e <+0334> call 0x91e68a50 > 0x91dc5083 <+0339> mov%esi,(%esp) > 0x91dc5086 <+0342> call 0x91ebf566 > 0x91dc508b <+0347> lea-0x80(%ebp),%esi > 0x91dc508e <+0350> mov%esi,(%esp) > 0x91dc5091 <+0353> call 0x91ebfb36 > 0x91dc5096 <+0358> mov%esi,(%

Re: Text file

2010-04-15 Thread Bill Bumgarner
On Apr 15, 2010, at 8:50 AM, Henrietta Read wrote: > What's the correct way to open a text file? I'm using: > > NSError *error = nil; > NSStringEncoding encoding; > > [myMutableString setString:[NSString stringWithContentsOfFile:filePath > usedEncoding:&encoding error:&error]]; > > but o

Re: Text file

2010-04-15 Thread Jens Alfke
On Apr 15, 2010, at 8:50 AM, Henrietta Read wrote: NSError *error = nil; NSStringEncoding encoding; [myMutableString setString:[NSString stringWithContentsOfFile:filePath usedEncoding:&encoding error:&error]]; The call to -stringWithContentsOfFile: looks correct, but you're failin

Re: Xcode 3.23 broke my code signing [FIXED]

2010-04-15 Thread Steve Mykytyn
For anyone else who runs into this: Reversion to 3.2.2 fixed the code signing issue. Black magic apparently. Nothing else worked. Apologies to anyone who thinks this should have been posted to a different list. On Apr 15, 2010, at 9:06 AM, Dave Reed wrote: > > On Apr 14, 2010, at 9:25 PM, S

Re: Xcode 3.23 broke my code signing

2010-04-15 Thread Dave Reed
On Apr 14, 2010, at 9:25 PM, Steve Mykytyn wrote: > Project that built fine for weeks fails to pass validation, won't run when > installed. > > Ran Xcode uninstall, reinstalled from scratch, same deal. > > Other than randomly trying stuff, does anyone have a known working procedure > for fixi

Help with crash in -[NSKeyValueNestedProperty matchesWithoutOperatorComponentsKeyPath:]

2010-04-15 Thread scottandrew
I need a bit of help. I am trying to track down a crash with KVO. It appears the app is crashing when trying to notify observers of a change. Is this crash a badly formated KVO path? 0 com.apple.Foundation0x96f555c0 -[NSKeyValueNestedProperty matchesWithoutOperatorComponentsKe

Text file

2010-04-15 Thread Henrietta Read
Hi, What's the correct way to open a text file? I'm using: NSError *error = nil; NSStringEncoding encoding; [myMutableString setString:[NSString stringWithContentsOfFile:filePath usedEncoding:&encoding error:&error]]; but on some files (say, Western Mac OS Roman) it crashes. 0x91dc50

Display AppleScript dictionary browser

2010-04-15 Thread jonat...@mugginsoft.com
My app currently allows the user to select and display an application AppleScript dictionary using the following undocumented call: [OSADictionary performSelector:@selector(chooseDictionary)] An app dictionary can be selected but the browser functionality is not fully functional. Searching for

Re: Setting a subclass of NSButtonCell in code

2010-04-15 Thread Graham Cox
On 15/04/2010, at 7:14 PM, Arun wrote: > Instead of setting it in the IB, is it possible to set the class in the code > itself? if yes how can we do this. If you meant how to make objects of the subclass, just, y'know, create them: cell = [[MyCellClass alloc] init(...)]; Then set the control

Re: Setting a subclass of NSButtonCell in code

2010-04-15 Thread Graham Cox
On 15/04/2010, at 7:14 PM, Arun wrote: > Hi All, > > I have subclassed NSButtonCell and overridden some methods. > I know that we need to set the name of the subclass in the IB to get the > effects of the subclass. > Instead of setting it in the IB, is it possible to set the class in the code >

Setting a subclass of NSButtonCell in code

2010-04-15 Thread Arun
Hi All, I have subclassed NSButtonCell and overridden some methods. I know that we need to set the name of the subclass in the IB to get the effects of the subclass. Instead of setting it in the IB, is it possible to set the class in the code itself? if yes how can we do this. Thanks in advance A

Re: Static Libary which links against Foundation

2010-04-15 Thread Christian Ziegler
On 11.04.2010, at 19:25, Jens Alfke wrote: > > On Apr 11, 2010, at 5:07 AM, Christian Ziegler wrote: > >> it makes sense to convert this library to a static library. I did that and >> stumbled upon the problem that my test app (C-Shell-Toll) now has to link >> against Foundation. I would like

Re: Colored checkboxes like in iCal

2010-04-15 Thread Graham Cox
On 15/04/2010, at 5:43 PM, Andreas Eriksson wrote: > Is there a way to get colored checkboxes like in iCal without using > custom drawing? > > I have looked through the documentation but can only find how to > change the background and text color. Not built-in, but have a look at Matt Gemmell'

Re: Colored checkboxes like in iCal

2010-04-15 Thread Sebastian Morsch
Hi Andreas, the only alternative to custom drawing I know is using the setImage: and setAlternateImage: methods of NSButton. These let you specify images for unchecked and checked state respectively. You could generate colored checkbox images with your own private method, something like - (NSI

Colored checkboxes like in iCal

2010-04-15 Thread Andreas Eriksson
Is there a way to get colored checkboxes like in iCal without using custom drawing? I have looked through the documentation but can only find how to change the background and text color. / Andreas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: programmitically creating nstextfield

2010-04-15 Thread mark
On Wed, Apr 14, 2010 at 9:24 PM, mark wrote: window=[[NSWindow alloc] initWithContentRect:r styleMask:0 Use the NSBorderlessWindowMask symbolic constant instead of passing 0. backing:NSBackingStoreRetained defer:NO]; As the documentation says, do not use NSBackingStoreRetained, or

Re: base64Binary

2010-04-15 Thread Bartosz Bialecki
___ 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 Subscription: http://lists.apple.com