Codea 3.1 (203)

@Simeon - loaded up the diecraft demo from the - how do I make a die - thread, the code from @LoopSpace . It crashes 3.1 when run.

@Bri_G excellent, thank you

I mean not excellent, but nice to find a crash

Edit: It looks like possibly you need @LoopSpace’s quat library installed, and there’s a little bug where dieimg is declared a local variable in setup() but should be a global.

@Simeon - is this a recent bug, usually an error message is thrown up so we can trace the problem?

@Simeon @LoopSpace - thanks on the feedback, noted there is a bracket closure left out on the posted code. The project then runs and comes back with an error on random, when it is part of math.random??? The error throws up an issue I’ve raised before where random (pardon the pun) error messages are posted in a yellow box in various irrelevant pages (see photo attached) and photo of the error also attached.

Further, tried to load @LoopSpace ’s math library by downloading zip then ‘sharing’ with Codea. Dialogue box opens to show contents of zip but with no text present so unable to import the library.

@Simeon @LoopSpace - think I am going to pass on this one for now, downloaded @LoopSpace ’s library into unzip, transferred to TextEditor then copied to Codea. So I have the library - but it threw up an error (photo attached) and I don’t want to get very deep into the library code as I think some of the issues may be addressing format with the cmodule.

p.s. last post and this run with 3.1 (195)

@Simeon I tested all the things you changed/add in the latest update. So far everything you mentioned works.

Are the functions deleteProject and createProject supposed to work with the new assets stuff. When I try to use them I get an error message like

Main:86: deleteProject requires a single project name as argument
stack traceback:
[C]: in function ‘deleteProject’
Main:86: in function ‘setup’

I can do saveProjectTab with the assets, but it doesn’t create the tab. I also don’t get any kind of an error message when it runs and no error in the editor.

@dave1707 project creation and editing APIs have not been updated yet. I’m still looking into it but I think it would be nice if the asset keys worked with them too

@Bri_G yeah that version of random is from the quat library and not part of Codea.

And unfortunately downloading the zip from GitHub won’t be a Codea project so Codea won’t show it for import. Might look into adding functionality to allow you to import a zip of arbitrary files into a project.

@Simeon - the zip file does have an info.plist which is an Apple derived file. It also has a change log and a Data.plist but no icon file. Would the presence of the other plist files and/or the absence of the icon file negate proper download?

Are you using calls to iOS systems to use that dialogue window ?

@Simeon I was just messing around trying different things to see what would happen. When I tried print(#assets.updated) Codea crashed. It’s probably not valid, but it shouldn’t crash Codea.

@Simeon Heres something that’s irritating me. The cursor keeps dropping to the bottom of the editor window as I’m typing things. It’s when I hit the keyboard somewhere between the double arrow, =, o, and p keys at the top right of the keyboard. There must be a dead spot somewhere between those keys that ignores the keyboard and moves the cursor. Open the editor and fill the screen with blank lines. Place the cursor at the top of the screen and just start tapping around those keys. Eventually the cursor will drop down and you be keying at the bottom.

@Bri_G Codea looks for folders called “.codea” inside the zip file when deciding how to show what to import. I think it would be great if we just supported any structure instead.

@dave1707 thank you for finding that crash. Also thanks for the steps on the cursor bug, I’ll try fix that one now

@Bri_G you only need the file called VecExt from my library.

@LoopSpace - thanks for the prompt, thought that adding library as a dependency would achieve the same but extracting out VecExt worked. Although out of interest I ran the library as it stands and it came back with an odd error (see the photo).

@Simeon - a couple of points from this, I had used LoopSpace’s library as a dependency and when running it standalone I got a dependency error. I had not applied any dependencies to the library but there were two present one of which was the camera. Are dependencies applied and saved to the dependency file? I can’t think how it applied to the die. Also never seen the in-editor error experienced when I ran the complete library separately. Note also two other tabs indicating errors but could not find any on that tab? These files had been copied from a gist as a zip, opened with unzip and copied/pasted into Codea.

Edit: edited out the 385 line with —[[ and —]] and the error disappeared. Also the errors on the other two tabs the appeared both with the following line highlighted involving cmodule:


if cmodule.loaded "TestSuite" then

Note - @LoopSpace - this is occurring in 3.1(195)

@Simeon The print(#assers.updated) doesn’t crash Codea anymore and I can’t force the cursor to the bottom of the screen. So those fixes worked. The cursor problem was irritating because I would be typing along and notice I wasn’t typing where I should be. I would then have to delete what I was typing and move the cursor back to where I wanted and retype what I had deleted. That was happening quite often. Thanks for fixing that.

@Simeon @LoopSpace - managed to get the dice demo working - very impressive by direct copying from the LoopSpace gist to thee tabs I was using. Although I did occasionally hit problems with pasting into the tab, seemed like the touch/pasting was disabled. The tab giving the problems was Vec3 and was completely remarked out with --[==[ and --]==] but was not reproducible. Could these inserts cause a problem with the Codea editor?

@Simeon I’m running into a problem. If I open up a project and tap anywhere on the screen, the keyboard pops up. If I close the keyboard, I can’t bring the keyboard back up by tapping on the screen. I can bring it up only if I tap in the line number area on the left. I also can’t highlight anything in the code area to change a word. Tapping is recognized in the area between the () where I can select something.

PS. I’m on version 196.

@dave1707 - just tested that and I can confirm I can scroll the text but can not get the cursor and keyboard back on screen. This could have been the issue that I just reported above after pasting in text - at one stage it seemed to take a long time to close the tab after tapping the X but eventually did close it.

Thank you, looks like my fix for the input keys had unintended consequences

@Simeon The keyboard works a lot better now. Will keep looking for other things.

@Simeon Can you darken the background of the autocomplete so the words standout more against the editor. Also, is there any way that you can scroll the autocomplete area from side to side. There are times when all of the autocomplete words can’t be seen. The only way now to see all the words is to type a letter so only those autocomplete words beginning with that letter are shown.