Codea 2.3.3 (Previously Codea 2.3.3 Beta Thread)

@Simeon I did the export to a zip file and saved it on the iCloud Drive. I was able to use the free version of iZip to unzip one of my projects, copy it, and then paste it back into a Codea project. So the use of the zip file as a way to have a backup copy of projects works well. Of course, I wouldn’t want to have to do that for hundreds of projects, but just in case a project gets deleted, that works just fine.

Tried Aircode in the latest version and it now show the address to connect to instead of a black screen. I don’t use Aircode, so that’s as far as I went.

Thanks @dave1707, you can check for projects with the hasProject(name) now.

@Simeon hasProject() works just fine. Thanks.

EDIT: The editor showing the argument labels seems to work also. I normally type the () anytime they’re needed and then put the cursor inside them, so I probably won’t see the change for the argument labels. But I guess anyone who uses an external keyboard would probably use it.

@Simeon The TestFlight info says support for importing files. I’m not sure what you mean or how to do this. Not sure how to test this.

@dave1707 basically if you Airdrop a PNG, PDF, JPG, or Project.codea file (or use the sharing menu on such files) you can choose to “Import with Codea”. This will bring up the import menu for a single file.

@Simeon I found 1 picture that I was able to import to Codea using share. So the import option worked, at least on that 1 image.

@Simeon,

Aircode now working - several apps varied complexity - using my PC. Will try other systems.

Excellent - thank you.

Bri_G

@Simeon

Being able to create new sections with createProject("Libraries:My Library") could be a great way to organise projects. Thanks for adding this! When I created a section, it showed up beneath my projects and the example libraries, so I had to scroll down a really long way (I have 400 projects) to find them. Being able to sort by section, or collapse sections, or putting user-created sections at the top, or even having some kind of two-pane picker, sections on the left, projects on the right, might help make this section more navigable for users with lots of projects.

Re programmatic project creation, what do you think of this request?

https://bitbucket.org/TwoLivesLeft/core/issues/395/infoplist-should-contain-roster-of-assets

It’s to store project name and a list of assets as part of the info.plist, so that the plist serves as a complete manifest for the archived project. This would make it much easier to write dependency managers that could pull a project off github or wherever plus all its assets, and autoinstall it with the correct project name.

And while we’re on the createProject subject, allow the Add NewProject tab to create a new project using the new section name. Example Add New Project with the name Libraries:Lib1 . I tried that and it creates a project with that complete name Libraries:Lib1 in the normal list of projects instead of putting Lib1 in Libraries.

@Simeon I noticed that you can’t have the same named project in different sections. It tells you that a projects with that name already exists. I don’t see that as a problem, but maybe others might.

@yojimbo2000 reordering sections will become part of Codea’s future UI (probably as well as hiding sections, showing all, and having dynamic sections).

I like the asset list idea, but how do we decide if an asset is included in a project? All we really know for sure is that it is in the same directory, but that does not necessarily mean it is used.

@dave1707 yes, there is no support in the main UI for sections yet. It’s just supported in the API because the data model has been updated first. I’m surprised Codea even let you make a project with a colon : in the name. That’s concerning :smiley:

It is intentional that you can’t have the same project name in multiple collections — I like the simplicity of it, and allowing duplicate project names would break APIs like readProjectTab which assume projects are unique.

Hi @Simeon,

Is it possible to place ‘shortcuts’ at the top of the Codea screen so that you can skip to different sections quickly. Scrolling through all your development apps past examples before you get to personal sections can be a pain. Also could you consider the same with the dependencies list - similar problem. Maybe open the dependencies with a list of sections so that you can open the section list with a tap?

@Bri_G great point on the dependencies list. I think you’ll like what we have in mind, but once there is a beta available with the custom collections (soon) then I’d love to hear your feedback.

What’s this dependencies list? Did I miss a new feature?

@yojimbo2000 Oh just the list under the add new tab button in the editor. It has been there for a long time. Where you can add projects as dependencies to other projects.

@yojimbo2000 When you’re editing a project, there’s a plus sign icon at the top right of the screen. If you tap that you have the option to create New class, create a blank file, or to check other projects as a dependency to this project.

Hi @Simeon,

On my first post I mentioned that I had issues with the project archiving. I have tried to archive from an iPad2 and an iPad Pro. On the iPad2 after clicking on ‘Export Projects’ the dialogue box came up with an archive ready box. I assume that my files had been archived during this wait and stored locally, nice quirky comments by the way especially ‘Pondering Stibbons’.

Problem one I find these transfers on the iPad not very intuitive - didn’t want to open the file so I went for the ’ More Options’ button. I couldn’t see any options so I selected the lower … More and enabled Save to Dropbox. Then used an upper Copy to Dropbox option. This seemed to work and after a lengthy wait my iPad went to sleep. On waking up and logging in found the Codea up with another dialogue box, no other messages but with a Done button - which I pressed, then started coding. Soon after checked Dropbox but couldn’t find where the file had gone (my fault didn’t use save dialogue box properly). Also the latest files showed
An upload but only partial which made me think it had been abandoned. Two days later logging onto Dropbox again found the latest files uploaded still showing the upload at about the same level then it started uploading.

Questions:

  1. Do you archive to the iPad initially?
  2. Do you initiate the archiving with Dropbox and then leave it up to Dropbox to upload?
  3. If the latter is true I assume the iPad needs to be in use when the archiving is done, but do you have to initiate Dropbox and/or Codea?
  4. Is the loading projects from Dropbox carried out by the same dialogue boxes etc?

Would ‘Manage Projects’ be better than ‘Export Projects’ on the menu button?

With regard to images saving every image is the safest bet but could result in duplication or deletion if the same name is used. What about putting all images in a single image folder, checking for duplication by checking the path for each image in each file. All the data could be recorded in the info file for each project.

Does the archive include Dropbox or URL graphic files?

Are sound files treated like graphic files?

Maybe an option could be globally set for save/don’t save resources with the archive.

Sorry about the length of this but fealt I should mention these issues. Most probably down to my poor understanding of iPad features in general.

@Bri_G I agree that those options are poorly worded. The underlying iOS SDK refers to them as “Present Open In Menu” (for the button we have labelled “Open With…”) and “Present Options Menu” (for the button we have labelled “More Options”). The former is supposed to be used for transfer to other apps, and the latter for options like copy, quick look, or other actions provided by applications on the system.

Here is the way the archive process works:

  1. Codea creates a zip archive of your entire Documents/ folder. Including all projects, collections (except example projects) and assets.
  2. Codea stores the zip archive in a temporary folder
  3. Once you select an application the zip archive is transferred in its entirety to that application (e.g., Dropbox). It is then the responsibility of that application to do something with it (e.g., upload it)
  4. Codea deletes the zip archive

The archive does not include any graphic files referenced via URL from your code. The archive does include your Dropbox.assets folder. Sound files are treated like any other files.

So once the zip file is handed off to an external app, it is actually deleted from Codea. I will be working on a feature where Codea can actually edit projects which live inside other apps (e.g., a Git client like Working Copy). But that’s going to be decided by whether Apple allows the project import in this update to pass review.

Hi @Simeon ,

Thanks for the explanation and a glimpse of the future (apple willing). Always better to understand what’ going on under the hood!