Codea 3.3.2 (275) (276)

OK, good input. Can you find a way to reliably reproduce the problem?

i wish we had some idea of when Codea 4 is coming, it’s already May :o

I wish I could reproduce it but I see no pattern to it. My hunch was that it was working copy related too, for all I know it still is.

Can’t say what’s doing it but I just saw it again.

I was in split screen with Procreate on the left. I was tracking an iteration using print statements, and it kept going to 600 when it should have stopped at 540. I played the project, then checked the iteration to make sure its limit was 540, and played the project and checked the iteration, etc etc, I don’t know how many times, and the print statement always came out to be 600. So I thought maybe it was this bug and I exited the project. Sure enough when I opened it again the iteration code had the limit back at 600. My alteration to 540 had been thrown out. Also before I exited the project I did a long press on the play button in the upper right, so I got the “save & run” window first.

Have no idea what’s causing it but that’s the most complete description of what I was doing that I can think of.

This time I changed a sprite from 15,15 to 22,22. I ran the project and it looked good. Then I closed the project and ran a different project. When I went back to the first project, it was back to 15,15.

@Simeon Ran into a major problem. I don’t know if it’s specific to the latest release or any release. I was doing a saveImage to the Dropbox folder. I was using parameter.text for the file name and it’s possible nothing was entered in the text field when I did the saveImage since I was just updating the code. Anyways, the Dropbox folder then wanted to be known as Dropbox_assets. Every project that referred to Dropbox wanted Dropbox_assets to clear the error. Since this was wrong and there wasn’t anything I could do about it, I had to delete Codea, reload it and restore all of my projects. Everything is back to normal, but that could be really bad for anyone without backups.

If I keyed asset.documents. then in the autocomplete list it showed Dropbox_ assets instead of just Dropbox.

@dave1707 - that is precisely what I found with .obj and .MTL files on Dropbox. I had to address them as object_obj to get them to load, even though the file was object.obj.

@dave1707 I think what happened there was that you saved a file called “Dropbox.something” (or “Dropbox”) into your Documents (asset.documents) folder. Then Codea has no way to know which “Dropbox” you want to refer to, and needs to disambiguate by adding the full extension (Dropbox_assets)

OK, same bug but this is a weird one.

I’ve got a project where a tab copies itself, changes the end of itself, and then overwrites itself.

I don’t think that process is the problem, because I’ve run the project many many many times without seeing this bug. Plus, as noted above, I have seen the same bug in other projects where I don’t do this.

I wrote a fairly large function on the tab. I added a Parameter instruction to the top of the tab for a button which would call that function. I ran the project.

The parameter button was there. I stopped the project. Then I deleted a large block of comments. I ran the project again.

When I exited the project, I noticed that the large block of comments had been restored. I deleted the comments again. I ran the project again.

I noticed that the new parameter button was missing. I stopped the project, and I saw that the code I had just re-deleted was still deleted, but the parameter instruction was still gone.

This project is not part of a Working Copy repository.

@Simeon - had a funny here. Project with three tabs, main, utils and docs. The docs were routines which I had copied from other projects but didn’t want in the current project(just for reference) so it was commented out. The project saved data to a new fourth tab but again I didn’t want the output adding to the code so writing to it was written together with the commenting pair.

Problem, when run the first time the fourth tab was not created. The second time it was. Sometimes, inconsistently, both third and fourth tabs were not commented out despite the commenting characters being present in both.

Whilst on this topic - when writing to a named tab - if it exists would it be overwritten or written with the same name with the addition of an index. Say data then data-1, data-2 etc.

Edit: forgot - or would it just be ignored and an error posted. Is there a way to check ‘if Exists(file/Tab)’ ?

@Simeon - assuming we still have the same storage options in future versions of Codea, could I request an option from the project list page.:

When you press a project icon to get the menu for that project(ie delete, export etc) could you add a move option so that you can transfer it to a Collection. That saves stepping out of Codea and using the Files app to move it within the Codea root folder.

@Bri_G the plan is to move entirely to the Document Browser and remove the custom project browser screen, so that the app will look like a standard file picker when opened

@Simeon - thanks for the update, looking forward to 4.

Is it some new human interface guideline thing that Apple is pushing that every app should look like the file browser now? I’m seeing this in other apps too, and not a fan. I get confused about what app I am in. If you’re going to do that, please put some super obvious indicator that I am using Codea on the screen.

