Ever wanted to use NSLog in the iPhone SDK to see the value of a BOOL? Heck I have! “How do you do it”, you say? Just like this:
NSLog(@"BOOL = %@\n", (boolVar ? @"YES" : @"NO"));
Then again, I don’t use NSLog anymore, I use DebugLog
Ever wanted to use NSLog in the iPhone SDK to see the value of a BOOL? Heck I have! “How do you do it”, you say? Just like this:
NSLog(@"BOOL = %@\n", (boolVar ? @"YES" : @"NO"));
Then again, I don’t use NSLog anymore, I use DebugLog
Last month I had the honor of being a presenter at CFUnited 2010.
Luis Majano and I gave a presentation on creating “ColdFusion Powered iPhone Applications”. Specifically, coldfusion apps running on the ColdBox Framework
The volume is low, so you need to crank it up. You can download our demo source code and slides here
[vimeo]http://vimeo.com/13864563[/vimeo]
If you have UITextField in your app and you want to validate a value or see is there something in it you might think to write some code like this:
if (![addNewCellTextField.text isEqualToString:@""])
You would be right, but this will fail if the field is never touched! When a user taps the field, and it gets focus, UITextField.text = nil. That means that the condition above would be true, thats not what we want at all!
But once the UITextField is touched, the value becomes an instance of NSString with value of @””. So make sure that you write your code to check for the nil case, like this:
if (addNewCellTextField.text != nil && ![addNewCellTextField.text isEqualToString:@""])
I will be speaking at this years CFUnited conference in Lansdowne Virgina, at the Lansdowne Resort
CFUnited is an annual conference based around the Coldfusion, Flex, and AIR languages and platforms.
This year I will be co-presenting with Luis Majano on “ColdFusion Powered iPhone Applications”
The session will cover how to develop and power iPhone applications via ColdFusion REST Services. I will cover all the development basics, intricacies, best practices, etc of iPhone development. The focus will be on how to make an iPhone application connect and consume ColdBox REST services.
The ColdFusion portion of the session will be led by Luis Majano, Creator of the Coldbox Framework.
I’m really looking forward to this great experience. I will be posting the slides and sample code here, after the presentation.
If you get the error “warning:comparison between pointer and integer”, odds are you are thinking right, but implementing your comparison wrong.
ur doin it wrong
if(count == 2) {
the right way
if([count intValue] == 2) {