Codea 2.3.3 (Previously Codea 2.3.3 Beta Thread)

This is the thread for beta discussion. It looks like Apple has approved the project import feature (at least for beta testing!).

There is also the project API I discussed with @dave1707, however the documentation for that API will come in the next build.

@Simeon Exactly what is the export option going to do and where is the zip file going to be. Does it do anything to the existing projects because I have 400+ projects that I don’t want to have to fix.

@dave1707 that’s the point of being a beta-tester, you’re meant to tap it and see.

Once it’s produced the zip archive, it gives you the standard iOS share dialogue, so you can put it wherever you like. I airdropped it to my Mac.

I also have around 400 projects, about 250mb altogether (probably the assets making up most of that). It took about 5 minutes to zip the files.

I haven’t been brave enough to try the re-import yet, as I only have 1 iPad. Perhaps someone with more than one device should test that.

So far, the createProject(), deleteProject(), and listProjects() appear to work as described.

@Simeon thanks for this, seems great so far!

I think procedural project managing is actually really important, as it will allow people to write proper installers and dependency management.

@yojimbo2000 I tried the export on my 475 projects. It took about 20 seconds before it asked me where to put the file. I picked Dropbox and that took about a minute before it was done. My zip file shows 6.5 MB. @Simeon I like the comments that show as the zip file is created.

@dave1707 @yojimbo2000 thanks for your feedback!

@yojimbo2000 the import will display a panel asking you to select which projects or assets to import. It won’t do anything until you confirm the import. But yeah, it might be better to test it with a zip file of one or two projects, or assets. It should be able to import anything that Codea can read from a zip file.

@dave1707 I think if you are an advanced user that has more than 400 projects then we’re not going to be able to offer the perfect solution for project management. Thank you for prompting me about the create project API, hopefully it lets you build what you need.

@Simeon Thanks for the listProjects, createProject, and deleteProject functions. I have code already written to use them, I was just waiting for those functions to show up. I’ll be changing my code now that I can actually test with them to create something useful.

@Simeon Here’s something that needs to be looked at.

  1. createProject() causes an error if the project exists.
  2. createProject() doesn’t return anything when it creates a project.
  3. deleteProject() causes an error if the project doesn’t exist.
  4. deleteProject() doesn’t return anything when it deletes a project.

I don’t know if they need to return something if successful, but they shouldn’t cause the program to terminate with an error.

EDIT: I can get around the problem if I use listProjectTabs to see if a project exists, but that’s kind of goofy.

@Simeon After some thought, I think createProject should return true if it creates a project, return false without touching a project if the project exists. If it returns false, then I can determine why I’m trying to create an existing project. If needed, I could then delete the project and then create it. Same goes for deleteProject. If it deletes a project, return true, if the project doesn’t exist, return false. If false, then I can determine why I’m trying to delete a project that doesn’t exist.

@Simeon One thing I noticed, when I tap on a project name and select to delete it, it seems to take a long time. I tried it several times and it seems a lot longer. This is when 2 iPads would be nice, one on the beta, one on the last release.

@Simeon I don’t use Air Code, but I tried it anyways and all I get is a black screen.

@Simeon I did the export of all my projects. On the iPad I tried to look at the zip file with a zip viewer. I see all of my projects in a list as projectname.codea. When I select a project, I see a info.plist and Main.lua file. When I look at either of them, I see nothing. I found 2 png files and when I selected them, I see the correct images. Not sure why I can see the images, but not any text when I look at the project files.

@dave1707 thank you for the feedback. I better look into the Air Code issue.

I purposefully made createProject and deleteProject throw runtime errors in those circumstances. I considered that they are fairly powerful functions and by throwing errors we can hopefully ensure that code is using them correctly.

The solution I envisioned was as you said, use listProjects to check if a project exists. But I think we need to have a function to check. Something like projectExists(name)

Then you could say:

if projectExists(name) then

(Or whatever you want to do.)

The function projectExists could be written now in terms of listProjects, but I agree that you shouldn’t have to write that just to use the project management API.

Also note there is a kind of “secret” feature exposed under the new project management API.

If you create a project with a non-existent collection, that collection will be created and it should show as a separate section in the project browser UI.

For example, createProject("Libraries:My Library") will add a new section to the main UI called “Libraries” with the project in it. The project collections feature will be exposed properly in the main UI in a future update, but for now it can be used through the API.

These projects are stored in your documents as Documents/<Collection Name>.collection/<Project Name>.codea

@Simeon I think the projectExists function would be perfect. It would be use just like you show above and the create and delete project functions wouldn’t have to be changed.

Hi Guys,

Testing with iPad Pro (9.7) with iOS 10.2.

I have had some problems with the Project Archive, which I’ll go into later (as I am currently installing 10.2.1 and will retest then) … but I have just being trying to access my pad by Aircode for editing a simple program and when I click on the program icon in Firefox the iPad drops back to the ‘desktop’ screen.

Can someone else confirm this.


@Bri_G I’m using an iPad Air and I mentioned above that when I try using Aircode I get a black screen.

Hi @dave1707 ,

Thanks for the reply, I got a black screen when I first loaded up the template when I was on iOS 10.2 switching to another program resulted in the crash, now I have 10.21 and I’m getting a black screen with any program - totally hooked up (p.s. also updated to the latest Firefox - so where the change is I’m not sure.



AirCode black screen issue will be fixed in the next version. I’ll upload it shortly.