[Bug 684] New: Application.dataRoot is not set anymore

View: New views
9 Messages — Rating Filter:   Alert me  

[Bug 684] New: Application.dataRoot is not set anymore

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.helma.org/bugs/show_bug.cgi?id=684

           Summary: Application.dataRoot is not set anymore
           Product: Helma
           Version: CVS trunk
          Platform: Other
               URL: http://helma.org/wiki/HopRepl/#UsingHopRepl
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Generic/Other
        AssignedTo: helma-dev@...
        ReportedBy: interface@...


While playing with the Hop REPL after some time I noticed that second half of
the example in the “Getting nifty” section [1] does not work anymore: the
dataRoot property of the application is undefined.

Is there another way of retrieving the root node of an application? Or is it
possible to get back the dataRoot property?

--
[1] http://helma.org/wiki/HopRepl/#UsingHopRepl

--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 684] Application.dataRoot is not set anymore

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.helma.org/bugs/show_bug.cgi?id=684


tobi <interface@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |1.7.0




--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 684] Application.dataRoot is not set anymore

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.helma.org/bugs/show_bug.cgi?id=684


tobi <interface@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |616




--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 684] Application.dataRoot is not set anymore

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.helma.org/bugs/show_bug.cgi?id=684





--- Comment #1 from tobi <interface@...>  2009-11-04 23:37:17 ---
I investigated a little bit into this bug and found out the following: it’s not
that app.dataRoot is not available at all, it’s rather that the underlying
method changed signature [1]:

public Object getDataRoot() { }
public Object getDataRoot(ScriptingEngine scriptingEngine) { }

Thus, it is of course still possible to get the root object of an application
from within JavaScript:

app.__app__.getDataRoot(new
Packages.helma.scripting.rhino.RhinoEngine.getRhinoEngine()))

Remains the question if there could be an easier way to do this, like the
getDataRoot() method without parameters before.

--
[1]
http://dev.helma.org/trac/helma/changeset?new=helma%2Fhelma%2Ftrunk%2Fsrc%2Fhelma%2Fframework%2Fcore%2FApplication.java%409443&old=helma%2Fhelma%2Ftrunk%2Fsrc%2Fhelma%2Fframework%2Fcore%2FApplication.java%409436

--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 684] Application.dataRoot is not set anymore

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.helma.org/bugs/show_bug.cgi?id=684


Hannes Wallnoefer <hannes@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hannes@...




--- Comment #2 from Hannes Wallnoefer <hannes@...>  2009-11-05 09:04:56 ---
I re-added the zero argument Application.getDataRoot method. Can you please
check if it fixes the bug?

--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 684] Application.dataRoot is not set anymore

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.helma.org/bugs/show_bug.cgi?id=684





--- Comment #3 from tobi <interface@...>  2009-11-05 09:58:59 ---
Thanks for re-adding the method, Hannes.

Indeed, I now can access dataRoot w/o argument or as property
app.__app__.dataRoot again.

However, in HopRepl it still does not work:

Helma> repl.enter(getApplication("antville"))
[Application antville]
Helma> repl.enter(dataRoot)
org.mozilla.javascript.WrappedException: Wrapped java.lang.NullPointerException

Could it be that I need to change something in the HopRepl code, in Repl.java
[1] to be precise? I would be thankful for your suggestions.

--
[1] http://p3k.org/source/lib3k/trunk/ext/HopRepl/Repl.java

--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 684] Application.dataRoot is not set anymore

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.helma.org/bugs/show_bug.cgi?id=684





--- Comment #4 from Hannes Wallnoefer <hannes@...>  2009-11-05 11:22:32 ---
Unfortunately the fix was a bit more involved, but I think I have it now. In
fact, calling Application.getDataRoot with RhinoEngine.getRhinoEngine() as
argument from outside the app will possibly yield the wrong result, so I made
that method protected (i.e. not callable from the outside) and the
zero-argument Application.getDataRoot() is now the only method you can use from
outside.

BTW, I find the getDataRoot/dataRoot names slightly awkward. Would you mind
chaning this to getRoot()/root?

--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 684] Application.dataRoot is not set anymore

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.helma.org/bugs/show_bug.cgi?id=684





--- Comment #5 from tobi <interface@...>  2009-11-05 11:52:45 ---
Great! Now it also works in HopRepl again. Wonderful!

Renaming the method/property to getRoot()/root is fine with me.

--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev

[Bug 684] Application.dataRoot is not set anymore

by Bugzilla from bugzilla-daemon@helma.at :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

http://dev.helma.org/bugs/show_bug.cgi?id=684


Hannes Wallnoefer <hannes@...> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED




--- Comment #6 from Hannes Wallnoefer <hannes@...>  2009-11-17 11:18:31 ---
Closing as fixed. I'm not going to rename getDataRoot() after all, it just
ain't worth it.

--
Configure bugmail: http://dev.helma.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Helma-dev mailing list
Helma-dev@...
http://helma.org/mailman/listinfo/helma-dev