option to change the directory that amber js files are located

13 views
Skip to first unread message

Chris Zheng

unread,
Oct 15, 2012, 8:21:15 PM10/15/12
to amber...@googlegroups.com
currently, all the files are in 'js' directory. If I change the 'js' directory to 'javascript' none of the files work anymore. is there an option in amber.js to load files from the same directory?

Nicolas Petton

unread,
Oct 16, 2012, 5:37:29 AM10/16/12
to Chris Zheng, amber...@googlegroups.com

Yes, you can specify the 'prefix' string.

Nico
--
Nicolas Petton
http://nicolas-petton.fr

Chris Zheng

unread,
Oct 16, 2012, 7:18:16 AM10/16/12
to amber...@googlegroups.com, Chris Zheng
This is my entire file for the hello example.

<!DOCTYPE html>
<html>
  <head>
    <title>My First Amber Project</title>
    <script src="/javascript/amber.js" type="text/javascript"></script>
    <script type="text/javascript">
      loadAmber({
        files: [],
        prefix: '/javascript',
        ready: function() {
          smalltalk.Browser._open();
        }});
    </script>
  </head>
  <body onload=''>
    <article>
      <h1>My First Amber Project</h1>
      <button onclick="smalltalk.Browser._open()">class browser</button>
      <button id="sayHello">say hello</button>
    </article>
  </body>
</html>

it seems to still try to load from the js directory.
Reply all
Reply to author
Forward
0 new messages