Drawn2Code
Although writing script code by hand is a great way to program, it isn't necessarily great for everyone or all the time. In addition to the Corona SDK, you will have the option to use Drawn2Code to write much of the code for us. Drawn2Code has been created by me specifically for this course. This can be a great tool to help build apps and to explore scripting techniques.
Downloads (Update 3/9/21: Version 1.573)
Get the latest version! There are separate downloads for Mac or PC:
mac_d2c_download.dmg (Notarized Mac app)
win_d2c_download.zip (Windows installer file)
The download is encrypted using access code (provided on the first day of class or on page 8 of the course textbook).
The latest version features (be sure to refresh this page):
Fixes an issue loading older d2c designs. Hopefully fixed the issue of moving/reordering script objects inside function when the function body is open in the popped out editor window. Fixed an issue on the segmented control settings/detail panel. (1.573)
Recently added:
Fixes mainly related to new functions. New functions now come with an empty snippet and revised instructions (rather than suggesting that the body itself be edited). (1.572)
More fixes. Additional code to deal with loading older designs. Also, fix to the "show alert" script object so that it now allows you to edit the button labels. (1.569)
Small fixes to stack text and loading older designs. (1.566)
Update to fix the "set" button in the stack settings card. Also, fix for an issue causing a crash when loading a saved design. (1.565)
Update to allow you to set the starting number for creating new objects. For example, if you want to start your design out at Obj1000, you can set the starting number of 1000 in the stack settings panel. (1.564)
Fixes to allow older designs to load (specifically, game9.d2c). (1.563)
Updates to dependency-checking (to alert you when you try to delete something that is used by other script objects). Still a way to go on that. Also, a fix to a bug that wrecked display groups if they contained display object that were named. That's been there since 1.553. Yikes. (1.562)
More work on "set attribute" to get it working better. (1.561)
Updates to stack item text to make the stack more informative; hopefully fixed an issue where the wrong image was being displayed after being deleted. (1.559)
Updates to read older files better and more clearly report on load fixes. Hopefully, no more corrupt file saves. Width and height sliders should also be set correctly after design loads. (1.558)
Initial support for locking display objects on screen (i.e., by not allowing x, y, w, h to be modified) via check box. Locked items will show up in the stack with a '◘' symbol. (1.557)
Display object names should show up correctly after loading an existing design. Not sure when that broke or how I broke it so quickly! Also, the default polygon should now stay flipped when resized. That was annoying. More small enhancements to the stack data displayed. (1.555)
New feature: now you can "name" display objects to make it easier to make sense of them in your stack. Remember you can turn off the line numbers in the stack to make more room. (1.553)
That "set attribute" fix is fixed. I hope. (1.552) <— news flash! It wasn't)
Fixed an issue with the "set attribute" action and object visibility. (1.551)
Fixed a code-generation glitch for new images. Ugh. (1.550)
Added the ability to resize polygons! In addition, you can use the "shift" key to lock the width and height (sliders) together. Also, provided a new setting to configure the stack (you can now turn the line numbers off if you are short on screen space or see them as clutter). As with every update, back up your old version and important d2c files. (1.549)
Fixes to the edit menu and a new function to get a boundary box for dragging shapes. (1.547)
More options added to the "Edit" menu. Added functions to round numbers and format number as percentages. Update to image button objects: Code will now run even if images are not selected. (1.546)
Added option to open folder that the design file is in (File…Show Design File in Project Folder). (1.544)
Added an "Edit" menu with options to copy the selected script object to the clipboard or convert it to a snippet. Use with caution — the convert feature hasn't been completely tested! (1.542)
Update to the Set Attribute script object (also added checkboxes to select attribute(s)). Option to delete configuration files on file settings card (config.lua and build.settings). Drawn2Code now remembers app size and position on screen. (1.539)
Fixed a bug which stalled the app (or locked it up) trying to constantly revalidate tool bar images. Added initial support for the Stepper widget. (1.538)
More information and fixes for loading older design files (still can't load cursed designs). (1.536)
Update to design loading information dialog (more detailed info of the design and any problems). Added support to obfuscate text area data for password fields. (1.534)
Fix for scroll view renaming glitch. (1.532)
Fix for scroll view list not loading from saved d2c file. Minor enhancements. (1.531)
Minor tweaks. (1.529)
Minor updates to the polygon editing tool to fix the rescaling issue. (1.527/1.528)
Update to the polygon editing tool (you now have several basic shape presets to start with). (1.526)
Minor fixes and tweaks. (1.524-1.525)
Now clean the generated code for bad characters. Smart quotes should no longer matter. Also, added object type to the design canvas tooltip (when you hover over design elements) (1.523)
A few updates to the process of setting the project folder and copying resources into it. Two small glitches with text fields fixed. (1.522)
Fix for loading older d2c files with circles (added width and height processing). Minor fixes and refinements. (1.521)
Fix for the dock icon (Mac) not showing up in new design windows; added initial support for three more runtime listeners: "system", "orientation", and "resize". (1.520)
Gradients are now displayed for display (shape) objects that support it. (1.519)
Work on "set attribute" to make it compatible with gradient. (1.518)
Initial support for gradients. After creating a gradient (in the "Display Objects"), you can set the fill color for an object by option/alt clicking the fill color button. Note that Drawn2Code does't render the gradients in the design view, but you should see the gradient correctly in the Corona Simulator. (1.517)More adjustments to set attribute action. (1.515)
Updated set attribute to support toFront() and toBack(). Fixed some bugs related to setting attributes. (1.514)
Updated so Text Field initial value is correctly set. (1.513)
ObjID's are now displayed in tool tips if you hover over an object in the design view. (1.512)
Update to the code which reads in images for image buttons. Added a new preference setting so you can have Drawn2Code automatically copy file resources into your project folder. (1.511)
I think I've fixed the issue with loading multiple designs at once (i.e., loading from File > Recent Items…). (1.510)
Added "move to function" button for the "set attribute" action. This will allow you to move these action objects into a function (e.g., to execute in response to a "tap"). (1.509)
Initial support for "set attribute" action. Set attribute allows you to create a script object to modify an existing object as needed. Note that not all script objects can be modified and not all attributes can be modified after the fact. (1.508)
Added some options to the generated code window: allow one-way edits (false now by default), double-click to select obj in stack (true), and include Drawn2Code header info (true). (1.503)
Update to window resizing (should work better on smaller screens — set the zoom to 100%, restart and expand it to fullscreen). (1.50)
Prior updates and improvements
Notes
- This is a Java desktop app (like the ScoreKeeper or Course Access app). As of Fall 2018, the app bundles a version of Java with it, so you don't have to download or install anything else. This makes the download bigger, but should end the compatibility issues.
- Loading older design files (.d2c files) into a newer version of the app may have unpredictable results (well, predictably bad, I guess). It is smart to hang on to an older version of the app as a backup.
- Make backups of your d2c design regularly.
- Troubleshooting: This is really experimental and rapidly evolving software. Glitches will occur.
- Two general tips: (1) If the script stack seems off, try moving a script object up and down the stack; and (2) Try saving your design (the .d2c file), then quitting and reloading the design file in the app.
Troubleshooting
- Looks over the solutions for the CourseAccess app (here).
- Remember to use the password from the text book (or class) to save it from the zip/dmg and to launch it the first time.
- On the Mac, you'll probably get the message about the app being "damaged" (which it isn't). Follow the steps in the CourseAccess section or watch this youtube video: https://www.youtube.com/watch?v=6fqzb4qpgcs
Mac OS Catalina
- So, Catalina has added a new Gatekeeper check to keep you safe from potentially malicious software. To run an app that didn't come from the Mac App Store, the app has to be signed with a developer id (this isn't new) and also submitted for Apple to "notarize". As of Feb. 3rd (2020) these are requirements are being strictly enforced. While this is fine, the notarization process is really finicky. It has taken weeks to get it to work, but versions 1.544 (and beyond) will be notarized. I hope.
- This doesn't affect the Windows version, so another workaround for Mac users would be to run the Windows version using VMWare or Parallels.
Prior Versions
- Version 1.538 [Mac DMG] [Windows ZIP]