Permalink
Browse files

ControllerAction not called on QWebElement, issue 114

  • Loading branch information...
escoz committed Apr 1, 2012
1 parent 9176b7d commit 504089643cb268ec4bfc705e472085a252a4e312
Showing with 6 additions and 0 deletions.
  1. +1 −0 quickdialog/QWebElement.m
  2. +4 −0 sample/ExampleViewController.m
  3. +1 −0 sample/SampleDataBuilder.m
@@ -28,6 +28,7 @@ - (QWebElement *)initWithTitle:(NSString *)title url:(NSString *)url {
- (void)selected:(QuickDialogTableView *)tableView controller:(QuickDialogController *)controller indexPath:(NSIndexPath *)path {
+ [self handleElementSelected:controller];
if ([_url hasPrefix:@"http"]) {
QWebViewController *webController = [[QWebViewController alloc] initWithUrl:_url];
[controller displayViewController:webController];
@@ -32,6 +32,10 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
}
}
+-(void)handleWebElementControllerAction:(QWebElement *)element {
+ NSLog(@"Web element selected for url %@", element.url);
+}
+
-(void)handleChangeEntryExample:(QButtonElement *) button {
QEntryElement *entry = (QEntryElement *) [self.root elementWithKey:@"entryElement"];
entry.textValue = @"Hello";
@@ -278,6 +278,7 @@ + (QRootElement *)createWebAndMapRoot {
root.title = @"Web and map";
QWebElement *element1 = [[QWebElement alloc] initWithTitle:@"ESCOZ Inc" url:@"http://escoz.com"];
+ element1.controllerAction = @"handleWebElementControllerAction:";
QWebElement *element2 = [[QWebElement alloc] initWithTitle:@"Quicklytics" url:@"http://escoz.com/quicklytics"];
QMapElement *element4 = [[QMapElement alloc] initWithTitle:@"Florianopolis, Brazil" coordinate:CLLocationCoordinate2DMake(-27.59, -48.55)];

0 comments on commit 5040896

Please sign in to comment.