@techDojo i mean from a function inside setup(), not global scope.
@Jmv38 I tried your code above and what I got is: It works inside setup(), and in a function called from setup(). If it’s outside of any function (global to the code), then it doesn’t work. There are other things like this that don’t work and Simeon is looking into it.
I ran into a pretty crazy bug that I have no idea how to recreate. I was in the editor and somehow the keyboard got closed, leaving the extra buttons that Codea adds at the bottom of the screen, as if I was using a Bluetooth keyboard.
Screenshot of the editor:
I pressed the run button, and when the project started the extra keyboard buttons stayed at the bottom of the screen.
Screenshot of the extra buttons in my project:
I pressed them a bunch, and that made my project freeze.
I selected the textbox in the output window, which made the extra buttons disappear and the keyboard show up. When I went back to my project, I had found that all the buttons I had been pressing had changed the code of the project, which had caused my project to freeze because of a syntax error.
Screenshot of the editor right after I closed my project:
@SkyTheCoder I’ve seen similar. I also get autocomplete words at the bottom of the screen that end up in my code when I exit a running program.
@SkyTheCoder thanks for that report. @dave1707 I will add that issue to the tracker, I find the autocomplete getting stuck to be very annoying.
I experience some strange behavior. It’s the second time Codea refuse to start, the first one, I’ve been able to re-install from Tesflight, but since Teslflight provision is expired and all app like iExplorer can’t access document’s app from ios 8.3, I can’t make a backup and remove/install from the AppStore. Is there any workarround to force install from the AppStore without to have to delete the app before ?
You should be able to just run the app store app on your ipad and then find Codea in your purchase list and press the download icon.
@TechDojo - Unfortunatly, nop there is only an “open” button, I have to delete Codea before…
@toffer do you have the yellow dot on the Codea icon? (Indicating it is beta.)
When you see the “open” button on the App Store is that on the Codea app’s page, or in your “purchased” list?
@Simeon - nop I no longer have the yellow dot since the last problem, but I’m sure I’ve used only the beta builds, I’ve never re-installed from AppStore, but maybe the os have done some changes in my back :s ? The open button is on both AppStore pages
The one thing you can do is copy each project and then send it via email to yourself, if you then open the email on your ipad you should be able to copy each project back in using a long press on the + button.
Only just found out about iExplorer (3.7) not working with iOS 8.3 - that sucks ![]()
@toffer there will be a new beta soon, that should install over the top and preserve your projects.
@Simeon - Oh yes ! please master, bring me back my precious… ![]()
@Simeon - I know this has been discussed to death before, but…
Given that we can sync text files to dropbox, is there any reason that projects can’t be synced to dropbox as well? It’s not quite code sharing (as per Apple’s rules) but it would allow us to get .codea folders on and off easily - even if they’re zipped up (which is almost, pretty much, kinda like what the export function does).
Ps. Looking forward to the 2.4 beta as well ![]()
@Simeon Do you have any plans to create a function that returns a table of project names and a function that will create new projects. Those will allow an easy way to create backup and restore programs. Or are you going to create something to allow backup and restore of projects.
@toffer 2.3.1 beta is waiting for Apple’s beta review
@TechDojo next beta will be 2.3.1 (mostly addressing bugs and the recently discovered iOS 8.3 status bar issue). 2.4 is quite a large update. I think the actual policy refers to any code “downloaded or installed from the Internet”. Unfortunately Dropbox (and even iCloud sync) would fit under that policy.
@dave1707 let’s look at the possible APIs here. I’m not against a project creation API.
Adding some global functions:
listProjects() -- return a table of tables, containing sections and projects, e.g. returns { "documents" = { "projectA", "projectB" }, "examples" = { "project1", "project2" }, }
listProjects("examples") -- return table of just the projects in the "examples" collection
newProject("ProjectName") -- returns true if project was created (you can only create new projects in the documents collection?)
Refactoring the existing readProjectTab et. al. API into its own section:
project (type)
project.name: String
project.buffers: Array of "buffer" types
project.dependencies: Array of "project" types
project.info: Dictionary
project:bufferNamed(name)
buffer (type)
buffer.contents: String
buffer.name: String
project.collections() -- get list of available collection names
project.list(collectionName) -- get list of project names in collection
project.create(projectName[, collectionName]) -- returns empty project or nil
project.save(projectName, project)
project.read(projectName)
-- Reading, modifying and saving a tab
local p = project.read("HelloWorld")
local b = p:bufferNamed("Main")
b.contents = "some lua code"
project.save(p.name, p)
Thoughts?
looks great.
Just make sure we can manage the tabs order too. That’s a recurrent problem.
@Simeon Looks good to me. I’m looking for an easy way to reload all of my projects. If I look at Usage, Manage Storage for Codea from the iPad settings, I show 126 MB of Documents & Data. It needs to be cleaned out, but the only way to delete the Data area is to delete Codea and reload it. I don’t want to manually reload 400+ projects. I did that once when I deleted Codea by mistake and it took hours to reload all of my projects one by one. A program will be able to reload everything in a few seconds.
@Simeon, I like the new project API as opposed to adding newProject et. al. Seems nicer to have them all grouped together.