{"action":"created","issue":{"url":"https://api.github.com/repos/nau/jscala/issues/11","repository_url":"https://api.github.com/repos/nau/jscala","labels_url":"https://api.github.com/repos/nau/jscala/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/nau/jscala/issues/11/comments","events_url":"https://api.github.com/repos/nau/jscala/issues/11/events","html_url":"https://github.com/nau/jscala/issues/11","id":20128260,"number":11,"title":"javascript { L.f(3) } gives full.package.prefix.L.f(3) outside org.jscala","user":{"login":"mattpap","id":27475,"avatar_url":"https://avatars1.githubusercontent.com/u/27475?v=3","gravatar_id":"","url":"https://api.github.com/users/mattpap","html_url":"https://github.com/mattpap","followers_url":"https://api.github.com/users/mattpap/followers","following_url":"https://api.github.com/users/mattpap/following{/other_user}","gists_url":"https://api.github.com/users/mattpap/gists{/gist_id}","starred_url":"https://api.github.com/users/mattpap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattpap/subscriptions","organizations_url":"https://api.github.com/users/mattpap/orgs","repos_url":"https://api.github.com/users/mattpap/repos","events_url":"https://api.github.com/users/mattpap/events{/privacy}","received_events_url":"https://api.github.com/users/mattpap/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2013-09-26T18:42:45Z","updated_at":"2017-03-20T14:19:35Z","closed_at":"2013-09-27T00:45:05Z","body":"One can just put all APIs in `package org.jscala { ... }` to temporarily fix this issue. \n\nThis can be showed in repl:\n\n``` scala\nscala> import org.jscala._\nimport org.jscala._\n\nscala> object L { def f(x: Int): Int = ??? }\ndefined module L\n\nscala> javascript { L.f(3) }\nres0: org.jscala.JsCall = JsCall(JsSelect(JsSelect(JsSelect(JsSelect(JsSelect(JsSelect(JsSelect(JsIdent($line4),$read),$iw),$iw),$iw),$iw),L),f),List(JsNum(3.0,false)))\n```\n\nNote that repl strips its internal wrappers when printing results, so:\n\n``` scala\nscala> javascript { L.f(3) } asString\nres1: String = L.f(3)\n```\n\nbut you can `println` to show full prefix.\n\n``` scala\nscala> println(javascript { L.f(3) } asString)\n$line4.$read.$iw.$iw.$iw.$iw.L.f(3)\n```\n"},"comment":{"url":"https://api.github.com/repos/nau/jscala/issues/comments/287772824","html_url":"https://github.com/nau/jscala/issues/11#issuecomment-287772824","issue_url":"https://api.github.com/repos/nau/jscala/issues/11","id":287772824,"user":{"login":"danslapman","id":1708325,"avatar_url":"https://avatars2.githubusercontent.com/u/1708325?v=3","gravatar_id":"","url":"https://api.github.com/users/danslapman","html_url":"https://github.com/danslapman","followers_url":"https://api.github.com/users/danslapman/followers","following_url":"https://api.github.com/users/danslapman/following{/other_user}","gists_url":"https://api.github.com/users/danslapman/gists{/gist_id}","starred_url":"https://api.github.com/users/danslapman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danslapman/subscriptions","organizations_url":"https://api.github.com/users/danslapman/orgs","repos_url":"https://api.github.com/users/danslapman/repos","events_url":"https://api.github.com/users/danslapman/events{/privacy}","received_events_url":"https://api.github.com/users/danslapman/received_events","type":"User","site_admin":false},"created_at":"2017-03-20T14:19:35Z","updated_at":"2017-03-20T14:19:35Z","body":"@nafg's problem can be solved this way:\r\n```scala\r\nobject GlobalObject {\r\n  object SomeModule {\r\n    def someMethod() {}\r\n  }\r\n}\r\n\r\n...\r\n\r\nimport GlobalObject._\r\n```"}}
{"actor":{"display_login":"danslapman"}}