Open ulikk opened 10 years ago
Regarding Problem 3:
I propose a kind of type system, we could simply solve this problem by using names of classes, i.e. TUPLE
, INT
, RANGE
.
Problem 1 has been committed with e83898dc382550f79acb58246a3323e955369619 and 341f998626591f7a5b899291fc1da41541553890
For Problem 2 i propose a somewhat shorter form:
defaults:
ctr
upmode: 'discrete'
value: NaN
lastValue: NaN
cycle:
_CLASS: [ 'RandomIntervalNumber', [ 20, 100 ] ]
mode: 'regular'
interval: 5
Problem 2 was solved by extending base functionality so that default members can contain callback functions that instantiate the appropriate object.
class Mutable extends Base
defaults:
ctr: 1
upmode: 'discrete'
value: NaN
lastValue: NaN
cycle: -> new RandomIntervalNumber(new Range(20,100))
...
One can also override the default by supplying an appropriate object upon instantiation through the Initializer Object given to the constructor:
@sizem = new Mutable
value: new RandomIntervalNumber new Range(2, 15)
upmode: 'linp'
cycle: new RandomIntervalNumber new Range(20, 100)
Problem 1: Public bound variables have to be glued manually to angular in ui.coffee in a separate list.
Idea 1:
Problem 2: Defaults allow only instantiation of simple Data types and no objects.
Idea 2:
Problem 3: There is too much "glue" code between UI and application
Idea 3: Create "meta information" channels, lets call them "Metachannel" so that the UI can automatically build gui controls
Example: Interchangeable Movements for brushes, each with different parameter set