-
Notifications
You must be signed in to change notification settings - Fork 2
/
ScriptVariable.h
47 lines (42 loc) · 1.2 KB
/
ScriptVariable.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//
// ScriptVariable.h
// Pipe
//
// Created by RenŽ Puls on 22.03.05.
// Copyright 2005 RenŽ Puls. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <JaguarFoundation/JaguarFoundation.h>
extern NSString * const ScriptVariableErrorDomain;
enum {
ScriptVariableNoNameError = -1,
ScriptVariableDuplicateNameError = -2
};
typedef enum {
ScriptTextVariableType = 0,
ScriptBooleanVariableType = 1,
ScriptEnumVariableType = 2,
ScriptPasswordVariableType = 3
} ScriptVariableType;
@interface ScriptVariable : NSObject <NSCopying, NSCoding> {
NSString *name;
id value;
BOOL sensitive;
ScriptVariableType variableType;
NSArray *possibleValues;
}
+ (NSArray *)observableKeys;
+ (NSMutableArray *)arrayWithVariablesFromPropertyList:(id)propertyList;
+ (id)propertyListFromVariablesArray:(NSArray *)variables;
- (id)initWithType:(ScriptVariableType)aType name:(NSString *)aName value:(id)defaultValue;
- (NSString *)name;
- (void)setName:(NSString *)newName;
- (id)value;
- (void)setValue:(id)newValue;
- (BOOL)isSensitive;
- (void)setSensitive:(BOOL)flag;
- (ScriptVariableType)type;
- (void)setType:(ScriptVariableType)newType;
- (NSArray *)possibleValues;
- (void)setPossibleValues:(NSArray *)newValues;
@end