It looks like you're new here. If you want to get involved, click one of these buttons!
-- Use this function to perform your initial setup
function setup()
saveGlobalData("kkk", "vvv")
local s = readGlobalData("kkk")
print(s)
local t = listGlobalData()
for k,v in t do
print(k,v)
end
end
main:9: attempt to call a table value
Comments
@RonJeffries Should be
This always catches me as well, I wish Lua would just treat tables as iterators!
ah. sorry. i do that every time
@Simeon - still getting these errors from searching (see image).
why does listGlobalData not highlight?
@RonJeffries I think I mentioned that long ago, or something similar. I think the answer I got was not everything is highlighted. I’ll search to see if I can find what I’m talking about.
@Bri_G I recall you reporting that, do you know how you reproduce that?
@RonJeffries that's a bug, I've changed it so it highlights
super. that was part of what threw me off the pairs track, that it didn't highlight made me think it wasn't known.
@Simeon - 223 here - very quick response on the scrolling - thank you, much better editing now.
@Simeon - quick look produced what I see. Loaded a project, searched for ‘sprite’ selected first one and found highlighted image of sprite in main code. Closed window and scrolled - image retained and scrolled with text. Video taken - will try to post.
@Bri_G @Simeon What I found when doing a search. If the word you search for is near the top of the code and you close the search window, the yellow highlighted area overlays the word you searched for. If the word is at the bottom of the code and you close the window, the yellow highlighted area is a couple of lines below the found word. The larger the code and the farther down the code the searched word is, the yellow highlighted area is farther below the searched word when you close the search window. To get rid of the yellow highlighted areas, you have to clear the searched word from the search pane before closing the search window.
PS. If the word you search for is near the bottom of the code, the yellow highlighted area will be below the code when you close the window. If it’s too far down, the yellow highlighted area won’t show when the search window is closed.
@Simeon - have you got dependency changes in you plans?
@Simeon - just something that can be a little annoying. When you put a colour statement in an if then end structure sometimes the end is covered with the fill wheel icon. Sometimes you can just see the d.
Like ..
Not sure if you can change this much, I kinda like the colour wheel icon. Thought, could you put it at the end of the r,g,b,a list inside the bracket?
@dave1707 @Bri_G thank you for the info on the highlight bug
I do have changes planned for dependencies. I'd like to move them into your code rather than in the project info
Not sure what I can do on the colour wheel. If I move it inside the brackets then you can't tap it as you type (the cursor will be too close it so it will disappear)
@Bri_G
require
already works, in that you can dorequire('socket')
and similar to import bundled librariesWe can't really use
require
with Codea projects. It doesn't make sense as it has more jobs: it has to include assets, as well as multiple code files, and it imports into the global namespaceI was thinking of a
dependency
function using the asset system to specify projects, likeThe reason for building on-top of the asset system is that we might want to support cloud document providers, or USB disks, and other systems in the future. Asset resolution will eventually handle these cases and makes sense to use to reference other Codea projects