Skip to content

Instantly share code, notes, and snippets.

@maz
Created August 8, 2010 17:50
Show Gist options
  • Save maz/514325 to your computer and use it in GitHub Desktop.
Save maz/514325 to your computer and use it in GitHub Desktop.
var CappRFCBN1=function(url,err){
if(url==true){
if(AuthWV)
[CPApp stopModal];
[[CPNotificationCenter defaultCenter] postNotificationName:"URLLoaded" object:nil];
AuthWV=nil;
}else{
var win=[[CPWindow alloc] initWithContentRect:CPMakeRect(0,0,400,300) styleMask:CPTitledWindowMask];
[win setTitle:"Web"];
var wv=[[CPWebView alloc] initWithFrame:CPMakeRect(0,0,400,300)];
AuthWV=wv;
[win setContentView:wv];
[wv setMainFrameURL:url];
//[win makeKeyAndOrderFront:nil];
//[win center];
[CPApp runModalForWindow:win];
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment