rzel / joose-js

Automatically exported from code.google.com/p/joose-js
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Unable to apply before method modifier if defined in a role #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Role("MyRole", {
  requires: "myMethod",

  before: {
    myMethod:  function () {}
  }
})

Class("MyClass", {
  does:  MyRole,

  methods:  {
    myMethod:  function () {}
  }
})

Error: "Unable to apply before method modifier because method myMethod does
not exist"

Switching the order of "does" and "methods" in MyClass makes it working fine.

Original issue reported on code.google.com by Teda...@gmail.com on 11 Nov 2008 at 4:18

GoogleCodeExporter commented 9 years ago

Original comment by Teda...@gmail.com on 11 Nov 2008 at 4:23

GoogleCodeExporter commented 9 years ago
Fixed in trunk. Thanks for the report.

Original comment by malte.ubl on 11 Nov 2008 at 7:20