While you are here: I really like the tool and always meant to ask whether it would be possible to have more than one template? I typically have three different start templates that I'd like to use with your tool.
thats a good point, i remember that we already discussed it in another thread. Still on my wish list as it would be a great help for a lot of differnt stuff i often need. defining different snippets that could be selected by the right click context menu.
Multiple templates seems like a good idea, I think I can have it working in a couple of weeks (I'm not a full time coder, not even half time)
However, last time I checked the P5 main devs were trying to keep people out of the context menu, and the Tool interface is very basic and can't be used to insert a whole bunch of items to the Tools menu, correct me if I'm wrong and link me to where I can read about it and if there is some API to hook to the context menu.
Please make suggestions on a possible UI work-around. And don't be afraid to tackle the code yourselves, the tool is actually über simple! :D
I have a working 0.9 version with the new multiple templates feature support, there is some more testing and polishing to be done to it, but now you can be quite assured this is coming soon.
I'm also evaluating doing some changes in folder structure.
My proposal is having a ~Sketchbook/templates/ folder that can contain all your templates in a single place, this is for the sake of folder tidiness and to keep you from having to make backups of your templates before installing updated versions of the tool. They would just sit there in their own folder and their updates would be completely independent from the tool's jar file. What are your thoughts?
It actually was very simple to achieve so I might release it tomorrow :)
features multiple templates support in a new folder in ~sketchbook/templates/ It will make the folder and a default template the first time you run it. More details about the tool's usage on the site ( http://inittemplatep5.sf.net/ )
You can have as many templates as you like in the /templates/ folder, every time you run the tool it presents you with a drop down dialog, if you just have one template in the folder it will be loaded right away, like the previous versions did all this time :)
I have great news, I have made a little companion tool for InitSketch named SaveTemplate which will allow you to save an edited sketch into the new templates folder in a glimpse, so you'll be able to create and edit your own templates from inside Processing with all the advantages it has, such as syntax highlighting and run testig.
I'll be releasing it tomorrow over here. keep an eye around :D
Alright so now that Processing is at 2.0 I will tray and get some time off to give maintenance to these tools, and very probably move the code to GitHub, which is way coller than source forge with all the social features over there.
I will get some time this weekend and let you guys know about the repo so you can also fork it any time and send me your pull requests with improvements and so on. Cheers!
PS: I hope I can still program in Java, have been doind PHP for years now lol
When I try to use the new Bootstrap tool I get an error:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at java.io.Reader.<init>(Reader.java:61) at java.io.InputStreamReader.<init>(InputStreamReader.java:55) at poifox.Bootstrap.loadString(Unknown Source) at poifox.Bootstrap.initialize(Unknown Source) at poifox.Bootstrap.run(Unknown Source) at processing.app.contrib.ToolContribution.run(ToolContribution.java:94) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:666) at java.awt.EventQueue.access$400(EventQueue.java:81) at java.awt.EventQueue$2.run(EventQueue.java:627) at java.awt.EventQueue$2.run(EventQueue.java:625) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:636) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Hi, thanks for the feedback, I'm unable to reproduce your bug on both Mac OS 10.6 and Ubuntu 12.10, A newer version of the tool was released and it's actualy listed in the Add Tool dialog of processing. Please update now and see if that solves the problem.
Else you can you have a quick look at the source code (it is really short), and see if you can find the error? I know it's not your task to review my code but I can use the tool perfectly in processing 2.0b8 on both Ubuntu and Mac OS as well as my Templater Tool.
It seems to be an initialization problem. I guess the filesystem for windows gives a different path result than the *nix filesystems. For some reason this ends up calling a null value in loadstrings but for the life of me I can't figure out where it's coming from.
An interesting note about the error :
- first run (after starting processing) I just get the error
- second run I get the window with a selection dropdown that has 2 duplicate entries for my only template (setupdraw.txt). When I select the template I get the error
- third run there are now 3 identical entries for setupdraw
Is there someone else with windows that can try to replicate this bug? I'm starting to think this is a hidden problem with the PDE beta.
Leave a comment on zorbagre's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic