This repository has been archived by the owner on Mar 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
135 lines (103 loc) · 4.15 KB
/
TODO
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
*****************************************************************************
TODO
*****************************************************************************
DONE delegates
Traits for Primitive Types [number, string, boolean, ]
(inc, dec for Number, toggle for Bool, ...)
coercion
Lazy + bare ? mmh reader writer? tests
Events-Kompatibilität / different class
DONE inheritance
nested types
different getter/setter Styles (Traits???)
* Java (getProp/setProp) is implemented
* MooTools uses get('prop') / set('prop', val)
* Perl-Style (setter => prop(val) / getter => prop())
DONE alternate naming / different class
DONE ro inside instance writeable => geht oder geht nicht in moose? => NEIN
*****************************************************************************
DONE: is => 'ro', 'rw', 'bare'
DONE:isa => MooTools type => default, builder, writer, accessor, constructor
OBJECT TYPES => instanceOf Checks
'element' - (string) If object is a DOM element node.
'textnode' - (string) If object is a DOM text node.
'whitespace' - (string) If object is a DOM whitespace node.
'arguments' - (string) If object is an arguments object.
'array' - (string) If object is an array.
'object' - (string) If object is an object.
'string' - (string) If object is a string.
'number' - (string) If object is a number.
'date' - (string) If object is a date.
'boolean' - (string) If object is a boolean.
'function' - (string) If object is a function.
'regexp' - (string) If object is a regular expression.
'class' - (string) If object is a Class (created with new Class, or the extend of another class).
'collection' - (string) If object is a native htmlelements collection, such as childNodes, getElementsByTagName, etc.
'window' - (string) If object is the window object.
'document' - (string) If object is the document object.
'event' - (string) If object is an event.
'undefined'
'null'
DONE required => $bool die if attribute was not set via constructor, default, builder
DONE lazy => $bool must have default or builder
test lazy => clear => get
kriegt man da das default/builder wieder? => JA => WORKS test11
bei moose? => JA => WORKS test11
mit und ohne setting via constructor => JA => WORKS test11
DONE test typecheck
trigger
DONE lazy_build => $bool same as
builder => '_build_size',
clearer => 'clear_size',
predicate => 'has_size',
DONE default =>
DONE documentation => string NOT USED ANYWAY, can be accessed through object.$attribute.<accessorname>.documentation
DONE reader => string
DONE writer => string
DONE predicate => string checks defined-ness
DONE builder => string methodname, return value for attribute
DONE clearer => string set to undefined
DONE trigger => string called after accessor was set, $size, $old_size, $was_unset_before
DONE init_arg
/* TODO: Doku
IE Element
Primitive Types => Object
// Class Types
Element true
Elements true
TextNode WRAPPER TextNode => String + String => TextNode (Number, Date)
Array true
Object true
String true
Number true
Date true
Boolean true
Function true
Regexp true
Class true
Window true
Document true
Event true
// Types
collection false Collection => Elements, Collection => Array
arguments false Arguments => Elements, Arguments => Array
whitespace false special case /
undefined false special case
null false special case
Hierarchy
---------
Object
Element
Array
Elements
String
Number
Date
Boolean
Function
Class
RegExp
Window
Document
Event
*/