Hello Amber Smalltalkers I add and commit the following class and package in Helios
Commit saves the file as src/KingTut2.st and src/KingTut2.js When I reload Helios my new package and class disappear ! What do I do to automatically reload the package KingTut2 on restart ?? Thanks Tariq 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. |
Tariq wrote: > Hello Amber Smalltalkers > > > I add and commit the following class and package in Helios > > > || > Widgetsubclass:#FormExample > instanceVariableNames:'formValues formInputs inputFactories > extractionRecipes' > package:'KingTut2' I bet the package is newly created one. In that case, it is committed, but is not loaded back (amber does not know it needs it). Either commit to the same packages in which your app is (did you use `amber inti` to create new project?), or if you want to have new package, you should tell the application that it needs to load it. High level way to do this is to find the main app package in Helios, where there is the `imports: {}` line. You should add your package into these imports, like `imports: {'kingtut/KingTut2'}` (I don't know what is the namespace you use, I just guessed 'kingtut'), then save, _and then commit_ (the package does not change its color to red to mark it's dirty, it's known Helios bug). Low-level way, not r eally recommended, is to add 'kingtut/KingTut2' into deploy.js file. Either way, the 'kingtut/KingTut2' must be listed as a dependency of some module (either 'deploy' (by adding it by hand to dploy.js) or 'kingtut/KingTut' (by adding it to imports:, saving and commiting) (again, guessing what you main app package is, now I guessed 'kingtut/KingTut)). Once it is listed as a dependency, it is loaded. > > <https://lh3.googleusercontent.com/-VQs0HcT3lY8/Vmi_yMrgIFI/AAAAAAAAA8k/AtdvjPzwRkM/s1600/kingtut2.png> > > Commit saves the file as *src/KingTut2.st* and *src/KingTut2.js* > > > When I reload Helios my new package and class disappear ! > > > <https://lh3.googleusercontent.com/-gnJ12Y_6O_g/VmjBR2S0snI/AAAAAAAAA8w/DW6UPA4dClE/s1600/kingtut3.png> > > > What do I do to automatically reload the package KingTut2 on restart ?? > > > Thanks > > > Tariq > > > -- > You received this message because you are subscribed to the Google > Groups "amber-lang" group. > To unsubscribe from t > an email to [hidden email] > <mailto:[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 Tariq
See "Notes" in here: Or look in the Gruntfile js which should have a place for you to list your package. Normally, if you use the init thing in grunt, you shouldn't have to do that as your package is the one thing you specify during the init process. Maybe Herby can help better here. Phil On Thu, Dec 10, 2015 at 1:08 AM, Tariq <[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. |
In reply to this post by Herby Vojčík
I see that this is also restated in How do I add another package in version 0.13 (legacy IDE)?Using the above FAQ, I edited devel.js to look like Myapp-NewPackage now also appears with the default Myapp package Many thanks Herby and Phil ! 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. |
add a new package in Helios, Package named: 'Jericho' Package named: 'Myapp' imports: {'amber-myapp/Jericho'. 'amber-myapp/Palestine'. 'amber/jquery/Wrappers-JQuery'. 'amber/web/Web'. 'silk/Silk'} transport: (AmdPackageTransport namespace: 'amber-myapp') Save and Commit MyApp The new package Jericho will now appear on restarting/reopening Helios 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. |
If you added Jericho as a MyApp dependency, you need not (and probably should not) have it in deploy.js / devel.js.
Tariq wrote: > Your second suggestion leads to this, without editing devel.js > > > add a new package in Helios, > > Package > named: 'Jericho' > > <https://lh3.googleusercontent.com/-f8xWNjBM5kM/VmtGXGFC37I/AAAAAAAAA9o/_3f0QBT88CU/s1600/jericho.png> > > Package > named: 'Myapp' > imports: {*'amber-myapp/Jericho'.* 'amber-myapp/Palestine'. > 'amber/jquery/Wrappers-JQuery'. 'amber/web/Web'. 'silk/Silk'} > transport: (AmdPackageTransport namespace: 'amber-myapp') > > <https://lh3.googleusercontent.com/-WAkNrLIllhA/VmtGwIK60oI/AAAAAAAAA9w/w0SrsRH-j5Y/s1600/jericho2.png> > > *Save* and *Commit* MyApp > > > The new package Jericho will now appear on restarting/reopening Helios > > > > -- > 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 > > <mailto:[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 Tariq
Tariq wrote: > > > I see that this is also restated in > > > How do I add another package in version 0.13 (legacy IDE)? > <https://github.com/amber-smalltalk/amber/wiki/FAQ> > > Using the above FAQ <https://github.com/amber-smalltalk/amber/wiki/FAQ>, > I edited devel.js to look like The FAQ says to edit deploy.js - there is difference between the files, actually, even if you may not see it in development, but if you have to edit one of the two, it is probably deploy.js (list of packages that need to load for app to work), not testing.js (list of oacakges needed to run tests, it has deploy as dependency, so you only list when is needed in adddition to deploy) or devel.js (list of packages to load when developing an app; it has tresing as a dependency, so you only list additional files here, like tooling) Herby [ snip ] -- 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. |
Third way: Create an example class in the amber project called MyApp: Package named: 'Yin' Add a reference to Yin in the index.html file: <script type='text/javascript'> require(['app','amber-myapp/Yin'], function (amber) { amber.initialize({ //used for all new packages in IDE 'transport.defaultAmdNamespace': "amber-myapp" }); require(["amber-ide-starter-dialog"], function (dlg) { dlg.start(); }); amber.globals.Myapp._start(); }); </script> Viola, Yin reappears on restart. 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. |
No, that explicitly discouraged. You are _not_ presumed to changed the ['app'] array in require call. It would break the tooling. The place to put 'amber-myapp/Yin' is either in deploy.js or in the amber-myapp/MyApp imports.
Tariq wrote: > Third way: > > > Create an example class in the amber project called MyApp: > > *Package* > *named: 'Yin'* > > <https://lh3.googleusercontent.com/-kwCgJpws18o/Vm3_LypwkHI/AAAAAAAAA-A/O60BzgC0b8s/s1600/Yin.png> > > > Add a reference to Yin in the index.html file: > > <script type='text/javascript'> > require(['app','*amber-myapp/Yin*'], function (amber) { > amber.initialize({ > //used for all new packages in IDE > 'transport.defaultAmdNamespace': "amber-myapp" > }); > require(["amber-ide-starter-dialog"], function (dlg) { > dlg.start(); }); > amber.globals.Myapp._start(); > }); > </script> > > Viola, Yin reappears on restart. > > -- > You received this message because yo > Groups "amber-lang" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [hidden email] > <mailto:[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. |
Free forum by Nabble | Edit this page |