Re: [Obj-C] if (self) vs. if (self != nil)

2012-02-27 Thread Citizen
On 27 Feb 2012, at 03:51, Preston Sumner wrote: > On Feb 26, 2012, at 7:38 PM, Graham Cox wrote: > >> >> On 27/02/2012, at 1:27 PM, Karl Goiser wrote: >> >>> use double parentheses >> >> >> Yes, but that's not what the poster was suggesting. I pointed out why that >> form is bad. >> >> This

Re: Document-based app: design question

2011-10-21 Thread Citizen
oderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/citizen%40zenopolis.com > > This email sent to citi...@zenopolis.com __

Re: ArrayController vs Pop-up button vs Transformer -- three way tag team death match!

2011-04-19 Thread Citizen
On 19 Apr 2011, at 08:41, Ben Golding wrote: > I am a bit stumped. I have an array controller which I have hooked up to a > pop-up button and that works quite well. The members of the array are > NSStrings but I would like to reformat them when they're displayed by the > pop-up button. Seem

Re: I am Getting 2 Preferences Files

2010-03-22 Thread Citizen
From my observations the com..name>.LSSharedFileList.pList files are written out (well, actually renamed and moved from a temporary file) by a background process within a second of the application quitting. This does appear to be normal behavior under Snow Leopard, but does not appear to be

Re: Generating random numbers

2009-08-05 Thread Citizen
On 5 Aug 2009, at 11:44, Mahaboob wrote: I need to produce 15 random numbers between 1 to 16 without repeating any number. I used the code like int i,j; for(i=0;i<15;i++){ j =random() % 15 +1; NSLog(@"No: %d => %d \n",i,j); srandom(time(NULL)+i); } But some numbe

Re: How to know CD Driver type

2009-05-13 Thread Citizen
On 12 May 2009, at 23:03, Citizen wrote: On 12 May 2009, at 06:48, Chris Gardner wrote: I do not know how to know CD Driver type, which can read CD or can read DVD. I want to know the CD Driver whether can read CD disc or DVD disc. Though I have used DRDevice, I can not get information

Re: How to know CD Driver type

2009-05-12 Thread Citizen
Hello Chris, On 12 May 2009, at 06:48, Chris Gardner wrote: I do not know how to know CD Driver type, which can read CD or can read DVD. I want to know the CD Driver whether can read CD disc or DVD disc. Though I have used DRDevice, I can not get information about the CD Driver can read CD

Re: Custom log file for NSLog

2009-05-05 Thread Citizen
on: http://lists.apple.com/mailman/options/cocoa-dev/tcurdt%40vafer.org This email sent to tcu...@vafer.org ___ 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.ap

Re: NSScrollView like iTunes

2009-03-20 Thread Citizen
On 20 Mar 2009, at 06:35, Graham Cox wrote: On 20/03/2009, at 5:29 PM, Chris Purcell wrote: I'm trying to create a view similar to the left iTunes bar (http://i39.tinypic.com/2hwp7w5.png ) and many other apps (Mail, iCal, etc.). Is this a NSScrollView or NSOutlineView? Or am I going about t

Sharing a Bindings Controller between nibs

2008-10-14 Thread Citizen
Hi, I'm just getting to grips with bindings. I have a master-detail interface, where the Detail interface is in a separate nib from the main Master interface (so that different Detail interfaces can be swapped in). The main Master interface nib contains an NSTreeController which is used to

Re: Appropriate use of bindings?

2008-10-07 Thread Citizen
The following article discusses five different approaches to the Observer Pattern in Cocoa, it may be of some use: http://cocoawithlove.com/2008/06/five-approaches-to-listening-observing.html - Dave On 7 Oct 2008, at 17:31, Karan, Cem (Civ, ARL/CISD) wrote: I'm having a slight dilemma in deci

Re: App name from Bundle Identifier?

2008-09-12 Thread Citizen
On 12 Sep 2008, at 22:06, Dave DeLong wrote: I've been looking inside NSWorkspace, NSBundle, NSApplication, NSFileWrapper, etc for some way to get the display name of an application from it's bundle identifier, but I can't find anything. Is there a way to do this? For example, if I have

Re: Regular Expressions?

2008-06-06 Thread Citizen
pdate your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/citizen%40zenopolis.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments t

Re: NSPasteboard Delegate

2008-05-22 Thread Citizen
Can you copy and paste your awakeFromNib method and provide more detail about the exception raised? On 22 May 2008, at 08:57, Adil Saleem wrote: I am trying to set my object as delegate of NSPasteBoard. I am calling from awakeFromNib NSPasteboard *pb = [NSPasteboard generalPasteboard]; [pb s

Re: create a directory (UTF8 string) in cocoa

2008-05-21 Thread Citizen
On 22 May 2008, at 01:12, Wayne Shao wrote: How do I create a new directory in Cocoa? e.g, ~/a/b existsand I want to create ~/a/b/c/d/file.txt. So I need to something equivalent to mkdir -p ~/a/b/c/d I could only fine mkdir() in C. Is there anything in Cocoa? NSFileManager has two

Re: Question about DRFrameworks

2008-04-30 Thread Citizen
On 30 Apr 2008, at 04:21, Development wrote: I am using the DRFrameworks and trying to set the finder window view mode for the disc thats created. According to the documentation this is done by passing an NSNumber to the properties dictionary for the key DRMacWindowView The problem is that

Re: Why is [nil aMessage] a no-op?

2008-04-18 Thread Citizen
On 18 Apr 2008, at 05:56, Adam P Jenkins wrote: On Apr 18, 2008, at 12:47 AM, Bill Bumgarner wrote: On Apr 17, 2008, at 11:20 PM, Adam P Jenkins wrote: Exactly. And now that the convention of methods returning self no longer exists, it seems like there's no longer any advantage to this

Re: Singletons on Leopard with GC

2008-04-11 Thread Citizen
on: http://lists.apple.com/mailman/options/cocoa-dev/citizen%40zenopolis.com This email sent to [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mod