Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Mobile Development > BOOK: Professional iPhone and iPad Database Application Programming
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Professional iPhone and iPad Database Application Programming
This is the forum to discuss the Wrox book Professional iPhone and iPad Database Application Programming by Patrick Alessi; ISBN: 978-0-470-63617-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional iPhone and iPad Database Application Programming section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 18th, 2012, 06:41 PM
Registered User
Points: 18, Level: 1
Points: 18, Level: 1 Points: 18, Level: 1 Points: 18, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default Sending NSString to another viewController

I want to set an NSString in the RootViewController then when the user goes to DetailView, i could pass that string with the new view.

RootViewController
---------------------
Code:
.h

    NSString *core;


@property (nonatomic, retain) NSString *core;


.m

DetailViewController *DetailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];

DetailViewController.core = core;

DetailViewController
-----------------------
Code:
.h

    NSString *core;


@property (nonatomic, retain) NSString *core;


.m

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:core]];
NSLog(@"core is => %@",core);
every time core is null

i also try


DetailViewController
-----------------------
Code:
.h

    NSString *core;


@property (nonatomic, retain) NSString *core;

-(void) getcore:(NSString*) cores;


.m

-(void) getcore:(NSString*) cores{
    cores = [core retain];   
}

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:core]];
NSLog(@"core is => %@",core);

RootViewController
---------------------
Code:
.h

    NSString *core;


@property (nonatomic, retain) NSString *core;


.m

DetailViewController *DetailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];


[storeDetailViewController getcore:core];
with the same result.
Reply With Quote
  #2 (permalink)  
Old January 19th, 2012, 12:54 AM
Friend of Wrox
Points: 1,671, Level: 16
Points: 1,671, Level: 16 Points: 1,671, Level: 16 Points: 1,671, Level: 16
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2010
Posts: 298
Thanks: 1
Thanked 62 Times in 60 Posts
Default

Based on what you have posted, you have never allocated, initialized or set the string to any characters. You are trying to open a URL with a string whose value is NULL. What is the value the NSString is supposed to be set to?
Bob
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
(re-)connecting xib and viewController [xcode 4] briomusic BOOK: Beginning iOS 4 Application Development 1 July 1st, 2011 01:45 PM
sending xml parameswaranvv XML 1 September 23rd, 2008 02:41 PM
sending sms abcd_wxyz56 General .NET 0 November 17th, 2006 01:42 AM
sending mail anita VB How-To 3 September 30th, 2004 04:48 PM



All times are GMT -4. The time now is 11:49 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.