|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
[Bug 616] New: Problem with accessing mountpoint methods from another applicationhttp://helma.org/bugs/show_bug.cgi?id=616
Summary: Problem with accessing mountpoint methods from another application Product: Helma Version: CVS trunk Platform: All OS/Version: All Status: NEW Severity: normal Priority: P1 Component: HopObject Functionality AssignedTo: helma-dev@... ReportedBy: interface@... I have an application "foo" with a prototype Bar which is a mountpoint of Root: Root.properties =============== bar = mountpoint(Bar) A method "test" is available in Bar: Bar.js ====== Bar.prototype.test = function() { return true; } Thus, I can execute code like the following: res.write(root.bar.test()); // true When I try to access the test() method from within another application I get an exception: var server = Packages.helma.main.Server.getServer(); var app = server.getApplication("foo"); var rewt = app.getDataRoot(); var mountpoint = rewt.bar; // This is mountpoint(Bar) of Root in foo mountpoint.test() // Method is defined in Bar but the call throws an exception However, the mountpoint itself is available: res.write(mountpoint); // [object HopObject] And it has the basic HopObject properties: res.write(mountpoint._id); // bar res.write(mountpoint.get); // function get() { [native code, arity=1] } Am I doing something silly here or could it be that Helma is missing to add the correct methods and properties to the (somehow remotely) retrieved prototype? -- Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. _______________________________________________ Helma-dev mailing list Helma-dev@... http://helma.org/mailman/listinfo/helma-dev |
|
|
[Bug 616] Problem with accessing mountpoint methods from another applicationhttp://helma.org/bugs/show_bug.cgi?id=616
hannes@... changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #1 from hannes@... 2008-04-14 19:17 ------- Does the exception have a message? What does it say? -- Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. _______________________________________________ Helma-dev mailing list Helma-dev@... http://helma.org/mailman/listinfo/helma-dev |
|
|
[Bug 616] Problem with accessing mountpoint methods from another applicationhttp://helma.org/bugs/show_bug.cgi?id=616
------- Comment #2 from interface@... 2008-04-14 20:35 ------- Sorry, I thought that would be obvious, my mistake. Thus, here it is together with the whole Java stack trace: TypeError: Cannot find function test in object HopObject bar org.mozilla.javascript.EcmaError: TypeError: Cannot find function test in object HopObject bar. (/Users/tobi/Projects/helma/./apps/antville/code/Root/Root.js#75) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3539) at org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3517) at org.mozilla.javascript.ScriptRuntime.typeError(ScriptRuntime.java:3545) at org.mozilla.javascript.ScriptRuntime.typeError2(ScriptRuntime.java:3564) at org.mozilla.javascript.ScriptRuntime.notFunctionError(ScriptRuntime.java:3628) at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:2180) at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:117) at org.mozilla.javascript.gen.c1041._c3(/Users/tobi/Projects/helma/./apps/antville/code/Root/Root.js:75) at org.mozilla.javascript.gen.c1041.call(/Users/tobi/Projects/helma/./apps/antville/code/Root/Root.js) at org.mozilla.javascript.ScriptRuntime.applyOrCall(ScriptRuntime.java:2341) at org.mozilla.javascript.BaseFunction.execIdCall(BaseFunction.java:272) at org.mozilla.javascript.IdFunctionObject.call(IdFunctionObject.java:127) at org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76) at org.mozilla.javascript.gen.c873._c5(/Users/tobi/Projects/helma/modules/helma/Aspects.js:79) at org.mozilla.javascript.gen.c873.call(/Users/tobi/Projects/helma/modules/helma/Aspects.js) at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:401) at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2985) at org.mozilla.javascript.gen.c873.call(/Users/tobi/Projects/helma/modules/helma/Aspects.js) at org.mozilla.javascript.Context$1.run(Context.java:488) at org.mozilla.javascript.Context.call(Context.java:499) at org.mozilla.javascript.Context.call(Context.java:486) at helma.scripting.rhino.RhinoEngine.invoke(RhinoEngine.java:303) at helma.framework.core.RequestEvaluator.run(RequestEvaluator.java:402) at java.lang.Thread.run(Thread.java:613) -- Configure bugmail: http://helma.org/bugs/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. _______________________________________________ Helma-dev mailing list Helma-dev@... http://helma.org/mailman/listinfo/helma-dev |
| Free Forum Powered by Nabble | Forum Help |