Closed Bug 149584 Opened 24 years ago Closed 22 years ago

initStandardObjects should take Scriptable not ScriptableObject?

Categories

(Rhino Graveyard :: Core, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED WONTFIX

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?
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
Marking Verified -
Status: RESOLVED → VERIFIED
Trageting as resolved against 1.5R5
Target Milestone: --- → 1.5R5
You need to log in before you can comment on or make changes to this bug.