Maybe Im just a little late here... but.... are you using moo1.2????
The Development or the Builder version?? etc... Did you Isolate the
code without any other code around... The same malfunction occurs in
either FF/IE/Op...etc???

It may sound like a stupid question...  this kinda looks pretty weird
to me... I pasted that same code in a working application right now
just to be sure and it logs:

green
orange

in the console as expected...

BTW, I did the same in a project using moo1.11 and it spits error
complaining about this.parent() which is expected of course...


On 9/17/08, nutron <[EMAIL PROTECTED]> wrote:
>
>
>  I just went to http://clientside.cnet.com/wiki/ and ran this in the console:
>
>
>  var Foo = new Class({
>     Implements: Options,
>     options: {
>        fruits: {
>          apple: 'red',
>          orange: 'orange'
>        },
>        favoriteNumber: 10
>     },
>     initialize: function(options){
>         this.setOptions(options);
>     }
>  });
>
>  var Bar = new Class({
>
>     Extends: Foo,
>
>     options: {
>         fruits: {
>             apple: 'green',
>             lemon: 'yellow'
>         },
>         favoriteNumber: 12,
>         favoriteColor: 'blue'
>     },
>     initialize: function(options){
>         this.parent(options); //sets options
>         console.log(this.options.fruits.apple); //logs 'green'
>         console.log(this.options.fruits.orange); //logs null
>     }
>  });
>
> new Bar();
>  //logged green, then orange
>
>  Works for me. If it's not working for you, then I don't know what to tell
>  you.
>
>  -----
>  The MooTools Tutorial:  http://www.mootorial.com www.mootorial.com
>  CNET Clientside:  http://clientside.cnet.com clientside.cnet.com
>
> --
>  View this message in context: 
> http://n2.nabble.com/Extending-a-class.-tp1095871p1097139.html
>
> Sent from the MooTools Users mailing list archive at Nabble.com.
>
>


-- 
◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦◦
www.ivanicus.com

Reply via email to