summaryrefslogtreecommitdiff
path: root/UICaboodle
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2009-03-16 15:12:33 +0000
committerJay Freeman (saurik) <saurik@saurik.com>2010-09-30 07:09:56 +0000
commitdc63e78f274cc5733250b137b1ad09ea248445ff (patch)
treea282d1bba36cf9a444a8e1f8550e1d268abe0b25 /UICaboodle
parente590d1ff0e28b577012d6d98d9600d2f86a7459f (diff)
That was at least interesting.
Diffstat (limited to 'UICaboodle')
-rw-r--r--UICaboodle/BrowserView.m16
-rw-r--r--UICaboodle/RVBook.mm10
2 files changed, 24 insertions, 2 deletions
diff --git a/UICaboodle/BrowserView.m b/UICaboodle/BrowserView.m
index 0f95a04..3a4b779 100644
--- a/UICaboodle/BrowserView.m
+++ b/UICaboodle/BrowserView.m
@@ -70,6 +70,22 @@
} return self;
}
++ (NSArray *) _attributeKeys {
+ return [NSArray arrayWithObjects:@"device", nil];
+}
+
+- (NSArray *) attributeKeys {
+ return [[self class] _attributeKeys];
+}
+
++ (BOOL) isKeyExcludedFromWebScript:(const char *)name {
+ return ![[self _attributeKeys] containsObject:[NSString stringWithUTF8String:name]] && [super isKeyExcludedFromWebScript:name];
+}
+
+- (NSString *) device {
+ return [[UIDevice currentDevice] uniqueIdentifier];
+}
+
+ (NSString *) webScriptNameForSelector:(SEL)selector {
if (selector == @selector(close))
return @"close";
diff --git a/UICaboodle/RVBook.mm b/UICaboodle/RVBook.mm
index 28774ae..4b5a399 100644
--- a/UICaboodle/RVBook.mm
+++ b/UICaboodle/RVBook.mm
@@ -270,10 +270,16 @@
}
- (void) reloadData {
- for (int i(0), e([pages_ count]); i != e; ++i) {
- RVPage *page([pages_ objectAtIndex:(e - i - 1)]);
+ size_t count([pages_ count]);
+ for (size_t i(0); i != count; ++i) {
+ RVPage *page([pages_ objectAtIndex:(count - i - 1)]);
[page reloadData];
}
+
+ if (count != 0) {
+ RVPage *page([pages_ lastObject]);
+ [self reloadButtonsForPage:page];
+ }
}
- (CGRect) pageBounds {