ok understood but i dont know why this is happening... :S
havent used rhino before...
lets hope for some help here.


--
Fábio Miranda Costa
Solucione Sistemas
Engenheiro de interfaces


On Thu, Dec 3, 2009 at 9:02 PM, Matthew Beale <[email protected]> wrote:

> Instance methods on the Dataset class are not available.  Let me try and
> code up a simpler example....
>
> --
> Matthew Beale :: 607 227 0871
> Resume & Portfolio @ http://madhatted.com
>
> On Thu, 2009-12-03 at 20:45 -0200, Fábio M. Costa wrote:
> > I dont understand. Whats the problem?
> >
> > --
> > Fábio Miranda Costa
> > Solucione Sistemas
> > Engenheiro de interfaces
> >
> >
> > On Thu, Dec 3, 2009 at 8:18 PM, Matthew Beale <[email protected]>
> > wrote:
> >         Hi all,
> >
> >         Is anyone using mootools server-side with Rhino?  I was
> >         creating classes
> >         with base.js but wanted to move to mootools... but though
> >         mootool's
> >         methods are showing up fine:
> >
> >         js> (new Array).each
> >         function forEach() { [native code for Array.forEach,
> >         arity=1] }
> >
> >         My classes are "missing" their instance methods
> >
> >         js> (new Dataset).each_datapoint
> >         js>
> >
> >         The code is nothing special:
> >
> >         var Dataset = new Class({
> >
> >          initialize: function( id ) {
> >            // yeah
> >          },
> >
> >          get: function( attr ) {
> >            // yeah
> >          },
> >
> >          each_datapoint: function( each_datapoint_function ) {
> >            // exactly, nothing special!
> >          }
> >
> >         });
> >
> >         However if I add a class method with extend...
> >
> >         Dataset.extend({
> >          foo: function(a){
> >            return a + 3;
> >          }
> >         });
> >
> >         I can see the method just fine:
> >
> >         js> Dataset.foo
> >
> >         function (a) {
> >            return a + 3;
> >         }
> >
> >         Thoughts?  This is wacky.
> >
> >         --
> >         Matthew Beale :: 607 227 0871
> >         Resume & Portfolio @ http://madhatted.com
> >
> >
>
>
>

Reply via email to