Permalink
Browse files

small changes stability

  • Loading branch information...
1 parent 8f13fc6 commit 4cb3103fedb7a087dea6f5468c8da06d42ce3de9 @tomcool420 committed Jul 19, 2011
Showing with 16 additions and 15 deletions.
  1. +14 −13 SMFDictionaryEditor.m
  2. +2 −2 SMFDictionaryObjectEditor.m
View
@@ -14,6 +14,17 @@
@implementation SMFDictionaryEditor
@synthesize delegate;
@synthesize key=_k;
+-(void)refresh
+{
+ [_keys release];
+ _keys =[[[_d allKeys] sortedArrayUsingSelector:@selector(compare:)] retain];
+ NSLog(@"keys: %@",_keys);
+ [[self list]removeDividers];
+ [[self list] addDividerAtIndex:0 withLabel:@"Keys"];
+ [[self list] addDividerAtIndex:[_keys count] withLabel:@"Options"];
+ [[self list]reload];
+
+}
-(id)previewControlForItem:(long)row
{
if (row<[_keys count])
@@ -67,17 +78,7 @@ -(long)itemCount
{
return [[_d allKeys] count]+2;
}
--(void)refresh
-{
- [_keys release];
- _keys =[[[_d allKeys] sortedArrayUsingSelector:@selector(compare:)] retain];
- NSLog(@"keys: %@",_keys);
- [[self list]removeDividers];
- [[self list] addDividerAtIndex:0 withLabel:@"Keys"];
- [[self list] addDividerAtIndex:[_keys count] withLabel:@"Options"];
- [[self list]reload];
-
-}
+
-(id)titleForRow:(long)row
{
if (row<[_keys count]) {
@@ -122,8 +123,8 @@ -(void)itemSelected:(long)row
}
else if(row==1)
{
- if (self.delegate && [self.delegate respondsToSelector:@selector(setObject:forKey:)]) {
- [self.delegate setObject:_d forKey:self.key];
+ if (self.delegate!=nil && [self.delegate respondsToSelector:@selector(setObject:forKey:)]) {
+ [self.delegate setObject:_d forKey:(NSString *)self.key];
}
[[self stack]popController];
}
@@ -7,7 +7,7 @@
//
#import "SMFDictionaryObjectEditor.h"
-#import <Backrow/BackRow.h>
+#import "Backrow/AppleTV.h"
#import "SMFramework.h"
typedef enum _kSMFKe{
kSMFEditorKey,
@@ -77,7 +77,7 @@ -(id)itemForRow:(long)row
[it setRightText:[self itemTextForRow:row]];
return it;
}
--(id)itemSelected:(long)selected
+-(void)itemSelected:(long)selected
{
lastItemSelected=selected;
switch (selected) {

0 comments on commit 4cb3103

Please sign in to comment.