--
You received this message because you are subscribed to the Google Groups "Tributary" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tributary+...@googlegroups.com.
Visit this group at http://groups.google.com/group/tributary.
For more options, visit https://groups.google.com/d/optout.
Because I use Coffee mainly, I've done a bunch of experiments in the CoffeeContextBecause I haven't heard from you I did the changes in my own checkout.I have some cleanup to do (probably another day) and can send you one or more pull requestsFor my convenience it's best if I can send you just one or two pulls, but ideally there should be many and smaller. That's extra work for me, but I will do that if you want it.Here's the stuff I've been working on.Please comment back.Glad to hear from you.Mike
- I fixed a bug that comes up when you self-reference the editor and it runs before the editor has been assigned. I return from CoffeeContext if no editor I Assume that this same thing should be done for JSContext.
- Comment?
- Stepping through the code in the debugger it appears that the .exec function is called several times before plugins are loaded.
- What is the best way to ensure no execution until everything is loaded?
- I fixed a bug in the inline-console plugin. It assumes that all widgets come from the same context (and thus same editor). Changed the plugin so that the clearLine function matches on line number and on cm editor.
- The call to clear all widgets was in the "onrender" callback. But that is nowhere in the code. I changed it to "pre:execute"
- Will that work right? Or will there be a problem if there are two different contexts (say JS and CS) running?
- Should it be both "onrender" and "pre:execute"
- I made a change so that CoffeeScript compile error message in the coffeescript editor. Originally done using inline-console's logJack function, but I changed it because error feedback wants to be in two parts a ^ under the starting token column, and the message itself.
- May need to change the clear-widgets code to clear the error messages separately since they might appear on different lines
- Made the below changes in the course of making this change
- Plan to add CoffeeLint like you have done on JSLint
- Experimental: Third argument (persist) added to console.logJack so you can have it add a line, rather than replace the current line
- Leave in or take out? No longer needed.
- Added console.logHTML so I could write two lines as a unit with arbitrary innerHTML
- Added a log-html CSS class with different coloring (error-like, for now) and without the indent and ">"
- Can I remove the indent and ">" properties from the inline-console class CSS I don't think they add any value
- Passing the context as a third parameter, like g and tributary to initialize function. This lets me access the context's state without having to make an explicit reference
- If the word 'debugger' appears on its own line in the JS then I add sourceMap to the compiled coffeescript. This lets you debug in coffeescript rather than JS.
- This should really be done by messing with the tree, as you are doing with console.log in the plugin.
- For now is this hack OK?
- Note: the reason I do it only when debugger is in the code is that the name of the file has to be changed each time, because Chrome (at least) treats each instance separtely and does not get rid of old instances.
- When I ran into the bug (1 above) I tried to work around it by hacking the gist at github, but kept reloading the same thing. Finally, later on read the server code and saw it is caching gists.
- What about adding a new API function that clears the cache. Or does something already do this?
- My Dev cycle for working on tributary is pretty awful and I need to change it. Currently I switch to my editor window (Sublime) and make the change. Move to a console window and run make. Back to browser window and reload. I need to improve this.
- Do you have something already working that is better?
- If not, I'd propose to run one of the node packages that monitor files for changes, and then does stuff. I'd have it run jslint and the make and if successful signal the server to force a reload.
- Later, would like to make changes so most of the time one just works in Tributary. The following is a first step:
- Plugins would be built and maintained in Trib. There are a couple of changes that would do this. I have not thought this through entirely, but here is a start
- Identify this inlet as a plugin.
- Option 1: presence of plugin.json ; name of plugin directory given in the JSON.
- Change server save code so that if inlet is a plugin then it gets written to that directory.