I have a ready-to-use project ( microblog ),I want to add the microblog project to my other project which has Three20 integrated in. From the - (void)clickActionItem {}; function of the three20UI, to call the microblog project.
And now, I can call the microblog project from my other project, but can't call it from my other project's three20UI.
For those codes: self.window.rootViewController = self.sinaWeiBoSDKDemoViewController; [self.window makeKeyAndVisible];
I get errors: "request for member 'window' in something not a structure or union"
Would you please tell me how to do it?
thanks!
when I change - (void)clickActionItem {} in the three20UI as follows: - (void)clickActionItem { SinaWeiBoSDKDemoViewController *sinaWeiBoSDKDemoViewController = [[[SinaWeiBoSDKDemoViewController alloc] initWithNibName:@"SinaWeiBoSDKDemoViewController" bundle:nil] autorelease]; [self.navigationController pushViewController:sinaWeiBoSDKDemoViewController animated:YES]; } Sinaweibo interface appears with oAuth and xAuth. but when click oAuth, my App crashed. When click xAuth, the login interface appears with username and password input text box, but when input them, my app also crashed.Pls help! thanks
I got the following errors from the debugger console: [Session started at 2012-04-06 02:42:08 +0000.] 2012-04-06 10:42:21.656 TTNavigatorDemo[461:ef03] Current page in photo browser (1 of 10) 2012-04-06 10:42:23.635 TTNavigatorDemo[461:ef03] -[NSCFString URLEncodedString]: unrecognized selector sent to instance 0x1171e0 2012-04-06 10:42:23.638 TTNavigatorDemo[461:ef03] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFString URLEncodedString]: unrecognized selector sent to instance 0x1171e0' *** Call stack at first throw: ( 0 CoreFoundation 0x015875a9 exceptionPreprocess + 185 1 libobjc.A.dylib 0x016db313 objc_exception_throw + 44 2 CoreFoundation 0x015890bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187 3 CoreFoundation 0x014f8966 forwarding + 966 4 CoreFoundation 0x014f8522 _CF_forwarding_prep_0 + 50 5 TTNavigatorDemo 0x000bf4de +[WBRequest stringFromDictionary:] + 438 6 TTNavigatorDemo 0x000c05ad +[WBRequest serializeURL:params:httpMethod:] + 192 7 TTNavigatorDemo 0x000ba3db -[WBAuthorize startAuthorize] + 249 8 TTNavigatorDemo 0x000bd238 -[WBEngine logIn] + 592 9 TTNavigatorDemo 0x000c770d -[SinaWeiBoSDKDemoViewController onLogInOAuthButtonPressed] + 53 10 UIKit 0x004ab4fd -[UIApplication sendAction:to:from:forEvent:] + 119 11 UIKit 0x0053b799 -[UIControl sendAction:to:forEvent:] + 67 12 UIKit 0x0053dc2b -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 527 13 UIKit 0x0053c7d8 -[UIControl touchesEnded:withEvent:] + 458 14 UIKit 0x004cfded -[UIWindow _sendTouchesForEvent:] + 567 15 UIKit 0x004b0c37 -[UIApplication sendEvent:] + 447 16 UIKit 0x004b5f2e _UIApplicationHandleEvent + 7576 17 GraphicsServices 0x01e53992 PurpleEventCallback + 1550 18 CoreFoundation 0x01568944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 52 19 CoreFoundation 0x014c8cf7 __CFRunLoopDoSource1 + 215 20 CoreFoundation 0x014c5f83 __CFRunLoopRun + 979 21 CoreFoundation 0x014c5840 CFRunLoopRunSpecific + 208 22 CoreFoundation 0x014c5761 CFRunLoopRunInMode + 97 23 GraphicsServices 0x01e521c4 GSEventRunModal + 217 24 GraphicsServices 0x01e52289 GSEventRun + 115 25 UIKit 0x004b9c93 UIApplicationMain + 1160 26 TTNavigatorDemo 0x000028de main + 104 27 TTNavigatorDemo 0x0000286d start + 53 ) terminate called throwing an exception
I find the defination of URLEncodedString. But still can't work. It is defined in the WBUtil.m ( which is already included in the Three20UI ) as :
@implementation NSData (WBEncode)
@implementation NSString (WBEncode)
(NSString *)MD5EncodedString { return [[self dataUsingEncoding:NSUTF8StringEncoding] MD5EncodedString]; }
(NSData *)HMACSHA1EncodedDataWithKey:(NSString *)key { return [[self dataUsingEncoding:NSUTF8StringEncoding] HMACSHA1EncodedDataWithKey:key]; }
(NSString *) base64EncodedString { return [[self dataUsingEncoding:NSUTF8StringEncoding] base64EncodedString]; }
(NSString *)URLEncodedString { return [self URLEncodedStringWithCFStringEncoding:kCFStringEncodingUTF8]; }
(NSString )URLEncodedStringWithCFStringEncoding:(CFStringEncoding)encoding { return [(NSString *) CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)[[self mutableCopy] autorelease], NULL, CFSTR("=,!$&'()+;@?\n\"<>#\t :/"), encoding) autorelease]; }
@implementation NSString (WBUtil)
http://www.hermesoutletus.org/ hermes outlet
http://www.cheap-suprashoes.org/ cheap supra shoes
http://www.louisvuittonusauks.co.uk/ louis vuitton bags
http://www.louisvuittonpurse-outlets.org/ louis vuitton purse
http://www.greatlouisvuittonbags.com/ louis vuitton outlet
http://www.louisvuittonpursesbags.org/ Louis Vuitton Outlet
http://www.louisvuittononlineshops.org/ Louis Vuitton Outlet
http://www.officiallouisvuittonzone.net/ louis vuitton outlet
It looks like you're new here. If you want to get involved, click one of these buttons!