Re: Safe way to convert C String to NSString

2011-08-18 Thread Howard Siegel
If the C strings are being read in from a file, you can use the stringWithContentsOfFile:usedEncoding:error: or initWithContentsOfFile:usedEncoding:error: methods which will try to guess the encoding and return the string and the encoding it used back to you. But even these methods are just

Re: How to Identify if the device is used in iAD supported Regions

2011-08-04 Thread Howard Siegel
Haven't yet ventured in to iAd territory and don't know any of the data objects involved, so could be off in left field here. Since you will always get the -bannerViewDidLoadAd: delegate callback, even for the test ad, would it be possible to look inside the ad data to see if it is the test

Re: UITextField Questions

2011-07-25 Thread Howard Siegel
On Mon, Jul 25, 2011 at 18:31, Brooke Gravitt bro...@gravitt.org wrote: On Mon, Jul 25, 2011 at 9:19 PM, Conrad Shultz con...@synthetiqsolutions.com wrote: Take a look at UITextInputTraits to specify a numeric keyboard. (IIRC this can be done in IB too.) Take a look at

Re: UITextField Questions

2011-07-25 Thread Howard Siegel
On Mon, Jul 25, 2011 at 19:43, Brooke Gravitt bro...@gravitt.org wrote: The Xcode banter has been interesting as well - count me as one of the folks who used ProjectBuilder/IB on NextStep and CodeWarrior MPW on the MacOS side. I still generally edit code in Vim, though. My flamewars have

Re: Timing some code execution outside Instruments

2011-07-21 Thread Howard Siegel
Yes On Thu, Jul 21, 2011 at 10:59, Eric E. Dolecki edole...@gmail.com wrote: I'm curious if there is a way to NSLog how long some code takes to execute (outside of using Instruments). In Flash one can use getTimer and see how much time passed inline. Is there a way to do this in Obj-C?

Re: Malformed URL string in openURL

2011-06-07 Thread Howard Siegel
On Tue, Jun 7, 2011 at 18:20, Jens Alfke j...@mooseyard.com wrote: On Jun 7, 2011, at 6:17 PM, James Merkel wrote: mapquestURLString = [NSString stringWithString:@ http://mapq.st/?maptype=hybridq=39.7452,-104.98916(Test point label)”]; It’s not the parens that are illegal, it’s the

Re: encoding of file names

2011-05-23 Thread Howard Siegel
Look at NSString's decomposedStringWithCanonicalMapping and decomposedStringWithCompatibilityMapping methods. They'll map Unicode strings to normalized forms that you can then use and compare. - h On Mon, May 23, 2011 at 21:22, Chris Idou idou...@yahoo.com wrote: If I take a string from an

Re: NSDatePicker, selecting elements, and field editors

2011-05-20 Thread Howard Siegel
On Fri, May 20, 2011 at 11:51, Nick Zitzmann n...@chronosnet.com wrote: I read TFM and searched TFW, and could not find answers to two questions I have about NSDatePicker: 2. How do I select and unselect date picker elements programmatically? setDatePickerElements: Sets a bitmask

Re: Defining code based on build target

2011-05-18 Thread Howard Siegel
What you are trying to do is perfectly fine to create a free vs non-free version of your app. The sticking point is how are you defining ISFREE??? The #if takes an expression which is evaluated to see if it is true (non-zero) or false (zero). Did you define ISFREE to be a non-zero numeric value??

Re: I'm given a project.pbxproj file....

2011-05-18 Thread Howard Siegel
The .xcodeproj isn't really a folder, it just looks that way on the FTP site. On your Mac it is really a package. You want to download all the files from that site (the .xcodeproj, the .m files, the .h file, and the .pch file). Drop 'em in a folder and double click on the .xcodeproj file to open

Re: I'm given a project.pbxproj file....

2011-05-18 Thread Howard Siegel
portion is giving me the problems. Much thanks -- Ron On May 18, 3:14 pm, Howard Siegel hsie...@gmail.com wrote: The .xcodeproj isn't really a folder, it just looks that way on the FTP site. On your Mac it is really a package. You want to download all the files from that site

Re: setState has no effect on an NSButton

2011-05-09 Thread Howard Siegel
From those symptons, it certainly sounds like there is a missing/crossed connection in IB for those buttons or you are mising @property/@synthesize lines for those buttons. - h On Mon, May 9, 2011 at 18:19, Martin Batholdy batho...@googlemail.comwrote: Hi, I have a preference window with

Re: iOS Best Practice Question

2011-04-26 Thread Howard Siegel
Someone over on StackOverflow mentioned he had written a custom class to present a UIPickerView (or a UIDatePickerView) in a UIActionSheet that slides up from the bottom of the page, and was making the code available on Github. Don't have the URL handy right now, but should be easy enough to

Re: Book for expert programmer about cocoa and Objective-C

2011-04-04 Thread Howard Siegel
On Sun, Apr 3, 2011 at 21:19, Scott Anguish sc...@cocoadoc.com wrote: On Apr 3, 2011, at 9:15 PM, Howard Siegel wrote: Would you say to get Cocoa Programming by Anguish, Buck, Yacktman (circa Sept 2002), or get Cocoa Programming Developer's Handbook by David Chisnall (circa Jan 2010

Re: Book for expert programmer about cocoa and Objective-C

2011-04-03 Thread Howard Siegel
Would you say to get Cocoa Programming by Anguish, Buck, Yacktman (circa Sept 2002), or get Cocoa Programming Developer's Handbook by David Chisnall (circa Jan 2010), which according to Amazon is the newer version of the book??? - h On Fri, Apr 1, 2011 at 13:01, John Pannell

Re: Book for expert programmer about cocoa and Objective-C

2011-04-03 Thread Howard Siegel
No fair You have a vested interest ;-) ;-) ;-) ;-) - h On Sun, Apr 3, 2011 at 20:49, Scott Anguish sc...@cocoadoc.com wrote: I’d second that. On Apr 1, 2011, at 5:31 PM, Scott Ellsworth wrote: I am told that buck and yacktman's cocoa design patterns is a good source of interview

