PageRenderTime 33ms CodeModel.GetById 11ms app.highlight 17ms RepoModel.GetById 1ms app.codeStats 0ms

/SA.Framework/SAWUI/Organizations.m

http://eeframework.googlecode.com/
Objective C | 59 lines | 40 code | 16 blank | 3 comment | 1 complexity | 9c41be62fb9f3d4b589833362a2b33ce MD5 | raw file
 1// -*- objc -*-
 2
 3#import "Organizations.h"
 4
 5@implementation Organizations
 6
 7- (id)init
 8{
 9  self = [super init];
10  
11  return self;
12}
13
14- (void)dealloc
15{
16  [super dealloc];
17}
18
19/* WO overridings */
20
21/* SAWUI specific */
22
23- (NSArray *)list
24{
25  return [(SAWUIController *)GSWApp organizationsList];
26}
27
28- (NSDecimalNumber *)itemBytes
29{
30  if((_base + _index) >= [[self list] count])
31    {
32      return nil;
33    }
34
35  return [(SAWUIController *)GSWApp bytesForOrganization:
36			       [[self list] objectAtIndex: _base + _index]];
37}
38
39- (NSString *)itemName
40{
41  return [super itemName];
42}
43
44- (NSString *)selectedItemName
45{
46  return [super selectedItemName];
47}
48
49- (GSWElement *)itemHasBeenClicked
50{
51  _selectedItem = _base + _index;
52  [[self parent] setValue:[self selectedItemName] forKey:@"organizationName"];
53
54  [[self parent] setValue:[NSNumber numberWithInt:ORG] forKey:@"mode"];
55
56  return nil;
57}
58
59@end /* Organizations */