Re: Checking One Array Against Another

2008-11-29 Thread Graff
On Nov 29, 2008, at 1:00 PM, Pierce Freeman wrote: The only problem with running that is that I get a error in the log and it doesn't seem to be working: -[NSCFSet minusSet:]: mutating method sent to immutable object My slightly modified code is below: NSMutableSet *openApplicationsSet = [N

Re: Checking One Array Against Another

2008-11-29 Thread Graff
On Nov 29, 2008, at 1:00 PM, Pierce Freeman wrote: The only problem with running that is that I get a error in the log and it doesn't seem to be working: -[NSCFSet minusSet:]: mutating method sent to immutable object My slightly modified code is below: NSMutableSet *openApplicationsSet = [N

Re: Checking One Array Against Another

2008-11-28 Thread Graff
On Nov 28, 2008, at 9:59 PM, Pierce Freeman wrote: Would there be some way using the NSSet method to output a list of the applications that the user needs to close in order for the current applications to be "in the good list"? You can use the NSMutableSet method minusSet: NSSet *allo

Re: Checking One Array Against Another

2008-11-28 Thread Graff
On Nov 28, 2008, at 8:25 PM, Pierce Freeman wrote: I am attempting to check one array's contents against another's, but so far it hasn't been working. In the actual application, I am checking the current open applications against an "okay" application list, and just thought of another problem

Re: BAD_EXC_ACESS

2008-11-20 Thread Graff
On Nov 20, 2008, at 4:28 PM, Richard S. French wrote: My program compiled and ran once. Appeared that possible run away where table view was just being populated over and over again. I did a force quit. Now I am getting a debug error of ³BAD_EXC_ACCESS². All that¹s displayed on the debug sc

Re: Need help to make this method prettier

2008-11-01 Thread Graff
On Nov 1, 2008, at 1:56 PM, Andre Masse wrote: I'm implementing a custom NSFormatter. I want a number with 9 digits displayed as "123 456 789". So before implementing the formatter I made a test project to check the conversion. The version I did get the job done but its not pretty :-) Any more g

Re: CGPoint wrapper?

2008-10-23 Thread Graff
On Oct 23, 2008, at 3:06 AM, Ken Ferry wrote: On Wed, Oct 22, 2008 at 9:09 PM, Graff <[EMAIL PROTECTED]> wrote: NSPoint and CGPoint are structs that are essentially the same. You can convert between them with a simple cast: NSPoint point = *(NSPoint *)&myCGPo

Re: CGPoint wrapper?

2008-10-22 Thread Graff
se the function NSPointFromCGPoint() which does the exact same thing for you: NSPoint point = NSPointFromCGPoint(myCGPoint); (Declared in NSGeometry.h) - Graff ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: NSGlyph

2008-10-04 Thread Graff
On Oct 4, 2008, at 11:59 AM, hatzicware wrote: I can't figure out how NSGlyph works in methods like this: [path appendBezierPathWithGlyph:'x' inFont:[NSFont userFontOfSize: 14.0]] (Of course 'path' is an NSBezierPath.) What I get on the screen is not an '+', but an upper-case "H" in s

Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?

2008-09-30 Thread Graff
On Oct 1, 2008, at 12:29 AM, Michael Robinson wrote: sin(90); returns 0 as well. When I use Apple's Calculator and ask it to tell me the result of sin(90), it gives me 1. The C function sin() takes radians as its parameter. In order to use degrees you need to multiply by M_PI and divide by

Re: NSUInteger in for-loop?

2008-09-14 Thread Graff
ounting for the fact that you'll get 1 less run through the loop. Hope this helps! - Graff ___ 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-

Re: Two Dimensional Array

2008-09-12 Thread Graff
On Sep 12, 2008, at 3:24 PM, Graff wrote: // create the 2-D array NSArray *twoD = [NSArray arrayWithObjects: [NSMutableArray new], [NSMutableArray new

Re: Two Dimensional Array

2008-09-12 Thread Graff
On Sep 12, 2008, at 5:05 AM, Jordon Hirshon wrote: I'm new to Objective-C. Can someone suggest an approach to building a two dimensional array of integers? You can either make an NSArray that contains other NSArrays or just use a c-style multidimensional array. example of using an NSArra

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

2008-09-01 Thread Graff
On Mon, 1 Sep 2008 18:46:41 +0800, 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, like the ~/Library/LaunchAgents/com..plist. and how can i delete th

Re: NSXMLNode and NSXMLElement issue

2008-08-28 Thread Graff
On Aug 28, 2008, at 3:11 PM, Andrew R. Kinnie wrote: I am attempting to programmatically create an html (rather, xhtml) document using NSXMLDocument, NSXMLElement, etc. I am able to create the document and it works, but I am not sure how to create text which is not inside a paragraph or ano

Re: Removing Applications from the Dock Programmatically

2008-08-26 Thread Graff
I forgot to mention that you'll have to force the Dock to re-load its preferences after fooling around like this. I really only know how to do this through the terminal or through AppleScript, although I'm sure there are other ways to do it Here's an example of an AppleScript: NSString *q

Re: Removing Applications from the Dock Programmatically

2008-08-26 Thread Graff
On Aug 26, 2008, at 5:34 PM, Kevin Kicklighter wrote: I need to remove applications that were on the the Dock, programmatically (running Leopard 10.5.4). Does anyone have a clue as to how I could accomplish this? You can access that information through NSUserDefaults as follows: N

Re: Lazy Loading Archive

2008-08-25 Thread Graff
On Aug 25, 2008, at 8:26 PM, Graham Cox wrote: On 25 Aug 2008, at 11:56 pm, Graff wrote: I have a large class I'm archiving that I would like to lazy-load. It's basically a wrapper around a NSArray and what I'd like to do is load some instance variables but leave the array

Re: Lazy Loading Archive

2008-08-25 Thread Graff
On Aug 25, 2008, at 2:05 PM, Shawn Erickson wrote: On Mon, Aug 25, 2008 at 6:56 AM, Graff <[EMAIL PROTECTED]> wrote: I have a large class I'm archiving that I would like to lazy-load. It's basically a wrapper around a NSArray and what I'd like to do is load some instanc

Lazy Loading Archive

2008-08-25 Thread Graff
I have a large class I'm archiving that I would like to lazy-load. It's basically a wrapper around a NSArray and what I'd like to do is load some instance variables but leave the array archived until a later time in order to save time and memory. When I implement the NSCoding protocol meth