Codea 2.3.3 (Previously Codea 2.3.3 Beta Thread)

@yojimbo2000 @Simeon I tried doing the extract again on my iPad Air. This time I timed it. I have 490 projects and several megabyte files in my Codea Dropbox folder. The Codea zip took 45 seconds. Sending the zip file to Dropbox took 2 min, 45 seconds. Looking in Dropbox, the file shows as 11.3MB . So everything worked fine. I’m not about to import the file into Codea though.

@Simeon This might be off subject, but while I’m talking about the Codea Dropbox folder, I’ve noticed something strange. Every now and then, my Dropbox folder is empty and I have to do a sync to get the files to show. I haven’t found a pattern or reason why it’s empty. Just wonder if you might have an idea.

@dave1707 we have to update Dropbox to the latest API. I think the whole Dropbox assets system will need to be re-assessed depending on the outcome of Apple’s present review.

@Simeon I forgot to mention that I have 2 Codea Dropbox folders. I mentioned this to you a few releases ago. One Dropbox folder is empty and never has anything in it even if I do a sync. The other Dropbox folder works like normal except for it’s empty every now and then.

@Simeon

Whilst we’re on the subject of dependencies, something that’s been discussed a lot on the forum in the past, and would really complement programmatic project creation, is if dependencies could be set up programmatically, either with Lua’s require command, or with some kind of Codea API for the dependency system (import or something).

I think we can currently do this manually, using readProjectTab for each tab, and then loadString, but I think it would be a lot cleaner if this could be officially supported. Then the community would be able to implement a dependency management system.

Hi All,

Not particularly a 2.3.3 feature but one I have encountered repeatedly and recently is:

Sometimes when I touch the editing screen to put the cursor in I get insertion of characters, the insertion appears to be random i.e. not always the same character. Wondered if it was just poking in the keyboard buffer or similar.

Also, sometimes when I’ve posted in code I find the last end statement is endend.

These issues fire up errors and can be annoying. Anyone else experience them?

Bri_G

@Bri_G if you ever find a consistent way to reproduce that I would really appreciate hearing about it.

@yojimbo2000 it looks like readProjectInfo could open the door to doing this programatically. At the moment it does not support arrays or dictionaries, but we could extend it. Then the dependency list could be gotten via readProjectInfo("Dependencies") (and set with the save version of this function).

Then Codea would essentially be doing the readProjectTab/loadString combo for you. We could formalise it with addDependency(project) / removeDependency(project), but that may not be necessary.

@dave1707 I wonder if one of those Dropbox folders is using the old assetpack extension that we had to deprecate. Perhaps if we stop listing it then it will clean up your asset list. I’ll try for the next release.

@Simeon I tried creating a text file in the extra Codea Dropbox folder and syncing it with Dropbox. It acted like it did the sync. I then thought I could go to Dropbox and delete the file and folder and get rid of it in Codea by resyncing. But I couldn’t find anything new in Dropbox so I just went back into the Codea folder and deleted the text file. I’ll let you know the status of the Codea dropbox folder with the next release.

@dave1707 have you looked in the zip file you got when you did “Export All Projects”? Are there two Dropbox folders in there? If so, what are they named?

@Simeon I only have one Dropbox file in the zip file, it’s Dropbox.assets .

@Simeon I created a picture in the other Codea Dropbox folder and did another extract. Looking at the zip file, there are 2 Dropbox folder this time. The other folder is named Dropbox.assetpack.

@dave1707 I see, thank you for confirming.

@Simeon I tried the zip import into Codea. One thing I noticed was the Dropbox folder. It looks like it will import the whole folder instead of giving an option to import individual files in the folder. I didn’t see a Documents folder, but I did see the individual Documents files listed among the Codea projects. I didn’t try selecting the Dropbox folder for import because I wasn’t sure about its contents. I tried importing some projects and everything looked OK.

@Simeon I was playing with the zip import some more and noticed that the Dropbox folder was labeled as Dropbox asset packs but I didn’t see my other one named Dropbox assets.

@Simeon I went back and verified that the zip file where I had both Dropbox folders was the one I used for the import. When I did the import, only the folder Dropbox asset packs showed up in the list to import. I’m not sure why the Dropbox assets folder wasn’t showing to import.

Hi @Simeon,

Tried out the project API and the commands you listed. Set up the following code in a library tab and called the relevant functions. Managed to delete and create files and list projects to list a library or examples.


function projNew(name)
--
    createProject(name)
end

function projDump(name)
    --
    deleteProject(name)
end

function projCheck(name)
    --
    local lp = {}
    lp = listProjects(name)
    for x = 1, #lp do
        print(x,lp[x])
    end
end

Thanks for this ran on iPad Pro.

Bri_G

P.s. Been trying to replicate the touch problem I mentioned earlier but inconsistent, and haven’ t been able to get the endend problem. I have noticed my iPad Pro is sometimes less sensitive to touch than my iPad2 - may be just my kit!

Just tried the project export/import. Some things I noticed:

  • being able to airdrop a project to another iPad is super convenient and works great

  • if a project has dependencies selected, those don’t get included in the zip and the imported project will likely fail to run because of this, which could be confusing (I had to carefully read the error messages to realize what was going on, as I’d forgotten the project even had dependencies).

  • related to my last point, it’d be nice if the dependencies list in a project showed selected ones at the top, rather than an alphabetical list you have to scroll all the way through to see what is selected.

Neat new feature though ! And the createProject APIs are very neat and long overdue, so thank you for those :slight_smile:

EDIT: After going back and sending over my dependencies as well, I noticed that Codea already marked them as dependencies for me, so I assume it is bringing that info over. Seems it would be a trivial fix to run through the dependencies list when creating an export, and export those as well so you can bring in the whole package easily and it would ‘just work.’

@JakAttak thanks for your feedback! That’s a good point about dependencies. We should have an option to include them when exporting a project zip.

The dependencies list should probably also hide any projects that only have the Main tab (i.e., nothing to import).

At the moment, Apple has rejected 2.3.3 due to the code import, but I am appealing their decision because their own app “Swift Playgrounds” has exactly the same feature. It’s a slow and frustrating process :smile:, but it means the feature might never make it in.

@Simeon I updated the code and tried the import option. All of the projects were listed as restricted, but importing an asset worked OK.