author | snej@snej-mbp.mtv.corp.google.com |
Tue Apr 07 11:13:25 2009 -0700 (2009-04-07) | |
changeset 23 | a910102a1c9d |
permissions | -rw-r--r-- |
jens@18 | 1 |
// |
jens@18 | 2 |
// MYAddressField.h |
jens@18 | 3 |
// YourMove |
jens@18 | 4 |
// |
jens@18 | 5 |
// Created by Jens Alfke on 7/16/08. |
jens@18 | 6 |
// Copyright 2008 Jens Alfke. All rights reserved. |
jens@18 | 7 |
// |
jens@18 | 8 |
|
jens@18 | 9 |
#import <Cocoa/Cocoa.h> |
jens@18 | 10 |
@class MYAddressItem, ABPerson; |
jens@18 | 11 |
|
jens@18 | 12 |
|
jens@18 | 13 |
@interface MYAddressField : NSComboBox |
jens@18 | 14 |
{ |
jens@18 | 15 |
NSString *_property, *_prefix; |
jens@18 | 16 |
NSMutableArray *_addresses; |
jens@18 | 17 |
NSArray *_defaultAddresses; |
jens@18 | 18 |
MYAddressItem *_selectedAddress; |
jens@18 | 19 |
} |
jens@18 | 20 |
|
jens@18 | 21 |
@property (getter=isExpanded) BOOL expanded; |
jens@18 | 22 |
|
jens@18 | 23 |
@property (copy) NSString *addressProperty; |
jens@18 | 24 |
@property (copy) NSArray *defaultAddresses; |
jens@18 | 25 |
|
jens@18 | 26 |
@property (readonly,retain) MYAddressItem* selectedAddress; |
jens@18 | 27 |
|
jens@18 | 28 |
@end |
jens@18 | 29 |
|
jens@18 | 30 |
|
jens@18 | 31 |
|
jens@18 | 32 |
@interface MYAddressItem : NSObject |
jens@18 | 33 |
{ |
jens@18 | 34 |
NSString *_name, *_addressType, *_address, *_uuid; |
jens@18 | 35 |
} |
jens@18 | 36 |
- (id) initWithName: (NSString*)name |
jens@18 | 37 |
addressType: (NSString*)addressType address: (NSString*)address; |
jens@18 | 38 |
- (id) initWithPerson: (ABPerson*)person |
jens@18 | 39 |
addressType: (NSString*)addressType address: (NSString*)address; |
jens@18 | 40 |
- (id) initWithString: (NSString*)str addressType: (NSString*)addressType; |
jens@18 | 41 |
@property (readonly) NSString *name, *addressType, *address; |
jens@18 | 42 |
@property (readonly) ABPerson *person; |
jens@18 | 43 |
@end |