Re: How does the presentation example bootstrap itself - What's its* main()

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

Re: How does the presentation example bootstrap itself - What's its* main()

Amber Milan Eskridge
You find it in Presentation.st in Line 1333…1341. All initialization methods of classes are run, when Amber starts up. There you have the initialization method of class PresentationNavigator which creates an instance of itself, then sends it the message open. This in turn sends appendToJQuery to the instance which sends renderOn to itself which runs renderCurrentPresentation and so on… :)


On Thu, May 24, 2012 at 8:00 PM, W A <[hidden email]> wrote:
Hi, 

Right  up front I'll confess to being a novice Smalltalker and Amber user but I've been looking at some of the examples, notably the presentation example.

I changed the exists index.html to the following, so that I might understand how the presentation example bootstraps itself.

<html>
<head>
<title>JTalk - Presentation</title>
<script src="../../js/amber.js" type="text/javascript"></script>
</head>
<body>

<script type="text/javascript"> 
loadAmber({
files: ['Presentation.js'],
prefix: 'examples/presentation/js',
}); 
</script>

</body>
</html>
<!-- MOVED OUT OF HARMS WAY -  //ready: function() {smalltalk.Browser._openOn_(smalltalk.FOSDEM2012Presentation)}  -->


I had presumed that loadAmber:ready was the key to the bootstrap but running the above means I lose the smalltalk-browser but the presentation example still works, which confuses me.

Would anyone kindly point me in the right direction esp. if it's a case of RTFM.

Thanks.



Reply | Threaded
Open this post in threaded view
|

Re: How does the presentation example bootstrap itself - What's its* main()

Amber Milan Eskridge
to reopen the Browser, you can type the follwing url into your locationbar:
javascript:smalltalk.Browser._open()

btw

On Fri, May 25, 2012 at 12:34 AM, Amber Milan Eskridge <[hidden email]> wrote:
You find it in Presentation.st in Line 1333…1341. All initialization methods of classes are run, when Amber starts up. There you have the initialization method of class PresentationNavigator which creates an instance of itself, then sends it the message open. This in turn sends appendToJQuery to the instance which sends renderOn to itself which runs renderCurrentPresentation and so on… :)


On Thu, May 24, 2012 at 8:00 PM, W A <[hidden email]> wrote:
Hi, 

Right  up front I'll confess to being a novice Smalltalker and Amber user but I've been looking at some of the examples, notably the presentation example.

I changed the exists index.html to the following, so that I might understand how the presentation example bootstraps itself.

<html>
<head>
<title>JTalk - Presentation</title>
<script src="../../js/amber.js" type="text/javascript"></script>
</head>
<body>

<script type="text/javascript"> 
loadAmber({
files: ['Presentation.js'],
prefix: 'examples/presentation/js',
}); 
</script>

</body>
</html>
<!-- MOVED OUT OF HARMS WAY -  //ready: function() {smalltalk.Browser._openOn_(smalltalk.FOSDEM2012Presentation)}  -->


I had presumed that loadAmber:ready was the key to the bootstrap but running the above means I lose the smalltalk-browser but the presentation example still works, which confuses me.

Would anyone kindly point me in the right direction esp. if it's a case of RTFM.

Thanks.




W A
Reply | Threaded
Open this post in threaded view
|

Re: How does the presentation example bootstrap itself - What's its* main()

W A
Amber Milan Eskridge - Many thanks for taking the time to give the answer, that helps in my understanding. 

On Thursday, May 24, 2012 11:36:11 PM UTC+1, Amber Milan Eskridge wrote:
to reopen the Browser, you can type the follwing url into your locationbar:
javascript:smalltalk.Browser._open()

btw

On Fri, May 25, 2012 at 12:34 AM, Amber Milan Eskridge <> wrote:
You find it in Presentation.st in Line 1333…1341. All initialization methods of classes are run, when Amber starts up. There you have the initialization method of class PresentationNavigator which creates an instance of itself, then sends it the message open. This in turn sends appendToJQuery to the instance which sends renderOn to itself which runs renderCurrentPresentation and so on… :)


On Thu, May 24, 2012 at 8:00 PM, W A <> wrote:
Hi, 

Right  up front I'll confess to being a novice Smalltalker and Amber user but I've been looking at some of the examples, notably the presentation example.

I changed the exists index.html to the following, so that I might understand how the presentation example bootstraps itself.

<html>
<head>
<title>JTalk - Presentation</title>
<script src="../../js/amber.js" type="text/javascript"></script>
</head>
<body>

<script type="text/javascript"> 
loadAmber({
files: ['Presentation.js'],
prefix: 'examples/presentation/js',
}); 
</script>

</body>
</html>
<!-- MOVED OUT OF HARMS WAY -  //ready: function() {smalltalk.Browser._openOn_(smalltalk.FOSDEM2012Presentation)}  -->


I had presumed that loadAmber:ready was the key to the bootstrap but running the above means I lose the smalltalk-browser but the presentation example still works, which confuses me.

Would anyone kindly point me in the right direction esp. if it's a case of RTFM.

Thanks.