MetamethodsUpdate: as of 2008/10/15, metamethod support has been removed from Helma. It had too much of a performance impact, and most things can be achieved by other means, often reducing complexity.Since I have gotten a more frustrated with JSAdapter lately, I have started working on a new metaprogramming extension to Rhino which I call Metamethods. It is based on JOMP, but looks for methods in the target object itself rather than a separate meta object. It is also thread-safe and adds a method to control behavior of the equals operator (==). In detail, Metamethods looks for the following methods in a JavaScript object:
Currently you have to manually patch and build Rhino to use Metamethods using the patch attached to this page. Update 1: The patch is in the current svn/git snapshots, but of course you can still use the patch to build it by yourself. Update 2: Due to a very silly bug, __set__ methods were called without the second argument in the initial version. This is fixed in the new patch as well as git/svn repositories.
This patch is against the current Rhino CVS snapshot. Let me know if it fails to apply to earlier versions of Rhino. |
navigation
Download
Community
Weblog
Mailing Lists
IRC Channel
Documentation
Introductions
Tools
Reference
Project
Roadmap
Bug Reporting
Source
Helma NG Wiki
Wiki
Tags
Updates
Related Projects
Sites using Helma
Shop
search
tags for this page
all tags
Tagsapps (1) bugs (2) class (1) community (2) compatibility (1) concurrency (1) continuations (2) Documentation (6) dogfood (1) formatting (1) functions (1) gobi (1) helma (7) helma 1.6 (17) helma 1.7 (8) helma 1.x (4) Helma 1x (0) helma 2 (11) helma ng (20) hopobject (1) howto sample code xml-rpc (1) html (1) inheritance (5) introspection (1) java (3) javascript (5) jetty (4) JSDoc (1) lazy (1) marius person (1) metaprogramming (3) modules (5) oop (1) organization (2) ORM (2) parsing (1) plugins (1) project (2) projects (1) prototype (2) prototype scope rhino functions this (0) Rabbit (2) Reference (1) REPL (1) rhino (5) roadmap (3) scope (1) shell (1) shop (0) Skin Rendering (5) Snippets (1) source svn (1) sugar (3) templates (13) testing (5) this (1) Tobi (10) web.xml (2) xml (1) Pages linking to this page: Wiki Overview Text Draft, wiki |