No registered users in community xowiki
in last 10 minutes
in last 10 minutes
[Xotcl] new feature idea
From: <vitick_at_gmail.com>
Date: Wed, 29 Sep 2010 11:28:16 -0700 (PDT)
It occurred to me that XOTcl could benefit or it's "coolness" value could be raised even more if it had method chaining similar to JQuery. Example:
Class create Myclass
Myclass :method a args {
process {*}$args;
}
Myclass :method b args {
process {*}$args;
}
Myclass create myobj
execute:
myobj :chain :a :b {value1 value2}
or:
myobj :chain :a :b :a :b :destroy {value1 value2}
################
syntax:
obj :chain :method1 :method2 .... {arg1 arg2 ...}
################
functionality:
each method would be executed in the order listed with the args provided in the end of the "chain" method.
################
This functionality is even more enhanced with mixins and superclasses where each chained method would be passed to a mixin/superclass via [next].
P.S. this is not really a feature request at the moment because I see you are very busy doing a lot of work on Next. And that has more priority. Also, the "chain" functionality can be easily done via scripting it myself. Again, for the "coolness" or "extra power" value, it would be nice to have that, in my opinion, as a built-in feature.
Date: Wed, 29 Sep 2010 11:28:16 -0700 (PDT)
It occurred to me that XOTcl could benefit or it's "coolness" value could be raised even more if it had method chaining similar to JQuery. Example:
Class create Myclass
Myclass :method a args {
process {*}$args;
}
Myclass :method b args {
process {*}$args;
}
Myclass create myobj
execute:
myobj :chain :a :b {value1 value2}
or:
myobj :chain :a :b :a :b :destroy {value1 value2}
################
syntax:
obj :chain :method1 :method2 .... {arg1 arg2 ...}
################
functionality:
each method would be executed in the order listed with the args provided in the end of the "chain" method.
################
This functionality is even more enhanced with mixins and superclasses where each chained method would be passed to a mixin/superclass via [next].
P.S. this is not really a feature request at the moment because I see you are very busy doing a lot of work on Next. And that has more priority. Also, the "chain" functionality can be easily done via scripting it myself. Again, for the "coolness" or "extra power" value, it would be nice to have that, in my opinion, as a built-in feature.