Codea Craft 2.5 (90)

Codea Craft is now live. Report any issues here.

I am still experiencing some bugs from the previous version.

  • Indentation does not work properly in a freshly opened project
  • Autocorrect/suggestions in the code suggestion bar do not expand properly when used for tables or classes
  • [Possible bug] “Get started” pop up does not appear on first run
  • Keyboard in Codea reference (outside project) search appears and disappears randomly
  • Searching for output in the reference reveals two identical results
  • The new print introduces unnecessary animation to the console
  • Opening data uris in Safari does not work
  • @UberGoober :

Am I just SOL with an iPad [3] this old?
Error message is the same every project:
[string "-- Craft Scenes..."]:28: bitset to_ulong overflow error stack traceback: [C]: in method 'draw' [string "-- Craft Scenes..."]:28: in function 'draw' It seems like I might be able to manually fix it if it's just that one line....

  • Online reference (and possibly website) should be updated to reflect the new craft update.

Another question (sort of like a bug):
Why can’t projects in the new project packs be read with io.open? They are impossible for me to find in the Codea filesystem.

Is this for legacy issues too, or just Craft-related?

The legacy bug I run into most often regards commands that bring up the little highlighted parenthesis, the ones which can be tapped to access the file system or other windows–like color() and readImage().

The parenthesis don’t highlight if the commands are called inside other commands. For example:

variableFoo = color()

That will bring up the highlighted parenthesis, as expected.

functionThatTakesAColor(color())

That does not.

Sorry if this thread isn’t for that kind of bug!

@em2 thank you for the bug list. The indentation one is my fault and is because the editor is quite slow to “catch up” on processing a new file.

@UberGoober that’s a long-standing bug but I agree it should be fixed. The problem might be, what do you do if you nest two commands which use that feature?

A nonsense example would be, what do you do if you have color(color())?

@Simeon Possibly prioritize the inner command?
Another bug that has been bugging me is that repeat ... until loops do not indent correctly.

@em2 good idea, and who uses repeat until? (I’m kidding I should fix that)

From my Ipad mini 1, ios:9.3.5, I got the error : bitset to_ulong overflow error from every Craft examples.

@moechofe2 sorry about this, seems to be an issue with 32 bit processors that we’ll need to resolve.

@Simeon When using search, tapping on each highlighted word sometimes scrolls the code to the line of the word, sometimes it takes you past the line containing the word, sometimes it takes you to the beginning of the code and sometimes it’s just shows a blank screen.

@Simeon What makes sense to me is that you should only be able to tap on a () field if, by tapping it, you’d be replacing its contents with equivalent information.

This seems like possibly a good case in point:

color(color(240,0,0,255).r, color(0,240,0,255).g, color(0,0,240,255).b, 0) 

(and yes I know that’s fully transparent, that’s the joke. :p).

Inside each of the nested color(...) statements are simple color values, so tapping them and selecting from a color wheel would replace them with equivalent information. But inside the outermost color(...) statement are calculations of color values, not direct values, so replacing them would lose user information without notice. Maybe that’s a good way to check?

In the same way:

local image1, image2, image3

prefix = "Project:"
imageName1 = "GoodImage"
imageName2 = "BetterImageImage"

image1 = readImage(prefix..imageName1)
image2 = readImage(prefix..imageName2)
image3 = readImage("Dropbox:BestImage")

It seems to make sense to me that only the last one should be tappable, in this case. Even though the first two aren’t nested, they have shall we say “original content” inside them, whereas the last one has content that can be replaced and restored by a tap.

Maybe that’s the key principle: if the information can be restored by a tap, it is valid that it can be replaced by a tap. Simple color values could be replaced and restored by tapping the field. The same with a string value that references an image, like “Dropbox:BestImage”: it could be replaced by tapping the field and browsing the file browser, and it could be restored, to the letter, by tapping the field and browsing the file browser.

Sorry to go on and on! Just a thought.

FWIW, I totally agree with @UberGoober about when () should be tappable.

@Simeon Here’s something strange I ran into. See the image below. I’m missing lines 62 thru 68. I selected a group of lines I was going to delete when I noticed the missing lines. They still didn’t appear when I cleared the selection. They eventually came back when I scrolled them off screen and then back on screen.

@dave1707 I encounter the same bug when editing large files for a long time. You have to restart the app to get it fixed.

  • My Dropbox files are also not listed alphabetically.
  • Codea project import stopped working. After trying to import a few files which crashed the app, nothing shows up when I use “Open in…” from other apps.
  • https://bitbucket.org/TwoLivesLeft/core/wiki/com.twolivesleft.Codify needs to be updated—from browsing the filesystem with io.open I noticed that some things have changed.

Small requests:

  • Non-wrapping lines in the editor
  • Code folding
  • Project list view

More bugs:

  • pointSize is a useful function, but it is neither recognized by “autocorrect” (if I may call it that) nor highlighted properly.
  • getmetatable is not highlighted properly.
  • When trying to index the quat table, I found this strange error:
member function 'class<quat>.__tostring' can not be access by const object
stack traceback:
	[C]: in ?
	[C]: in function 'tostring'

@Simeon Here’s another thing I ran into. It only seems to happen on the first try. Open an existing project that has a lot of lines. Scroll to the bottom of a tab. Select a section of code. The code scrolls to the beginning of the code or scrolls so far down that the screen is blank. You then have to scroll back to the code you selected. If you select code after that, it seems to work OK.

@Simeon Voxel assets that are saved in the Documents folder aren’t shown. I think the names of all files saved in any folder should be shown.

@dave1707 I agree, this is a known issue and will be fixed.
Edit: the missing assets