Mac users, here’s a little utility to try if you do your code development in a text editor and you want to make use of library code files that are separate from your agent and device source files.
You can add libraries to your source code by adding a line like this:
and the utility, Squinter, will run through the source (agent first, then device), find the #import, load up the library code and paste it in ready for you to copy the ‘compiled’ source into the Electric Imp IDE. Your source files remain untouched, for ease of editing.
Squirrel treats # as a comment marker, so the above line will not affect your running Squirrel code should you paste ‘uncompiled’ code into the IDE.
Squinter lets you save agent and device source code combos as projects for easy opening next time, and it lets you open your source and library files in your favourite text editor or whatever app you have set to handle .nut files.
There are some limits: agent and device source files need to be in the format: ‘someproject.agent.nut’ and ‘someproject.device.nut’. Libraries should be named 'somelibrary.class.nut’ or 'somelibrary.library.nut’. You can add one or both of these files to an existing project, or use a pair of them to create a new project.
You will need to allow your Mac to open ‘apps downloaded from anywhere’ (in the Security & Privacy prefs), and you’ll need Mac OS X 10.9.
As always with free software (pre-release code in particular), you use Squinter entirely at your own risk. There will be bugs; please do post notifications of them when you get bitten by one.
Note: the file is a .gz file containing a .zip archive. If it opens as a plain document, just double-click the extracted file to reveal Squinter.