this works out of the box in primish.

https://bitbucket.org/DimitarChristoff/primish-example/src 

recrusive object merges in options was added recently - see 
https://github.com/DimitarChristoff/primish/issues/3

previously you had to manually merge from parent prototypes. 
--
Dimitar Christoff

"JavaScript is to JAVA what hamster is to ham"
@D_mitar - https://github.com/DimitarChristoff

On 5 Dec 2013, at 11:50, santos <brunoleug...@gmail.com> wrote:

> I have a better example:
> 
> var A = prime({
>     options: {
>         name: 'image',
>         tag: 'span',
>         src: '/'
>     },
>     constructor: function(options){
>         //console.debug(this.options);
>         this.setOptions(options);
>     },
>     getOptions: function(){
>         console.log(this.options);
>     }
> });
> 
> var B = prime({
>     inherits: A,
>     options: {
>         name: 'B'
>     },
>     some: function(){
>         return;
>     }
> });
> 
> var C = prime({
>     inherits: B,
>     options: {
>         name: 'C'
>     },
>     some: function(){
>         return;
>     }
> });
> 
> mixin(A, Options);
> mixin(B, Options);
> mixin(C, Options);
> 
> var c = new C({
>     tag: 'div'
> });
> 
> c.getOptions();
> 
> console.log(c.options); //the result should be: {name: "C", tag: "div", src: 
> "/"}
> 
> Thank you again.
> 
> -- 
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "MooTools Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to mootools-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mootools-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to