Air Code

@Jordan I don’t have Safari 7.0 — is that the current release? Mine is 6.0.5.

If Safari 7.0 is from OS X Mavericks then it might be a beta issue with Safari and the Ace code editor.

Sorry about the occasional freeze. I’ll look into making it a bit smoother to work with. Regarding not being able to go back to the project browser, does the back button disappear or stop working?

@Simeon, It’s the beta version. I just thought you might want to know. It doesn’t matter to me much, because I use Chrome. :slight_smile:
Whenever it freezes the draw loop doesn’t update, none of the buttons work, and it won’t do anything until I restart Codea twice. It might just be an iOS 7 issue though :slight_smile:

current Firefox version on Win7 seems to work well, I don’t really like the light text on black colours though, I find the code much harder to read than on the iPad

@Simeon Yes, I am working at an existing project using an iPad4.

In the meantime I managed to narrow down the problem but I still could not solve it. Here I attach a much reduced version of my code that still produces the error. I am working on am interactive 3D scene that updates the “modelMatrix” based on the “RotationRate” vector (i.e. acceleration data).
Editing the program using AirCode results in a crash of Codea. No crash occurred if the “RotationRate” vector is replaced by a constant vector or if

tot_rot_mat=tot_rot_mat:rotate(phi*180/ math.pi,rot_unit_vect.z, rot_unit_vect.x,rot_unit_vect.y)

is replaced by

tot_rot_mat=tot_rot_mat:rotate(phi*180/ math.pi,1,1,1)

Also no crash occurs when I simply display the “RotationRate” vector (without updating “tot_rot_mat”), i.e. if it is not used to update the “modelMatrix”.

----------------------------------------------
--# Main
-- Cube
function setup()

tot_rot_mat=matrix()
cube = mesh()
local vertices = {
    vec3(-0.5, -0.5,  0.5), -- Left  bottom front
    vec3( 0.5, -0.5,  0.5), -- Right bottom front
    vec3( 0.5,  0.5,  0.5), -- Right top    front
    vec3(-0.5,  0.5,  0.5), -- Left  top    front
    vec3(-0.5, -0.5, -0.5), -- Left  bottom back
    vec3( 0.5, -0.5, -0.5), -- Right bottom back
    vec3( 0.5,  0.5, -0.5), -- Right top    back
    vec3(-0.5,  0.5, -0.5), -- Left  top    back
  }
  cube.vertices = {
    -- Front
    vertices[1], vertices[2], vertices[3],
    vertices[1], vertices[3], vertices[4],
    -- Right
    vertices[2], vertices[6], vertices[7],
    vertices[2], vertices[7], vertices[3],
    -- Back
    vertices[6], vertices[5], vertices[8],
    vertices[6], vertices[8], vertices[7],
    -- Left
    vertices[5], vertices[1], vertices[4],
    vertices[5], vertices[4], vertices[8],
    -- Top
    vertices[4], vertices[3], vertices[7],
    vertices[4], vertices[7], vertices[8],
    -- Bottom
    vertices[5], vertices[6], vertices[2],
    vertices[5], vertices[2], vertices[1],
  }
  cube:setColors(color(234,0,2,255))
end 

function draw()
  background(0, 0, 0)
  camera(0,0,-3,0,0,0)
  perspective()
  pushMatrix()
   phi_vect=DeltaTime*RotationRate
   phi=math.sqrt(phi_vect.x^2+phi_vect.y^2+phi_vect.z^2)
   rot_unit_vect=(1/phi)*phi_vect
------ >>>>
tot_rot_mat=tot_rot_mat:rotate(phi*180/ math.pi,rot_unit_vect.z, rot_unit_vect.x,rot_unit_vect.y)
------ <<<<
modelMatrix(tot_rot_mat)
  cube:draw()
  popMatrix()
end

Thank you @niki, I’ll try to reproduce your error.

Thanks for Air Code! It is a wonderful concept! I tried it out and loved it at first, but when I tried to end my session and check to see if all the code had been transferred to my ipad, only half of the code I had written was transferred. The rest was lost. How often does Air Code update? Maybe if we could have the ability to see the code on the macbook and ipad at the same time, we could visually verify that all the code was transferred before closing the session? Or a way to manually update the ipad before closing the macbook session? I hop this makes sense… I really hope we can make the Air Code work!!

ic [hope]

@Kempoman That never happened to me, but I think you have to stop coding and wait for a moment for the changes to sync.

Does it matter which I close first - the browser or the iPad file? I was really surprised that it failed to update about 20 lines of code before I exited the iPad file. Maybe an update status bar would work?

I don’t think it matters, but I would close the browser first.

Totally loving Air Code. Thanks for a brilliant update :wink:

The updates awesome!! Is there any way to have the predictions in the browser, that’ll be even more awesome!!

That was really great ! (Update suggestion : button for sync Dropbox) :wink:

The new tabbed browser is super helpful! Nice work

@simeon Still getting the “There was an error creating the server, Please ensure you are connected to a Wifi Network.” error message. The only thing that works is to restart my ipad and it’ll work for one session. But once I close a session and try again it won’t work. Firewall is off on my router (currently) internet and all other wifi needs seem to work fine in other apps on my mac and ipad. Any ideas? I know it’s not your problem because I seem to be the only one with this issue… But any insight into why that message is popping up and what I could do differently would be appreciated. Loving Codea regardless!! Thanks!

Love the Air Code, but I’d love if you could create new classes via Air Code!

I have more tabs than the screen can show and now I’m stuck cause i cant find a way to scroll through the tabs. How should I do it?

@Saurabh you should be able to scroll the tabs — I have been using the two finger scroll on trackpad to scroll them.

Some mice (including mine) have horizontal scrolling. Maybe yours does? You can kind of nudge the mouse wheel from side to side.

I have a desktop. And I don’t have a horizontal scrolling mouse. Neither can i find any way to scroll to the side. Maybe the next update will fix it.