where is loadAmber defined?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

where is loadAmber defined?

larrry
I'm using the load amber function to execute my amber code on page
load and it works in dev mode, but when I switched to deployment mode
I get "Uncaught Reference: loadAmber is not defined.

To create my deployment js I followed the instructions on the mailing
list to create a single js file like so

cat js/boot.js js/Kernel.deploy.js js/Canvas.deploy.js
js/MYCODE.deploy.js js/init.js > js/mycode.js

Is there something missing from this list?

thanks.
Reply | Threaded
Open this post in threaded view
|

Re: where is loadAmber defined?

gokr
On 10/25/2011 11:21 PM, Larry White wrote:

> I'm using the load amber function to execute my amber code on page
> load and it works in dev mode, but when I switched to deployment mode
> I get "Uncaught Reference: loadAmber is not defined.
>
> To create my deployment js I followed the instructions on the mailing
> list to create a single js file like so
>
> cat js/boot.js js/Kernel.deploy.js js/Canvas.deploy.js
> js/MYCODE.deploy.js js/init.js>  js/mycode.js
>
> Is there something missing from this list?
>
> thanks.

Just a note - please try to use amberc for creating a single js file, it
is after all the tool meant for doing these things.

And yes, we should add much more examples, but there are examples using
Makefile + amberc and just running amberc should explain how it is used
"fairly good".

regards, Göran
Reply | Threaded
Open this post in threaded view
|

Re: where is loadAmber defined?

Nicolas Petton
In reply to this post by larrry
loadAmber is in js/amber.js and takes care of loading files for you.
However, if you don't use it, you can call your function like this:

smalltalkReady = function() {
        //Do anything you want here
}

All you have to make sure is that you define this before loading amber
(it will be called in init.js).

HTH,
Nico

On Tue, 2011-10-25 at 17:21 -0400, Larry White wrote:

> I'm using the load amber function to execute my amber code on page
> load and it works in dev mode, but when I switched to deployment mode
> I get "Uncaught Reference: loadAmber is not defined.
>
> To create my deployment js I followed the instructions on the mailing
> list to create a single js file like so
>
> cat js/boot.js js/Kernel.deploy.js js/Canvas.deploy.js
> js/MYCODE.deploy.js js/init.js > js/mycode.js
>
> Is there something missing from this list?
>
> thanks.


Reply | Threaded
Open this post in threaded view
|

Re: where is loadAmber defined?

larrry
Thank you

Sent from my iPhone

On Oct 25, 2011, at 5:30 PM, Nicolas Petton <[hidden email]> wrote:

> loadAmber is in js/amber.js and takes care of loading files for you.
> However, if you don't use it, you can call your function like this:
>
> smalltalkReady = function() {
>    //Do anything you want here
> }
>
> All you have to make sure is that you define this before loading amber
> (it will be called in init.js).
>
> HTH,
> Nico
>
> On Tue, 2011-10-25 at 17:21 -0400, Larry White wrote:
>> I'm using the load amber function to execute my amber code on page
>> load and it works in dev mode, but when I switched to deployment mode
>> I get "Uncaught Reference: loadAmber is not defined.
>>
>> To create my deployment js I followed the instructions on the mailing
>> list to create a single js file like so
>>
>> cat js/boot.js js/Kernel.deploy.js js/Canvas.deploy.js
>> js/MYCODE.deploy.js js/init.js > js/mycode.js
>>
>> Is there something missing from this list?
>>
>> thanks.
>
>