Re: AppDelegate does not implement the NSTextViewDelegate protocol

2011-03-31 Thread Howard Siegel
Have you properly added the protocol declaration to your class interface definition?? e.g. @interface YouClass : BaseClass NSTextViewDelegate {...} - h On Thu, Mar 31, 2011 at 16:09, JAMES ROGERS jimrogers_w4...@me.com wrote: Everything works but I am getting the following: Warning:

Re: test if folder contains file based on NSURLs

2010-04-30 Thread Howard Siegel
That will only work if all of the NSURLs all either absolute or relative, and are all either based on the same physical folder paths or are based on the same set of aliases/links. If there are different paths based on different aliases or links, then they won't match. You might think about using

Re: recursion anxiety

2010-03-25 Thread Howard Siegel
You never seem to be capturing the result of the recursive calls for return to the caller. You final if block should look like this: if(([endNode depth] ([self contextDepth] - 1)) ([mutableSeq count] 1) (found == YES)) { [mutableSeq removeObjectAtIndex:0];

Re: Carbon is C++?

2010-02-25 Thread Howard Siegel
http://developer.apple.com/carbon/ http://en.wikipedia.org/wiki/Carbon_%28API%29 On Thu, Feb 25, 2010 at 15:40, Chunk 1978 chunk1...@gmail.com wrote: is Apple's Carbon basically code written in C++, while Cocoa is written in Objective-C? should developers avoid using frameworks written in

Re: A password strength checker

2010-01-11 Thread Howard Siegel
'a' and 21-character 'a' password as 10 (with 0 being no password or a worthless password). Seems more accurate. If anyone's interested in it, I wrote a Cocoa version of their implementation. I'd be happy to make it available. Jim On Thu, Jan 7, 2010 at 2:32 PM, Howard Siegel hsie...@gmail.com

Re: A password strength checker

2010-01-10 Thread Howard Siegel
Have a look at the source code for KeePass Password Safe ( http://keepass.info/). It has a password generator and strength computation. Version 1.x is written in C++ for MS Windows (using MFC). Version 2.x is a rewrite in C# for .NET. It has been ported as KeyPassX for Mac OS X and Linux. - h