Re: Recursive blocks

2011-01-29 Thread Chris Suter
Hi Glen, On Fri, Jan 28, 2011 at 7:03 PM, Glen Low glen@pixelglow.com wrote: [snip] The recursive block allows me to hide the recursion within a method, also to avoid having to return more than 1 type (BOOL + GKGraph*) from the recursion i.e. avoiding the ugly GKGraph** smallestCluster

Re: Recursive blocks

2011-01-27 Thread Chris Suter
Hi Bill, On Fri, Jan 28, 2011 at 4:51 AM, Bill Bumgarner b...@mac.com wrote: You have measured a situation where the pattern's marginal slowness actually matters? No, of course not; I don't have a real world use case for it and, I suspect, neither does anyone else. A Block_copy() is going

Re: iTunes 10 UI

2010-09-02 Thread Chris Suter
Hi, On Thu, Sep 2, 2010 at 5:07 PM, Iceberg-Dev dev.iceb...@gmail.com wrote: It's not easy. 1. If you retrieve a NSButton with the official API, you will not be able to get the mouse over effect. This is a bug since Mac OS X 10.4 and it has still not been fixed in Mac OS X. 2. The NSButton

Re: Code Signing

2009-09-06 Thread Chris Suter
Hi Peter, On Sun, Sep 6, 2009 at 9:00 PM, Peter Hudsonpeter.hud...@mac.com wrote: I notice that when I sign code ( the whole app )  I  land up with 2 additional items in my /Contents directory in the app bundle. These items are a folder called _CodeSignature  and an alias called

Re: Detecting that a process has ended?

2009-06-27 Thread Chris Suter
Hi Rick, On Sat, Jun 27, 2009 at 7:22 PM, Ken Thomasesk...@codeweavers.com wrote: On Jun 27, 2009, at 4:11 AM, Rick Mann wrote: I'm starting a process via NSTask and launchctl. I can use launchctl list to get the process' PID. Is there a way i can get notified if the process exits (or dies)

Re: Detecting that a process has ended?

2009-06-27 Thread Chris Suter
Hi Rick, On 27/06/2009, at 7:29 PM, Rick Mann rm...@latencyzero.com wrote: I think it'll work very well. It's not a GUI process (although most of the techniques in the TN support only processes in the current context). In this case, the kqueues will do just fine. Ah, sorry, I

Re: Approaches for this Matching Problem?

2009-06-22 Thread Chris Suter
Hi Steve, On Mon, Jun 22, 2009 at 6:10 PM, Steve Croninsteve_cro...@mac.com wrote: But what is the right solution?? For finding word boundaries, I think you're supposed to use NSAttributedString's nextWordFromIndex:forward: and doubleClickAtIndex: methods. Bear in mind that some languages

Re: How to fill rectangle under vertical scroller?

2009-06-22 Thread Chris Suter
Hi Quincey, On Mon, Jun 22, 2009 at 2:33 PM, Quincey Morrisquinceymor...@earthlink.net wrote: FWIW, the small gotcha in the sample code you linked to (AFAICT, since I never tried it) is that it places the placard in the area normally occupied by a scroll bar. The corner rect that the OP wants

Re: Approaches for this Matching Problem?

2009-06-22 Thread Chris Suter
Hi Gerriet, On Mon, Jun 22, 2009 at 10:46 PM, Gerriet M. Denkmanngerr...@mdenkmann.de wrote: Bear in mind that some languages don't really have the concept of words. Could you please elaborate? Maybe some examples? I'm afraid I'm not an expert. I just remember hearing it said at WWDC (so

Re: Leaks utility

2009-06-12 Thread Chris Suter
Hi Ryan, On Fri, Jun 12, 2009 at 9:29 PM, Ryan Josephthealchemistgu...@gmail.com wrote: I wasn't sure where to post this but Cocoa programmers should know as well as any one else I thought. I have just learned about the leaks unix utility for detecting memory leaks but I'm not unix savvy

Re: Tools in App Bundles

2009-05-20 Thread Chris Suter
Hi Kevin, On Wed, May 20, 2009 at 4:28 PM, Kevin LaCoste klaco...@zenvilla.com wrote: Thanks for the link. Now the question becomes, if we move helper tools into a new Contents/Helpers folder are they covered by codesign? No, it wouldn't be covered by codesign. codesign has some built-in rules

Re: Tools in App Bundles

2009-05-20 Thread Chris Suter
Hi Kevin, On Wed, May 20, 2009 at 4:43 PM, Chris Suter csu...@sutes.co.uk wrote: [snip] These are the default rules: key^Resources/.*\.lproj//key dict    keyoptional/key    true/    keyweight/key    real1000/real /dict Sorry, the default rules are more than just that. Have a look