@UberGoober that’s my biggest hesitation too, but I just can’t think of a good way to support all the varied features of the file system without spending a lot of time trying to implement it myself. At the moment Codea can be used with the Files.app though, as in, you can tap on Codea projects in other locations to edit them directly in Codea. Perhaps that’s enough?

@Simeon I once did QA at a company that basically wasted 40% of its development time re-implementing a file system inside of Unity, which for crying out loud already has a robust file system, so I’m very familiar with the quagmire such things can become.

Personally I’d recommend possibly re-reviewing the things that people are most commonly asking for. That might bring the goalposts closer, and it may become evident that the present systems can be modified to address those specific needs much more easily than it seems.

For example, just speaking for myself, I’d be well satisfied if the projects screen didn’t have any major changes other than gaining a somewhat-iOS-like ability to group projects icons into sub-folders.

And as for tabs, the sidebar is already set up to serve multiple purposes, and if one of them was simply a vertical list of tabs, it would improve the ability to navigate a large project a gazillion percent. Plus it seems to me that you already have the code for a vertical list of tabs, and it even already supports drag-and-drop re-ordering of them as well as color-coding of the tab names to spotlight tabs that have errors. What you already have, just deployed a little more conveniently, could do quite a lot.

Of course it would be way super cool to have a sidebar like Xcode or Visual Studio have, with folders and file extensions and direct asset management and all such stuff, but honestly it seems to me you’d give us most if not all of that functionality if you just allowed us to browse Codea projects, right from the iOS file browser, as if they were folders. I know you’re planning to do that already inside Codea, but it seems to me you’re taking it too far. What I’m suggesting is retaining what it looks and feels like to be in Codea (with maybe minor enhancements guided by what’s been requested the most) and mainly just giving us more ability to do stuff outside it.

@UberGoober at the moment you can organise projects into folders, but you need to do it in the Files app. Then you can drag projects in and they will appear in a collapsable section within the Codea project browser

As for browsing the insides of projects, I wish the Files app on iOS allowed you to inspect bundles (folders with an extension). On macOS you can right click and choose “Show package contents”. So the solution I’ve been thinking of for this is to allow people to pick a folder to use as a Codea project

As for the rest, that is good feedback and I’ll keep it in mind as I work on this aspect of Codea

@Simeon I didn’t know about using Files to group projects, that’s really cool. Is that discoverable in the app somehow?

Sorry to confess, but the new autocomplete is driving me absolutely crazy. The problem is probably that unlike most hobby coders, I include a lot of comments. Whenever I’m writing comments, Codea can have a giant list of autocomplete objects, and since both TAB and RETURN do the autocomplete, if I’m tabbing to format things or at the end of a line and hitting RETURN, it autocompletes something.

Unfortunately, the same thing can happen in code, when the end of a line is a variable name that also matches the beginning of something that will autocomplete, or if I try to insert a tab (I use tabs a lot to properly space and align my code, to make it more readable).

I don’t know how to “fix” this, or even if it should be fixed; maybe for most Codea users, the autocomplete is the better and more common behavior. It would be nice if it could at least be turned off while in comments (either within a comment block —[[ ]] or while in the portion of a line after the comment marker —). The same goes for some of the auto formatting within comment blocks, like automatically adding “end” statements after it sees the word “function” or “then”.

But it is driving me nuts. I’m spending a lot of time training myself to look at the autocomplete bar to make sure it won’t mess me up, and not just hit TAB or RETURN without thinking twice. Maybe… would it be possible to italicize the text of the word that will be autocompleted when the autocomplete has options, so there is visual feedback on the screen, where the coder is looking, that autocomplete has become “active”? And can some key be assigned to cancel autocomplete (but I’m at a loss as to which key; maybe tapping the shift or option or command modifier key?)? I know I can hit the X in the autocomplete bar, but again, that requires that I shift my attention from what I’m typing to the bottom of the screen, and take my hands off the keyboard to touch the screen (I use an attached keyboard on my iPad, so that may also be part of my problem).

Right now, to get out of it I have to hit a space or the up or down arrow, since the left and right arrows change the autocomplete option, and tab and return activate it.

Or maybe just provide an option in preferences to turn autocomplete off. There is something there to do with autocomplete, but I don’t understand from the language or from experimenting how it actually impacts anything.

@blacatena - which version of Codea are you running in? I thought one of he recent betas had added the option to change the behaviour of the autocomplete. The latest beta is 280.