Closed
Bug 149584
Opened 24 years ago
Closed 22 years ago
initStandardObjects should take Scriptable not ScriptableObject?
Categories
(Rhino Graveyard :: Core, defect)
Rhino Graveyard
Core
Tracking
(Not tracked)
VERIFIED
WONTFIX
1.5R5
People
(Reporter: hr, Assigned: norrisboyd)
Details
I think initStandardObjects should take Scriptable as parameter, not
ScriptableObject. My problem is this: One of my classes inherits from a
third party framework, so I cannot use ScriptableObject as base class,
rather must implement the Interface Scriptable. But this is not allowed as
Parameter for initStandardObjects. Am I doing something completely
wrong?
Comment 1•22 years ago
|
||
initStandardObjects uses additional methods available in ScriptableObject to
initialize the library properly. In theory one can invent an additional
interface to cover initStandardObjects needs but that would lead only to code
bloat compared with a simple workaround that adheres to ECMAScript spirit much
better which is to use prototype chain.
See http://www.mozilla.org/rhino/scopes.html for details but in short instead of
using
cx.initStandardObjects(objectImplementingScriptable)
use
Scripatble scope = cx.initStandardObjects(null);
objectImplementingScriptable.sepPrototype(scope);
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•