Re: Tools in App Bundles

2009-05-19 Thread Chris Suter
Hi Kevin, On Tue, May 19, 2009 at 8:04 PM, Kevin LaCoste klaco...@zenvilla.com wrote: [snip] If I understand that correctly, my tool is in the correct place but I'm not confident. Should it be in Contents/MacOS Yes. or should I add a Contents/Executable folder? No. Bonus question. Is the

Re: Adding objects to NSMutableArray out of order?

2009-05-04 Thread Chris Suter
Hi Colin, On Tue, May 5, 2009 at 9:50 AM, Colin Cornaby co...@consonancesw.com wrote: I'm dealing with some code that returns results out of order, but the results contain the proper index. In the end, I'd like to put them all into an NSArray, but unlike a C array, NSArray doesn't seem to

Re: A couple NSRunLoop questions

2009-05-04 Thread Chris Suter
Hi Miles, On Tue, May 5, 2009 at 11:54 AM, Miles vardpeng...@gmail.com wrote: 1) I have a timer on a run loop. Every so often I invalidate the timer which as I understand it should remove the run loop as well. No, invalidating a timer just removes it as a source from the run loop. At a later

Re: TCPServer Example

2009-05-04 Thread Chris Suter
On Tue, May 5, 2009 at 6:58 AM, Development developm...@fornextsoft.com wrote: I'm using parts of the TCPServer example code from apple. It's fairly straight forward code however I have a problem. in the method:- (void)handleNewConnectionFromAddress:(NSData *)addr inputStream:(NSInputStream

Re: Best technology to use for overlays?

2009-04-24 Thread Chris Suter
Hi Daniel, On Fri, Apr 24, 2009 at 9:07 PM, Michael Ash michael@gmail.com wrote: If you want to use the same back-end as window compositing, why not use actual window compositing? Create a borderless NSWindow, make it a child window, and position it appropriately. In my opinion, you're

Re: Best technology to use for overlays?

2009-04-24 Thread Chris Suter
Hi Michael, On Fri, Apr 24, 2009 at 9:38 PM, Michael Ash michael@gmail.com wrote: If your overlay is known about in advance, the solution to the timing window is easy: load and position it immediately, when you load the parent window, even if you don't need it yet. You can fill it with

Re: Best technology to use for overlays?

2009-04-24 Thread Chris Suter
Hi Michael, And I've just thought of more things that are awkward with child windows: handling events and accessibility. Regards, Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: How to clone a mutable dictionary

2009-04-24 Thread Chris Suter
Hi Graham, On Fri, Apr 24, 2009 at 6:49 PM, Graham Cox graham@bigpond.com wrote: Incidentally this makes a very useful basic category on NSDictionary, one that every Cocoa programmer is likely to need sooner or later. Here's mine: [snip] You could also use CFPropertyListCreateDeepCopy.

Re: Fill box with repeating text

2009-04-24 Thread Chris Suter
Hi Trygve, 2009/4/25 Trygve Inda cocoa...@xericdesign.com Makes the text transparent, but I can't seem to make the background of the NSImage transparent. I want to end up with white text on a transparent background, but [[NSImage alloc] initWithSize:[theString size]] seems to set the

Re: sending email form Cocoa app using Mail

2009-04-15 Thread Chris Suter
Hi Reza, On Wed, Apr 15, 2009 at 9:06 PM, Reza Farhad r...@qu-s.eu wrote: I want to update my app from using  NSMailDelivery to using scripting Bridge with Mail to take care of all my emailing from my Cocoa app. I just have this question, what happens if the user is not using Mail and has

Re: Non-pageable app

2009-04-06 Thread Chris Suter
Hi Kyle, On Mon, Apr 6, 2009 at 4:03 PM, Kyle Sluder kyle.slu...@gmail.com wrote: On Sun, Apr 5, 2009 at 8:07 PM, Chris Suter csu...@sutes.co.uk wrote: What am I missing? If the attacker physically powers off the machine while the page is written out to disk, s/he can just read the page off

Re: Puzzling run loop/autorelease pool question

2009-04-05 Thread Chris Suter
Hi m, On Mon, Apr 6, 2009 at 8:21 AM, m mlist0...@gmail.com wrote: I've uploaded a project that demonstrates the problem to http://uielement.muratnkonar.com/UIElement.zip The problem is that you set-up your callback and your actual callback is all via C; it's not an Objective-C interface so

Re: Puzzling run loop/autorelease pool question

2009-04-05 Thread Chris Suter
Hi Michael, On Mon, Apr 6, 2009 at 9:50 AM, Michael Ash michael@gmail.com wrote: On Sun, Apr 5, 2009 at 5:11 PM, m mlist0...@gmail.com wrote: The workaround is easy. What you're doing is fine, or you can post a fake NSEvent, or something similar. Pretty much up to you. Whilst that

Re: Non-pageable app

2009-04-05 Thread Chris Suter
Hi Finlay, On Sun, Apr 5, 2009 at 6:47 AM, Finlay Dobbie finlay.dob...@gmail.com wrote: -- Indeed, many types of data, such as hashes, unencrypted versions of sensitive data, and authentication tokens, should generally not be written to disk due to the potential for abuse. This raises an

Re: Suppressing variable hiding warning in Xcode

2009-04-05 Thread Chris Suter
Hi Brad, On Mon, Apr 6, 2009 at 10:10 AM, Brad O'Hearne br...@bighillsoftware.com wrote: I had a few questions about selectively suppressing a certain warning in Xcode. I personally find the warning which pertains to local variables hiding instance variables a real nuisance. For example, if

Re: Toll-free bridge type at runtime

2009-04-03 Thread Chris Suter
Hi Marcel, [snip] However, that does not mean that they are the same. They are the effectively the same and I couldn't see anything in your e-mail that proves otherwise. You appear to have proven that a subclass of NSArray doesn't happen to be a descendent NSCFArray (nobody asked that though)

Re: Toll-free bridge type at runtime

2009-04-02 Thread Chris Suter
Hi Marcel, On Fri, Apr 3, 2009 at 10:37 AM, Marcel Weiher marcel.wei...@gmail.com wrote: So the compiler also disagrees with you that these are the same type.  You can *cast* them to be compatible, but they are not the same type. Right, but the original question was about figuring out what

Re: Toll-free bridge type at runtime

2009-04-02 Thread Chris Suter
Hi Marcel, On Fri, Apr 3, 2009 at 11:06 AM, Marcel Weiher marcel.wei...@gmail.com wrote: As I explained, Did you? it is trivially possible, because the only Objective-C class that is the same as its underlying CFType is NSCFArray.  So a simple test would be  [object class] == [NSCFArray

Re: Measuring time between keypresses?

2009-03-31 Thread Chris Suter
On Wed, Apr 1, 2009 at 12:27 PM, Debajit Adhikary deba...@debajit.com wrote: I'm trying to write an app where I need to accept keypresses, and call a function whenever the user has stopped typing (or when there is a specified delay between keystrokes). How do I measure the time between two

Re: How do I time a Cocoa app?

2009-03-31 Thread Chris Suter
On Wed, Apr 1, 2009 at 12:53 PM, Debajit Adhikary deba...@debajit.com wrote: What is an easy way to time a Cocoa application? (Alternatively, any good way to measure performance would suffice). (I have two different frameworks and would like to compare their performances over some fixed input

Re: NSMutableArray is null?

2009-03-31 Thread Chris Suter
On Wed, Apr 1, 2009 at 1:12 PM, Pierce Freeman piercefreema...@comcast.net wrote: Whoops, sorry I didn't put that in... @interface Example_Class : NSObject {    IBOutlet NSTableView *tableView;    NSMutableArray *globalVariable; } :-D You still haven't put it in! Where do you set

Re: NSMutableArray is null?

2009-03-31 Thread Chris Suter
On Wed, Apr 1, 2009 at 1:16 PM, Pierce Freeman piercefreema...@comcast.net wrote: The global variable is in the Controller.h... Is this what you are asking for? Unless you set globalVariable to something (I do hope you haven't actually called it that BTW), it will remain nil forever. Messages

Re: NS - CG Rect Conversion and screen coordinates

2009-03-31 Thread Chris Suter
Hi Trygve, 2009/4/1 Trygve Inda cocoa...@xericdesign.com: Using these two calls: NSRect nsRect = [screen frame]; CGRect cgRect = CGDisplayBounds (displayID); I get for my two screens: NS    x=0        y=0      w=2560    h=1600  // screen A CG    x=0        y=0      w=2560    h=1600 NS  

Avoiding Flicker with OpenGL View when Moving Divider of a Split View

2009-03-21 Thread Chris Suter
Hi all, I have a split view arranged horizontally with an OpenGL view in the right pane (surrounded by some other stuff). When I move the divider, there is a flicker on the right hand side of the OpenGL view. You don’t get this glitch if you resize the window. It's not a major issue, just a bit

Re: Double Initialize - is that how it should be?

2009-03-16 Thread Chris Suter
Hi Steve, On Tue, Mar 17, 2009 at 1:21 PM, Steve Cronin steve_cro...@mac.com wrote: Folks; I use an object in my application called 'appDelegate'; it's a subclass of NSObject. I instantiate this object in the main Nib file This object has  IBActions for the main menu and since it is -app

Re: Fast dictionary with integer keys?

2009-03-15 Thread Chris Suter
Hi Clark, If your keys are integers, then you've got the best hash function possible: the identity function :) I know what you mean, but that's not strictly speaking true. If your integers were congruent modulo your hash table size, it wouldn't be a very good hash function. Regards, Chris

Re: NSTableView live resizing glitch

2009-03-12 Thread Chris Suter
Hi Ulai, On Fri, Mar 13, 2009 at 9:33 AM, Ulai Beekam ulaibee...@hotmail.com wrote: I'm having an NSTableView live resizing glitch that is driving me nuts. Please see this image: http://img15.imageshack.us/img15/2012/picture1tcz.png I really need to have the column width independent of

Re: NSTableView live resizing glitch

2009-03-12 Thread Chris Suter
Hi Corbin, On Fri, Mar 13, 2009 at 10:06 AM, Corbin Dunn corb...@apple.com wrote: That's doing too much redraw work :) I was aware that may be the case but it didn't matter for my needs; the performance is perfectly adequate for me. Please do log bugs when you run into these issues. I did

Re: Background Process?

2009-03-11 Thread Chris Suter
Hi Kyle, On Wed, Mar 11, 2009 at 5:02 PM, Kyle Sluder kyle.slu...@gmail.com wrote: Well, there is a sentence directly below that list that says the following: Because timers and other periodic events are delivered when you run the run loop, circumventing that loop disrupts the delivery of

Re: Background Process?

2009-03-10 Thread Chris Suter
Hi Kyle, On Wed, Mar 11, 2009 at 1:19 PM, Kyle Sluder kyle.slu...@gmail.com wrote: While NSTimers are not normal input sources, the frameworks are free to add any input source to the runloop that they wish.  And in order for your timer to fire, you need to keep the runloop awake, using at

Re: Background Process?

2009-03-10 Thread Chris Suter
Hi Darren, On Wed, Mar 11, 2009 at 2:28 PM, Darren Minifie minof...@gmail.com wrote: Can't somebody write a small app and and profile it to get a conclusive answer?  I'd do it but I'm lazy.  I am interested in the outcome though. Well, I did do that and ran it under Shark: zero CPU usage. I

Re: Code Signing Examples

2009-02-20 Thread Chris Suter
Hi Tom, (Sorry Tom for the duplicate—I meant to send this to the list earlier. Also, cross posting is generally frowned upon and the best list for code signing questions is the apple-cdsa list.) On Sat, Feb 21, 2009 at 1:47 AM, Tom Fortmann tfortm...@xcapesolutions.net wrote: Can anyone point

Re: Memory management question in Objective-C 2.0 @property notation

2009-02-04 Thread Chris Suter
Hi Kiel, On Thu, Feb 5, 2009 at 4:10 PM, Kiel Gillard kiel.gill...@gmail.com wrote: However, doing this will yield a memory leak: self.name = [[NSString alloc] init]; ...because the property definition tells the compiler the methods it synthesizes should retain the value. You're right that

Re: NSTask Leaking...

2009-01-29 Thread Chris Suter
Hi Mr Gecko, On Fri, Jan 30, 2009 at 6:33 AM, Mr. Gecko grmrge...@gmail.com wrote: I'm just going to use sscrypto framework for it... You don't need to use a third party framework for crypto stuff. There are common hashing functions built in to libSystem. Look at the CC_crypto man page. If

Re: Memory allocation issues with NSObject and NSString

2009-01-18 Thread Chris Suter
Hi Bill, On Mon, Jan 19, 2009 at 3:21 PM, Bill Bumgarner b...@mac.com wrote: foo = @; // foo is a reference to the empty string foo = [[NSString alloc] init]; // foo is a reference to the empty string The second is retained. The first is not. The first is a constant string and, thus,

Re: Development workflows for signed code?

2008-12-09 Thread Chris Suter
On Tue, Dec 9, 2008 at 4:12 AM, Jack Repenning [EMAIL PROTECTED] wrote: My experiments so far seem to show that none of those things happens. In fact, even if I modify one of the files, so that codesign -v no longer likes the bundle, it still seems to work. Is codesign -v the only (Leopard)

Re: NSArrayController bound to an array of strings

2008-11-16 Thread Chris Suter
On Mon, Nov 17, 2008 at 4:45 AM, Meik Schuetz [EMAIL PROTECTED] wrote: Dear all, If have seen lots of examples in which a NSTableView is bound to an NSArrayController which is bound to an array of entity objects, having various properties. However I am now trying to bind a table column to an

Re: newbie NSMutable dictionary subclass question

2008-11-16 Thread Chris Suter
Why does that crash when the first does not? Are subclasses required to have member variables, or can they just have new functions? Mine don't have any variables, maybe that is the problem? See:

Re: Mysterious warning

2008-11-12 Thread Chris Suter
On Wed, Nov 12, 2008 at 10:20 PM, Graham Cox [EMAIL PROTECTED] wrote: I just added some fairly old C++ lex/bison code to my app, code that has been in use for a long time elsewhere and works fine. My app is compiling with much stricter warnings than many of my other projects though, and this

Re: Mysterious warning

2008-11-12 Thread Chris Suter
On Thu, Nov 13, 2008 at 4:46 PM, Daniel Hyde [EMAIL PROTECTED] wrote: The order of evaluation of the arguments to a function is undefined so you have a problem where you're taking the address of wptr and you're pre-decrementing it. That doesn't look problematic to me -- decrementing a char*

Re: When does Cocoa get No more! from malloc?

2008-10-30 Thread Chris Suter
An internet search shows me that the error message... malloc: *** mmap(size=2097152) failed (error code=12) is quite common. What is the significance of the number 2097152, besides the fact that it is 2^21? It's just the amount of memory in bytes it was trying to allocate when it

Re: When does Cocoa get No more! from malloc?

2008-10-30 Thread Chris Suter
On Fri, Oct 31, 2008 at 1:28 AM, Michael Ash [EMAIL PROTECTED] wrote: Apparently it asks for 2MB at a time. For tiny regions (for blocks = 16 bytes), it looks like it appears to allocate 1 MB chunks. For small regions (blocks = 512 bytes), I think it's around 8MB blocks. I think the 2 MB must

Re: Finding out that a volume is going away before it does

2008-10-27 Thread Chris Suter
On Tue, Oct 28, 2008 at 1:50 AM, Francis Devereux [EMAIL PROTECTED] wrote: My code works on 10.4 8A428 PPC (after I changed mainRunLoop to currentRunLoop), but this probably isn't much help to you because DiskArbitration.framework is private on 10.3. You can use it fine on 10.3. As far as I

Re: tearing my hair, ok here is a compilable example.

2008-10-16 Thread Chris Suter
On Thu, Oct 16, 2008 at 7:54 PM, Chris Idou [EMAIL PROTECTED] wrote: I disagree. I changed both to be NSObjects, and nothing changed. I think it is to do with it being a subclass of NSObjectController. Changing it to an NSObject makes it work for me. -- Chris

Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning

2008-10-15 Thread Chris Suter
On Wed, Oct 15, 2008 at 9:03 PM, John Engelhart [EMAIL PROTECTED] wrote: On Oct 14, 2008, at 7:11 AM, Chris Suter wrote: You can't override the type for existing methods. For example, initWithString: always returns an id. You can define them as returning something different but the compiler

Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning

2008-10-14 Thread Chris Suter
On Tue, Oct 14, 2008 at 9:13 PM, Graham Cox [EMAIL PROTECTED] wrote: Isn't the problem here with the init method, rather than alloc? It's a problem with both. NSString et. al. return id because they are class clusters (and because it's the established convention), I believe the fact that

Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning

2008-10-14 Thread Chris Suter
On Tue, Oct 14, 2008 at 8:17 PM, Oleg Krupnov [EMAIL PROTECTED] wrote: You are right, casting from alloc worked, thank you. Is it the recommended practice to always cast after alloc? I still have a question in this regard. If the alloc returns id, then, from the compiler's perspective,

Re: [Obj-C Compiler Bug?] Two different classes declaring a message with the same name - compiler warning

2008-10-14 Thread Chris Suter
On Tue, Oct 14, 2008 at 7:43 PM, Oleg Krupnov [EMAIL PROTECTED] wrote: In my project I have two different, totally unrelated classes. @interface ClassA : NSObject{} -(id)initWithContext:(ContextA*)context; @end @interface ClassB : NSObject{} -(id)initWithContext:(ContextB*)context;

Re: Not so long filenames

2008-10-14 Thread Chris Suter
On Wed, Oct 15, 2008 at 7:00 AM, Gerriet M. Denkmann [EMAIL PROTECTED] wrote: So again my question: why it is too long in this context and where is this documented? This looks like a bug in the kernel code. It looks like it checks the UTF8 string length against kHFSPlusMaxFileNameChars (rather

Re: sending email with attachement from cocoa

2008-09-26 Thread Chris Suter
On Sat, Sep 27, 2008 at 4:11 AM, has [EMAIL PROTECTED] wrote: Alexander Cohen wrote: Is there a way to use a url request to open mail with all its fields completed but most importantly, contain an image attachement? Nope. If you want to send an email in the background, you'll need to look

Fwd: Memory cleanup when init fails?

2008-09-23 Thread Chris Suter
On Wed, Sep 24, 2008 at 5:05 AM, j o a r [EMAIL PROTECTED] wrote: On Sep 23, 2008, at 10:39 AM, Greg Parker wrote: You should first clean up anything you already did in your -init, then call [super dealloc]. [self dealloc] or [self release] are bad because they might call some subclass's

Re: How to determine if the system is started up from firewire disk

2008-09-09 Thread Chris Suter
On Wed, Sep 10, 2008 at 10:10 AM, Ryota Tsukiashi [EMAIL PROTECTED]wrote: I am writing a cocoa application for our firweire device. I need to know if the system is started up from firewire disk. For PowerPC with Mac OSX 10.4/10.5, I have used information from nvram boot-device. For IntelMac

Re: How to create a GUID?

2008-09-08 Thread Chris Suter
On Mon, Sep 8, 2008 at 8:28 PM, I. Savant [EMAIL PROTECTED] wrote: On Sep 7, 2008, at 10:44 PM, Adam R. Maxwell wrote: In addition to all the CFUUID solutions, there's also [[NSProcessInfo processInfo] globallyUniqueString]; a one-liner, but not thread safe. This, according to the

Re: NSTableView/NSOutlineView variable row height

2008-09-02 Thread Chris Suter
Hi Kevin, On Tue, Sep 2, 2008 at 3:58 AM, Kevin Meaney [EMAIL PROTECTED] wrote: I feel like I am missing something that should be obvious. Pointers would be helpful or a suggestion for something else to try. Here's some code I wrote a while back that we use. It works back to 10.3.7 (possibly

Re: how to delete the current user's directory?

2008-09-01 Thread Chris Suter
Hi Chris, On Tue, Sep 2, 2008 at 11:00 AM, Chris Hanson [EMAIL PROTECTED] wrote: On Sep 1, 2008, at 3:46 AM, XiaoGang Li wrote: hi, list, I have an uninstaller application , which is used to delete the files installed; and also i have a file which located in the current user's directory,

Re: Disc write speed options

2008-08-13 Thread Chris Suter
On Wed, Aug 13, 2008 at 1:04 AM, Matthew Mashyna [EMAIL PROTECTED] wrote: I'm trying to figure out how I can ask a DRDevice what burn speeds it's capable of so I can offer a choice to the user. When I call the status and info messages I don't see anything that looks useful. How can I get and

Re: How to tell whether an executable supports GC?

2008-08-07 Thread Chris Suter
On Fri, Aug 8, 2008 at 2:48 PM, André Pang [EMAIL PROTECTED] wrote: Hi all, is there a reasonably easy way to programmatically determine whether a particular executable on-disk supports garbage collection? Cocoa methods aren't necessary; all C functions are welcome. Poking around in an

Re: simple string to NSData question

2008-08-07 Thread Chris Suter
On Fri, Aug 8, 2008 at 3:49 PM, Ken Thomases [EMAIL PROTECTED] wrote: On Aug 7, 2008, at 2:15 PM, phil swenson wrote: I'm trying to parse an xml file, so to get started I put the xml in a String: NSString *xml = @?xml version=\1.0\

Re: Distributed Objects connection went invalid while waiting for a reply

2008-07-31 Thread Chris Suter
Hi Hamish, On Thu, Jul 31, 2008 at 10:16 PM, Hamish Allan [EMAIL PROTECTED] wrote: On Tue, Jul 29, 2008 at 3:33 AM, Chris Suter [EMAIL PROTECTED] wrote: It sounds to me like you've got some kind of timing issue and that the delay that you're adding is merely hiding the true cause

Re: Checking for hackintosh

2008-07-30 Thread Chris Suter
On Thu, Jul 31, 2008 at 1:00 PM, Matt Burnett [EMAIL PROTECTED]wrote: Then shouldn't you be able to determine if they are using a hackintosh by the descriptions of support requests they are submitting? Sure, if customers are willing to disclose that they're running on a Hackintosh which isn't

Re: Setting conditional breakpoint on Cocoa method?

2008-07-28 Thread Chris Suter
Hi Graham, On Mon, Jul 28, 2008 at 5:02 PM, Graham Cox [EMAIL PROTECTED] wrote: Once in a blue moon, I get a console message that a nil string was passed to [NSConcreteAttributedString initWithString:] I'd like to find out where this is coming from by setting a breakpoint there, but only for

Re: Distributed Objects connection went invalid while waiting for a reply

2008-07-28 Thread Chris Suter
Hi Hamish, On Tue, Jul 29, 2008 at 7:35 AM, Hamish Allan [EMAIL PROTECTED] wrote: For anyone searching the archives for connection went invalid while waiting for a reply: I never found out why this message was appearing, but I found a workaround. Instead of calling [client

Re: NSArray problems

2008-07-27 Thread Chris Suter
On 28/07/2008, at 1:06 PM, Daniel Richman wrote: I'd say you've either got a memory management issue, e.g. you're forgetting to retain numbers (are you using garbage collection?), or the debugger is getting confused and printing something else. That was it! I had forgotten to retain

Re: NSDocument and window ivar

2008-07-27 Thread Chris Suter
On 28/07/2008, at 12:26 PM, Todd Heberlein wrote: But I cannot pass messages to the window variable. For example, I cannot send it the setTitle: message. If you're looking at changing the document title for a document you should look at overriding NSWindowController's

Re: KVO: Observing an aggregate property of a collection?

2008-07-10 Thread Chris Suter
On 11/07/2008, at 7:46 AM, Jens Alfke wrote: How do I set up key-value observing of an aggregate property over an array, like a sum? Say I have a Bulb class with a boolean lit property. I have an NSArrayController with an array of Bulbs, being shown in a table view. To compute the

Re: Such a newbie question that I'm embarrassed to ask it :-)

2008-07-10 Thread Chris Suter
On 11/07/2008, at 12:36 PM, Dale Jensen wrote: I have the need to modify a menu item title, so I: a) Added a tag to the menu item in IB (selected the menu item, then went to the first tab of the Inspector, and added a number in the Tag field. I tried both 99 and 1). b) Added this code

Re: Calculating accurate bounds of stroked paths

2008-07-09 Thread Chris Suter
Hi Graham, On 08/07/2008, at 10:16 PM, Graham Cox wrote: A close second best would be a rect that was the worst case bounds for a given stroke width (it wouldn't need to know the actual path, just its basic bounds), which thus assumed that all angles were acute enough to trigger the mitre

Re: Calculating accurate bounds of stroked paths [SOLVED]

2008-07-09 Thread Chris Suter
Hi Graham, On 09/07/2008, at 4:37 PM, Graham Cox wrote: On 9 Jul 2008, at 4:02 pm, Chris Suter wrote: so you can get a worst case bounds by ignoring the mitre limit. No you can't. If the stroke width is 'w' then you can outset the bounds by w/2 to enclose the path for straight edges

Re: Cocoa says not KVC compliant

2008-07-02 Thread Chris Suter
On 03/07/2008, at 3:13 AM, Milen Dzhumerov wrote: [snip] Any hints on why the class is not KVC-compliant? I've read the docs and it seems to satisfy the bullet points listed (moreover it's even declared as @property so the naming of the setters / getters should be alright). Pointers

Re: Thread safe reference counting

2008-06-29 Thread Chris Suter
On 30/06/2008, at 9:06 AM, atebits wrote: Perhaps I'm blind, but after pouring over every scrap of information I could find, I could not find the answer to this question. Are -retain and -release thread-safe? (Perhaps as atomic increments/ decrements internally?) Yes, -retain and

Re: getting accurate file modification time?

2008-06-17 Thread Chris Suter
On 18/06/2008, at 1:04 PM, Angelo Chen wrote: Hi, I use the code at end to get modification timestamp of a file including seconds, it works well until I encounter following: I have a file that is in the Document folder, the creation and modification date are both:2008-05-04 22:06:46

Re: argument checks

2008-06-15 Thread Chris Suter
On 12/06/2008, at 10:01 PM, Graham Cox wrote: But maybe the original point is getting lost? You asserted (pardon the pun) that passing a nil argument was never acceptable My exact words were: “it’s often not safe to pass nil objects as arguments” and I stand by that. I raised the point

Re: looking for a crc code

2008-06-15 Thread Chris Suter
On 15/06/2008, at 3:49 AM, Michael Hall wrote: On Jun 14, 2008, at 10:25 AM, Jens Alfke wrote: On 14 Jun '08, at 4:59 AM, Ilan Volow wrote: No mention at all I can find (in the 20 seconds I scanned the first two result pages) of any cocoa CRC implementations. If a newbie were to do a

Re: Issue with displaying URI prefixes on child elements using NSXML

2008-06-15 Thread Chris Suter
On 12/06/2008, at 6:54 PM, Nathan Kinsinger wrote: I'm curious about what using elementWithName:URI: is supposed to do when you don't pass a qualified name in, or rather, why have it at all? The URI seems to be redundant if you are already passing the qualified name in. Just as a test

Re: Issue with displaying URI prefixes on child elements using NSXML

2008-06-12 Thread Chris Suter
On 11/06/2008, at 3:19 PM, Lawrence Johnston wrote: Hey everybody, I've got an issue that I can't figure out. If I'm using this code: NSString *XMLForDisplay { NSXMLElement *root = [NSXMLNode elementWithName:@root]; [root addNamespace:[NSXMLNode namespaceWithName:@a

Re: argument checks

2008-06-12 Thread Chris Suter
On 12/06/2008, at 4:51 PM, Graham Cox wrote: NSNumber* myNum = nil; /* stuff */ NSAssert( myNum != nil, @some error message); [myClass calc:myNum]; Messages to nil are safe - it will treat your number as having a value of 0. Thus as long as you initialise it to nil, your code will

Re: argument checks

2008-06-12 Thread Chris Suter
On 12/06/2008, at 5:29 PM, Graham Cox wrote: On 12 Jun 2008, at 5:03 pm, Chris Suter wrote: In the original example, myNum was being passed as a argument rather than having a message to sent to it and it’s often not safe to pass nil objects as arguments. Hmmm... well, what's

Re: Setting NSObjectController's to file's owner

2008-05-15 Thread Chris Suter
On 15/05/2008, at 5:21 PM, André Pang wrote: I have a nib file containing an NSObjectController. The NSObjectController's content is set to the File's Owner proxy object, and this creates a retain cycle. (The file's owner never gets deallocated because the object controller retains it,

Re: How to send email without using email client

2008-05-08 Thread Chris Suter
On 08/05/2008, at 8:10 PM, vinitha ks wrote: I'm working with mac 10.5 and xcode3.0.I've to send email from an application with out using any email client.When i try to use message framework,It doesn't work.(deliverMessage always returns no)Is there any any way to send email from my

Re: Immediate memory release

2008-04-30 Thread Chris Suter
On 01/05/2008, at 12:27 PM, Jens Alfke wrote: On 30 Apr '08, at 5:53 PM, Graham Cox wrote: If some code throws an exception won't that mean that pool is leaked? (and all of its contents up to that point too; applies to both of our code examples). Yup. You can work around that by using

Re: Calculating file size

2008-04-28 Thread Chris Suter
On 29/04/2008, at 2:58 AM, Aaron Burghardt wrote: When I learned of it, roughly in the timeframe of Jaguar or Panther, there was a document with a title like Mac OS X System Overview, or something similar--I think that it where I read about it. I'm sure it was documented in somewhere in

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-24 Thread Chris Suter
On 24/04/2008, at 4:14 PM, Daniel DeCovnick wrote: Honestly, I don't care how the data is stored, as long as I've got some reliable place to store file-specific data such that it can be reliably tied to the file (cross-user/cross-computer concerns are primary, cross-platform concerns are

Re: Safe frameworks for privileged tools?

2008-04-23 Thread Chris Suter
On 24/04/2008, at 4:35 AM, Michael Watson wrote: Yes, it's a helper tool. It runs for a couple of seconds (under normal conditions) and exits immediately. It interacts with the file system by reading information about some directories, so its launched duration is, of course, bound to the

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Chris Suter
On 24/04/2008, at 11:53 AM, Daniel DeCovnick wrote: I'm pretty sure the resource fork size limits are rather large... EV Nova's data files, in which everything is stored in the resource fork, go up to 13.8 MB. Also, it's a definite advantage that the resource fork is well-documented.

Re: Resource Fork - is this a good use/the right thing to do?

2008-04-23 Thread Chris Suter
On 24/04/2008, at 2:28 PM, Graham Cox wrote: On 24 Apr 2008, at 12:59 pm, Chris Suter wrote: The limits for resource forks are the same as for data forks Not true - the ResourceMap contains some 24-bit pointers, or at least it used to, as well as some 16-bit length fields as well

Re: Weird build error

2008-04-17 Thread Chris Suter
On 18/04/2008, at 9:54 AM, Kyle Sluder wrote: GCC is alerting you to the fact that the switch at the end of the statement is unnecessary. That's not what GCC is trying to do; GCC is trying to alert you to the fact that it's invalid syntax. As I just said in my earlier e-mail, labels must

Re: looking for sample code to read UUID from a disk volume.

2008-04-09 Thread Chris Suter
On 10/04/2008, at 5:05 AM, Herb Petschauer wrote: And note that only a GUID partition table scheme will yield partitions with a UUID. The old style Apple Partition Map will not (so any legacy or even current PPC machines). No this is incorrect. Volumes have a UUID of their own and is

Re: Objective-C Instance Variable Names

2008-04-06 Thread Chris Suter
On 07/04/2008, at 9:39 AM, John Stiles wrote: You can't be KVC compliant if you use prefixes like m_, so this limits your potential for using things like bindings. I think you can be KVC compliant but you have to define setters and getters for everything. - Chris

  1   2   >