What would the best practice be to redirect someone to another page in Objective-J (Cappuccino)?
+3
A:
Normally you wouldn't have multiple pages in a Cappuccino application. But assuming you do want the user to leave your app, just use JavaScript. Objective-J is a superset of JavaScript, so it has everything JavaScript does.
- (void)redirectTo:(CPString)aLocation
{
window.location = aLocation;
}
- (void)handler
{
[self redirectTo:"http://www.google.com"];
}
Alexander Ljungberg
2010-05-05 02:49:04
I see. Thank you so much!
huntaub
2010-05-06 11:51:32