Hi,
jquery-ui.min.js gets loaded in the development mode - require['amber/devel'] - for the IDE. What's the best way to load it in deployment mode - require['amber/deploy']? Thanks |
laci wrote:
> Hi, > jquery-ui.min.js gets loaded in the development mode - > require['amber/devel'] - for the IDE. > What's the best way to load it in deployment mode - > require['amber/deploy']? This should load it as well. So, nothing should be done except loading 'amber/deploy'. -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
"amber/bower_components/jquery-ui/ui/minified/jquery-ui.min.js" doesn't get loaded.
Inspected with fiddler and it is not in the list of loaded modules. The require.config in amber.js includes this module. >----Original Message---- >From : [hidden email] >Date : 08/03/2014 20:01 >To : [hidden email] >Subject : Re: [amber-lang] loading jquery-ui in deployment mode > >laci wrote: >> Hi, >> jquery-ui.min.js gets loaded in the development mode - >> require['amber/devel'] - for the IDE. >> What's the best way to load it in deployment mode - >> require['amber/deploy']? > >This should load it as well. So, nothing should be done except loading >'amber/deploy'. > >-- >You received this message because you are subscribed to the Google Groups "amber-lang" group. >To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. >For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Herby Vojčík
"amber/bower_components/jquery-ui/ui/minified/jquery-ui.min.js" doesn't get loaded.
Inspected with fiddler and it is not in the list of loaded modules. The require.config in amber.js includes this module. Maybe it doesn't get loaded because IDE is not loaded, which refers to the module by default. |
laci wrote: > "amber/bower_components/jquery-ui/ui/minified/jquery-ui.min.js" doesn't get > loaded. > Inspected with fiddler and it is not in the list of loaded modules. > > The require.config in amber.js includes this module. > Maybe it doesn't get loaded because IDE is not loaded, which refers to the > module by default. That does not matter, as amber/deploy itself lists it as its direct dependency, see support/deploy.js. It's very strange that it does not load. Did you make some changes to files in support directory? -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Including in deploy.js is the way to go - see below.
define([ './helpers', 'jquery', 'amber_core/Kernel-Objects', 'amber_core/Kernel-Classes', 'amber_core/Kernel-Methods', 'amber_core/Kernel-Collections', 'amber_core/Kernel-Infrastructure', 'amber_core/Kernel-Exceptions', 'amber_core/Kernel-Transcript', 'amber_core/Kernel-Announcements', 'amber_core/Canvas' ,'jquery-ui' ], function (smalltalk) { return smalltalk; }); |
Ah, I see.
I misread it. I though it is jquery, not jquery-ui' Don't include it this way. It will never be supported. Jquery UI is not essential, so it won't be in the deploy set. You should incloude 'jquery-ui' in the list of _your_ packages. Just after 'amber/deploy', for example. laci wrote: > Including in deploy.js is the way to go - see below. > > define([ > './helpers', > 'jquery', > 'amber_core/Kernel-Objects', > 'amber_core/Kernel-Classes', > 'amber_core/Kernel-Methods', > 'amber_core/Kernel-Collections', > 'amber_core/Kernel-Infrastructure', > 'amber_core/Kernel-Exceptions', > 'amber_core/Kernel-Transcript', > 'amber_core/Kernel-Announcements', > 'amber_core/Canvas' > ,'jquery-ui' > ], function (smalltalk) { return smalltalk; }); > > > > -- > View this message in context: http://forum.world.st/loading-jquery-ui-in-deployment-mode-tp4748306p4748333.html > Sent from the Amber Smalltalk mailing list archive > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Thanks Herby. I came to the same conclusion.
Shouldn't change anything in the core. Anyway it was a good learning curve on how require.js is loading the modules. |
The approach I used in prior version of amber no longer works to load 'jquery-ui' in deploy mode.
Earlier I could load it with code: require(['jquery-ui'] Now reference to 'jquery-ui' is within devel-inner.js file. Could you assist how to resolve that. |
laci wrote: > The approach I used in prior version of amber no longer works to load > 'jquery-ui' in deploy mode. > > Earlier I could load it with code: > require(['jquery-ui'] > > Now reference to 'jquery-ui' is within devel-inner.js file. Well of course you need to map the name yourself if you are going to use it. You should also add shim for its dependency on jquery. Same as devel.js does it. (alternatively, you may not need to map the flat name but load it from its location in amber_lib directly; shimming the dependency on 'jquery' is needed to do anyway) Herby -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Thanks for the pointer. Loading via amber_lib works fine.
Something else, which I mentioned in another thread but relates to deployment mode. The loading error occurs for Internet Explorer. I am getting the error message: "Object doesn't support property or method 'bind'" File: es5-sham.min.js at line: 28 var call = Function.prototype.call; var prototypeOfObject = Object.prototype; var owns = call.bind(prototypeOfObject.hasOwnProperty); as it turns out the variable 'call' is undefined. Hence the error. Any suggestion to resolve that. |
Has anyone tried using reactjs from within amber?
Cheers Andy -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
This post was updated on .
In reply to this post by laci
At the moment es5-sham.min.js is loading Function is undefined in IE11.
var call = Function.prototype.call; console.log('******************** es5-sham.min.js.call ********************'); console.log(Function); console.log(Function.prototype); console.log(Function.prototype.call); console.log(call); console.log('********************'); var prototypeOfObject = Object.prototype; var owns = call.bind(prototypeOfObject.hasOwnProperty); The code above generates four undefined output line. What's going on? If I refresh the page with Ctrl+F5 then most of the time the page loads successfully. You cannot rely on it though. Very frustrating. |
Hi!
We should check which version we use. Could you add an issue on the bugtracker on github? I'll check what's going on. Cheers, Nico laci writes: > At the moment es5-sham.min.js is loading Function is undefined in IE11. > > > var call = Function.prototype.call; > console.log('******************** es5-sham.min.js.call > ********************'); > console.log(Function); > console.log(Function.prototype); > console.log(Function.prototype.call); > console.log(call); > console.log('********************'); > var prototypeOfObject = Object.prototype; > var owns = call.bind(prototypeOfObject.hasOwnProperty); > > The code above generates four undefined output line. > What's going on? > > > > -- > View this message in context: http://forum.world.st/loading-jquery-ui-in-deployment-mode-tp4748306p4749329.html > Sent from the Amber Smalltalk mailing list archive at Nabble.com. -- Nicolas Petton http://nicolas-petton.fr -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Andy Burnett
Andy Burnett writes: > Has anyone tried using reactjs from within amber? Hi! I haven't. Anyone else tried it? Cheers, Nico -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Nicolas Petton
Hi Nico,
I think I know what was going on. I was adding functionality to page, which was loading other version of jquery and bunch of other JavaScript files for other parts of the page before amber was loading. I am pretty much sure now that at initial loading these files collided. At reloading the page without reloading implicitly the JavaScript files were successful, which proves this assumption. I think we can drop this issue. I'd like to thank you personally with this great environment. Web programing is fun again. By the way I have integrated amber into .NET environment using IIS web service. If there is interest I can share with the community the know-how. Cheers, laszlo >----Original Message---- >From : [hidden email] >Date : 17/03/2014 18:42 >To : [hidden email] >Subject : Re: [amber-lang] Re: loading jquery-ui in deployment mode > >Hi! > >We should check which version we use. Could you add an issue on the >bugtracker on github? I'll check what's going on. > >Cheers, >Nico > >laci writes: > >> At the moment es5-sham.min.js is loading Function is undefined in IE11. >> >> >> var call = Function.prototype.call; >> console.log('******************** es5-sham.min.js.call >> ********************'); >> console.log(Function); >> console.log(Function.prototype); >> console.log(Function.prototype.call); >> console.log(call); >> console.log('********************'); >> var prototypeOfObject = Object.prototype; >> var owns = call.bind(prototypeOfObject.hasOwnProperty); >> >> The code above generates four undefined output line. >> What's going on? >> >> >> >> -- >> View this message in context: http://forum.world.st/loading-jquery-ui-in-deployment-mode-tp4748306p4749329.html >> Sent from the Amber Smalltalk mailing list archive at Nabble.com. > > >-- >Nicolas Petton >http://nicolas-petton.fr > >-- >You received this message because you are subscribed to the Google Groups "amber-lang" group. >To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. >For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
[hidden email] writes: > Hi Nico, hi! > > I think I know what was going on. I was adding functionality to page, which was loading > other version of jquery and bunch of other JavaScript files for other parts of the page > before amber was loading. > > I am pretty much sure now that at initial loading these files collided. > At reloading the page without reloading implicitly the JavaScript files were successful, > which proves this assumption. > > I think we can drop this issue. Cool to know it works now :) > > I'd like to thank you personally with this great environment. > Web programing is fun again. > Thanks for your kind words! Cheers, Nico -- You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Nicolas Petton
I haven't tried reactjs.
-- But I found Bacon.js some time ago (http://baconjs.github.io/) which sounds interesting, too. Best,
Manfred You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
In reply to this post by Andy Burnett
I didn’t but what would be the motivation behind using it?
I took a look at reactsjs' examples and sounds like the poors' man canvas plus some conveniences to observe/react to events so it can re-render things But maybe I missed something about it, not sure On Mar 15, 2014, at 7:07 PM, Andy Burnett <[hidden email]> wrote: Has anyone tried using reactjs from within amber? You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Well, from what I have read, React seems to offer quite a good level of performance. It builds a shadow DOM, and then works out the delta for any changes, and only rerenders that part. Cheers
Andy ᐧ
On Sun, Mar 30, 2014 at 10:25 AM, sebastian <[hidden email]> wrote:
You received this message because you are subscribed to the Google Groups "amber-lang" group. To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email]. For more options, visit https://groups.google.com/d/optout. |
Free forum by Nabble | Edit this page |