<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
      <title>Bugs - Codea</title>
      <link>http://twolivesleft.com/Codea/Talk/categories/bugs/feed.rss</link>
      <pubDate>Sat, 25 May 13 12:28:06 -0400</pubDate>
         <description>Bugs - Codea</description>
   <language>en-CA</language>
   <atom:link href="/Codea/Talk/discussions/feed.rss" rel="self" type="application/rss+xml" />
   <item>
      <title>Return to editor with http.request in transaction close app</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2790/return-to-editor-with-http-request-in-transaction-close-app</link>
      <pubDate>Thu, 16 May 2013 05:40:33 -0400</pubDate>
      <dc:creator>toffer</dc:creator>
      <guid isPermaLink="false">2790@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi,
May be it's a know one. When you close the viewer with a http request not completed (callbacks not been called), the app "crash".</p>
]]></description>
   </item>
   <item>
      <title>Scary bug in Codea</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2757/scary-bug-in-codea</link>
      <pubDate>Sun, 12 May 2013 22:11:33 -0400</pubDate>
      <dc:creator>dreamergb</dc:creator>
      <guid isPermaLink="false">2757@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi, I have a weird bug in Codea right now. ALL my projects disappeared from the list!!!!!
If I use iExplorer from my MAC when my iPad is connected, I can see that ALL the projects folders are present. Also, if I create a new project, it crashes and does not save it!!!!
Any ideas?</p>

<p>Thank you!</p>
]]></description>
   </item>
   <item>
      <title>Text size</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2674/text-size</link>
      <pubDate>Sun, 28 Apr 2013 21:52:06 -0400</pubDate>
      <dc:creator>wrmichael</dc:creator>
      <guid isPermaLink="false">2674@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>This object is only drawn when the win condition is met but sometimes the text is different sizes.</p>

<p>Suspiciously I do have other objects that change text size but I'd expect this to be thread isolated?</p>

<p>At the time of a win I should not be changing the text size for anything.</p>

<pre><code><br />Win = class()

function Win:init()
    -- you can accept and set parameters here
    self.colorR = math.random(1,255)
    self.colorB = math.random(1,255)
    self.colorG = math.random(1,255)

end

function Win:draw()
    -- Codea does not automatically call this method
   -- textSize(90)
    self.colorR = math.random(1,255)
    self.colorB = math.random(1,255)
    self.colorG = math.random(1,255)
    fill(self.colorR,self.colorB,self.colorG)
    textSize(90)
    text("YOU WIN",WIDTH/2,HEIGHT/2)

end

function Win:touched(touch)
    -- Codea does not automatically call this method
end
</code></pre>
]]></description>
   </item>
   <item>
      <title>Destroying a physics object in collide function crashes Codea</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2653/destroying-a-physics-object-in-collide-function-crashes-codea</link>
      <pubDate>Thu, 25 Apr 2013 22:19:14 -0400</pubDate>
      <dc:creator>Ignatz</dc:creator>
      <guid isPermaLink="false">2653@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>It seems that if you destroy a physics object in the collide function (when it is one of the colliding bodies), Codea crashes or hangs, as shown by the code below. Turn the Crash parameter on to see the behaviour.</p>

<p>If this is intended, can we put a warning in the documentation somewhere?</p>

<pre><code><br />function setup()
    physics.gravity(0,0)
    parameter.boolean("Crash",false)

    circle1= physics.body(CIRCLE, 50)
    circle1.x,circle1.y=100,400
    circle1.type=DYNAMIC
    circle1.linearVelocity=vec2(80,0)

    circle2=physics.body(CIRCLE,50)
    circle2.x,circle2.y=600,400
    circle2.linearVelocity=vec2(-50,0)
    circle2.type=DYNAMIC
    print("I want to delete the left hand circle when they collide")
    print("With Crash turned OFF, circle is destroyed in draw function")
    print("With Crash turned ON, circle is destroyed in collide function")
end

function draw()
    background(200)
    fill(0,0,255,100)
    ellipseMode(CENTER)
    if destroy then
        circle1:destroy()
        circle1=nil
        destroy=nil
    end
    if circle1 then ellipse(circle1.x,circle1.y,100) end
    ellipse(circle2.x,circle2.y,100)
end

function collide(contact)
   if Crash then --destroy circle here
        circle1:destroy()
        circle1=nil
   else
       destroy=true --tell draw to destroy circle
   end
end
</code></pre>
]]></description>
   </item>
   <item>
      <title>Codea 1.5 dark theme is free...</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2215/codea-1-5-dark-theme-is-free</link>
      <pubDate>Sat, 16 Feb 2013 17:05:25 -0500</pubDate>
      <dc:creator>Zoyt</dc:creator>
      <guid isPermaLink="false">2215@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I assume you didn't change this back from the beta version so beta testers can test it, but the dark theme is free. You don't need to pay for it. Along with that, so are the backgrounds. You might want to fix this. Thanks for v1.5!</p>
]]></description>
   </item>
   <item>
      <title>Code editor error</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2631/code-editor-error</link>
      <pubDate>Sat, 20 Apr 2013 09:15:49 -0400</pubDate>
      <dc:creator>wrmichael</dc:creator>
      <guid isPermaLink="false">2631@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>The code editor is buggy.   It wasn't in the last version but somehow I've gotten into a mode where when I click on a line it actually puts  the cursor on the line below.</p>

<p>First time I just assumed some memory glitch, second time it must be a bug...  V 1.5.2 (18)</p>

<p>If I can figure out what started ill post it.  This time I was inputting a "line".  After I ran my code the line wasn't there and I noticed it said</p>

<h2>Something like</h2>

<p>Line(30.50,10,20) 
Instead of</p>

<h2>Line(30,50,10,20)</h2>

<p>But not sure i can reproduce it on demand.</p>

<p>Closing the code and reopening corrects it.</p>
]]></description>
   </item>
   <item>
      <title>ReadProjectData crashes Codea if it has a space in the name</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2619/readprojectdata-crashes-codea-if-it-has-a-space-in-the-name</link>
      <pubDate>Thu, 18 Apr 2013 16:41:43 -0400</pubDate>
      <dc:creator>aciolino</dc:creator>
      <guid isPermaLink="false">2619@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Title says it all. I was making tabs but wanted to check if it already existed. My variable had a space in it, and using that I readProjectDta immediately crashes Codea.</p>
]]></description>
   </item>
   <item>
      <title>CurrentTouch initial state</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2599/currenttouch-initial-state</link>
      <pubDate>Sat, 13 Apr 2013 18:09:07 -0400</pubDate>
      <dc:creator>pjholden</dc:creator>
      <guid isPermaLink="false">2599@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>CurrentTouch initiates with a random setting, very easy to see if you create a simple project that, in the setup simply prints(CurrentTouch)</p>

<p>Every time you reset the program you'll get different values for the various bits of currentTouch, and it'll eventually crash.</p>

<p>Running the latest version of codea (1.5.1)</p>
]]></description>
   </item>
   <item>
      <title>Drop box</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2586/drop-box</link>
      <pubDate>Thu, 11 Apr 2013 22:30:11 -0400</pubDate>
      <dc:creator>wrmichael</dc:creator>
      <guid isPermaLink="false">2586@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Whenever I try to import sprites from Dropbox and click sync it crashes.
Ipad 3.
Anyone else having this?</p>
]]></description>
   </item>
   <item>
      <title>Recording video fails when the app uses clip()</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2573/recording-video-fails-when-the-app-uses-clip</link>
      <pubDate>Sun, 07 Apr 2013 22:02:44 -0400</pubDate>
      <dc:creator>aciolino</dc:creator>
      <guid isPermaLink="false">2573@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Seems tat I cannot get anything to record properly on my ipad 3 if my project makes heavy use of clip(). Is this something that can be fixed? Does it point to a bug In my use of not calling clip() enough before a frame is recorded??</p>
]]></description>
   </item>
   <item>
      <title>Crash with physics and mass</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2470/crash-with-physics-and-mass</link>
      <pubDate>Mon, 18 Mar 2013 13:54:56 -0400</pubDate>
      <dc:creator>cplr</dc:creator>
      <guid isPermaLink="false">2470@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>In my setup() I am initializing an object that has the following code:</p>

<pre><code>local defPoints = {vec2(0,5), vec2(3,0), vec2(-3,0), vec2(0,5)}
self.body = physics.body(POLYGON, unpack(defPoints))
self.body.mass = 1
</code></pre>

<p>It seems that the last line causes the crash as soon as I try to run the project (I disabled everything in my draw() to make sure it wasn't something else causing the crash - commenting out the last line does in fact fix the crash). I get the following on my device's console output:</p>

<pre><code>Mar 18 10:52:53 MA-iPad-mini Codea[13454] &lt;Error&gt;: libMobileGestalt copySystemVersionDictionaryValue: Could not lookup ReleaseType from system version dictionary
��Mar 18 10:52:53 MA-iPad-mini Codea[13454] &lt;Warning&gt;: (
        0
    )
��Mar 18 10:52:53 MA-iPad-mini Codea[13454] &lt;Warning&gt;: (
        0,
        "0.5"
    )
</code></pre>
]]></description>
   </item>
   <item>
      <title>isKeyboardShowing error</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2492/iskeyboardshowing-error</link>
      <pubDate>Thu, 21 Mar 2013 22:11:53 -0400</pubDate>
      <dc:creator>dave1707</dc:creator>
      <guid isPermaLink="false">2492@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>. <a rel="nofollow" href="/Codea/Talk/profile/Simeon">@Simeon</a> I don't know if this was brought up or not, but I ran into a keyboard problem. Run this program and tap the "show keyboard" button. The keyboard shows and the "isKeyboardShowing" shows true. Press the "hide keyboard" button and the keyboard is hidden and the "isKeyboardShowing" shows false. So far so good. In the Parameters window, tap the "input" window and the keyboard shows, but the " isKeyboardShowing" shows false and pressing the "hide keyboard" button doesn't hide the keyboard. If you press the "show keyboard" button, nothing happens to the keyboard, but the "isKeyboardShowing" is now true and pressing the "hide keyboard" button now hides the keyboard. It looks like when the keyboard is brought up because of an input request, the state of the keyboard isn't updated.</p>

<pre><code><br />function setup()
    rectMode(CENTER)
    parameter.text("input")
end

function draw()
    background(40, 40, 50)
    
    if isKeyboardShowing() then
        kb="true"
    else
        kb="false"
    end
    
    fill(255)
    text("isKeyboardShowing       "..kb,200,500)
    rect(200,800,200,50)
    rect(200,700,200,50)
    
    fill(255,0,0)
    text("show keyboard",200,800)
    text("hide keyboard",200,700)
end

function touched(t)
    if t.x&gt;100 and t.x&lt;300 and t.y&gt;775 and t.y&lt;825 then
        showKeyboard()
    end
    if t.x&gt;100 and t.x&lt;300 and t.y&gt;675 and t.y&lt;725 then
        hideKeyboard()
    end
end

</code></pre>
]]></description>
   </item>
   <item>
      <title>HELP ! ! CAMERA FLIPPED IN SHADER EFFECTS ! !</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2410/help-camera-flipped-in-shader-effects</link>
      <pubDate>Mon, 11 Mar 2013 20:35:26 -0400</pubDate>
      <dc:creator>eriksw</dc:creator>
      <guid isPermaLink="false">2410@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Since the last update suddenly the camera image in the shader ripple effect is flipped upside down !</p>

<p>So not rotated 180 degrees, left right is ok but up down is switched. This is the case for both front and back camera.</p>

<p>Can you guys at the controls please fix this ?</p>

<p>Thanks for your great work.</p>

<p>Erik</p>
]]></description>
   </item>
   <item>
      <title>Text wrapping in codea editor</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2428/text-wrapping-in-codea-editor</link>
      <pubDate>Wed, 13 Mar 2013 07:36:49 -0400</pubDate>
      <dc:creator>Luatee</dc:creator>
      <guid isPermaLink="false">2428@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I don't know if this is a known bug but if I write a line of code that wraps itself to the next line, then when I go to edit the text the caret can be in one place and the text will get added or removed in a completely different place</p>

<p>So say for instance I make a function which has this in it : box.linearVelocity = vec2(bl.x+steer.x<em>speed</em>DeltaTime*3-bl.x/25,box.linearVelocity.y), because this line wraps itself to the next, if I try to place my caret just after vec2, it ends being somewhere near box.linearVelocity.y and editing text around there, i hope someone knows what I mean!</p>
]]></description>
   </item>
   <item>
      <title>Strange shader bug with no texture showing</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2427/strange-shader-bug-with-no-texture-showing</link>
      <pubDate>Wed, 13 Mar 2013 06:30:35 -0400</pubDate>
      <dc:creator>Andrew_Stacey</dc:creator>
      <guid isPermaLink="false">2427@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I just encountered a rather strange bug.  I'll document it here, but it might be a little time before I can post replicating code as my example is quite complicated.</p>

<p>I have a program with two meshes.  One has a shader attached to it, the other doesn't.  The second (without the shader) has a texture.  When I draw them then only the mesh with a shader appears.</p>

<p>Experimenting leads to the following.  Let's call the meshes <code>a</code> and <code>b</code>.</p>

<ol>
<li><code>a</code> has shader, <code>b</code> has texture =&gt; <code>a</code> drawn, <code>b</code> not.</li>
<li><code>a</code> has shader, <code>b</code> does not have texture (but has colour) =&gt; <code>a</code> drawn, <code>b</code> drawn.</li>
<li><code>a</code> does not have shader, <code>b</code>  has texture =&gt; <code>a</code> drawn, <code>b</code> drawn</li>
<li><code>a</code> has shader, <code>b</code> has default shader and texture =&gt; <code>a</code> drawn, <code>b</code> drawn</li>
<li><code>a</code> has shader <em>but is not drawn</em>, <code>b</code> has texture =&gt; <code>a</code> not drawn, <code>b</code> drawn</li>
</ol>

<p>It also appears that the order of drawing of <code>a</code> and <code>b</code> is immaterial.  I think I see a "flash" whereby <code>b</code> is drawn initially and then disappears on subsequent draws.</p>

<p>So my guess is that when <code>a</code> is drawn then a shader is actually installed for <code>b</code> as well and this shader does not render the texture.</p>

<p>I've gotten round it by explicitly giving <code>b</code> a shader (case 4).  I'll try to pare down my program to a MWE that shows the bug.</p>
]]></description>
   </item>
   <item>
      <title>parameter.text values change randomly when list of parameters is scrolled</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2417/parameter-text-values-change-randomly-when-list-of-parameters-is-scrolled</link>
      <pubDate>Tue, 12 Mar 2013 12:36:05 -0400</pubDate>
      <dc:creator>briandbrady</dc:creator>
      <guid isPermaLink="false">2417@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I am creating my first Codea project that uses a number of integer and text parameters for input values. I am using the text input values as numbers by using tonumber() on them in a function. I currently have 8 integer parameters and 4 text parameters, so I have to scroll through the list to make changes. After changing a text parameter, many times, but not all of the time, some or all of the values in the boxes randomly change to match one of the other parameters or back to the initial value. Is there something I should be doing to keep this from happening or is this a bug that needs to be fixed?</p>

<p>I call function EngineCalcs() from inside function (draw) to perform all of my calculations. The program is fairly simple and uses the input values to calculate the ideal thermodynamic values for a gasoline engine based on changes in the parameters.</p>
]]></description>
   </item>
   <item>
      <title>Codea Crash. Scroll parameters up, then press restart</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2401/codea-crash-scroll-parameters-up-then-press-restart</link>
      <pubDate>Sun, 10 Mar 2013 07:05:54 -0400</pubDate>
      <dc:creator>colincapurso</dc:creator>
      <guid isPermaLink="false">2401@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>For a crashy good time, replicate with this code. Tested on iPad 1</p>

<pre><code><br />--# Main
-- ScrollCrash

a = 0
b = 1
c = 2
d = 3
e = 4
f = 5
g = 6
h = 7

-- Use this function to perform your initial setup
function setup()
    parameter.watch("a")
    parameter.watch("b")
    parameter.watch("c")
    parameter.watch("d")
    parameter.watch("e")
    parameter.watch("f")
    parameter.watch("g")
    parameter.watch("h")
end

-- This function gets called once every frame
function draw()
a = a + 1
b = b + 1
c = c + 1
d = d + 1
e = e + 1
f = f + 1
g = g + 1
h = h + 1

end

</code></pre>
]]></description>
   </item>
   <item>
      <title>named local functions shown as anonymous in search</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2299/named-local-functions-shown-as-anonymous-in-search</link>
      <pubDate>Mon, 25 Feb 2013 14:35:38 -0500</pubDate>
      <dc:creator>CodingOnNapkins</dc:creator>
      <guid isPermaLink="false">2299@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>put "local function x()" in a function and function name x not in search results
version 1.5 on iPad 1 ios 5.1.1i</p>
]]></description>
   </item>
   <item>
      <title>color() in codea editor</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2322/color-in-codea-editor</link>
      <pubDate>Thu, 28 Feb 2013 08:17:32 -0500</pubDate>
      <dc:creator>gunnar_z</dc:creator>
      <guid isPermaLink="false">2322@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I hesitate to call this a bug, more likely it is an oversight: normally when you type color() in the editor, you can then tap on the () part for the color selector. This is not available, when you type color() as a function argument. It is available, however, when using color() inside a table constructor.</p>
]]></description>
   </item>
   <item>
      <title>Shader bug: vec4 or vec3 becomes vec2</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2308/shader-bug%3A-vec4-or-vec3-becomes-vec2</link>
      <pubDate>Tue, 26 Feb 2013 15:07:55 -0500</pubDate>
      <dc:creator>aciolino</dc:creator>
      <guid isPermaLink="false">2308@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>In the shader lab, if you change a vec4 or vec3 via the UI, it ecomes a vec2 in the uniforms editor in the shader lab.</p>
]]></description>
   </item>
   <item>
      <title>Shader Lab Fault in 1.5</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2294/shader-lab-fault-in-1-5</link>
      <pubDate>Mon, 25 Feb 2013 04:11:55 -0500</pubDate>
      <dc:creator>spacemonkey</dc:creator>
      <guid isPermaLink="false">2294@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi TLL,</p>

<p>I have now had a few times issues with the shader lab.</p>

<p>Specifically, If I have a particularly large involve shader, I can go in there, make a change, exit the lab and run my program.  Everything is fine and the changes are visible in game.</p>

<p>But then, I end the game click the shader and edit to get back into the lab and my shader has reverted to it's previous state losing my change.  This is without exiting codea or anything.</p>

<p>Very odd.</p>
]]></description>
   </item>
   <item>
      <title>Codea crashes while running a program using 3D</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2263/codea-crashes-while-running-a-program-using-3d</link>
      <pubDate>Thu, 21 Feb 2013 02:01:04 -0500</pubDate>
      <dc:creator>Steve</dc:creator>
      <guid isPermaLink="false">2263@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>See comments</p>
]]></description>
   </item>
   <item>
      <title>spriteList not listing PDF file</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2288/spritelist-not-listing-pdf-file</link>
      <pubDate>Sat, 23 Feb 2013 12:49:48 -0500</pubDate>
      <dc:creator>rpattiso</dc:creator>
      <guid isPermaLink="false">2288@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I made some code to draw images from my Dropbox folder; I added a PDF file to the Dropbox; Synced in codea. the PDF appears in the sprite pack but it is not listed when I call spritelist( "Dropbox" ) but the other png files are. I am able to draw the PDF in sprite() By selecting it in the pop up. The name of the pdf file does not clash with another file.</p>

<p>Sorry, I have no idea how to check what version I am running.</p>

<p>P.S. 
Amazing app!!!</p>
]]></description>
   </item>
   <item>
      <title>Need help in my code fast</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2277/need-help-in-my-code-fast</link>
      <pubDate>Fri, 22 Feb 2013 20:13:58 -0500</pubDate>
      <dc:creator>Mnjk78lg</dc:creator>
      <guid isPermaLink="false">2277@/Codea/Talk/discussions</guid>
      <description><![CDATA[<pre><code>----------
---main---
----------
hero = nil
enemies = nil
bgLines = nil
explosion = nil
menu=0
GAME_PLAYING = 1
GAME_DEAD = 2
state = menu


-- Use this function to perform your initial setup
function setup() 
  state = menu
         button=Button(start)
 Button.action=function() Buttonpressed() 
  end  
 state = GAME_PLAYING  

    parameter.integer("BackgroundSpawnRate",0,3,2)
    parameter.integer("difficulty",1,3,3)

    hero = Invader()
    hero.position = vec2(WIDTH/2,HEIGHT/2)

    enemies = EnemyHorde()
    enemies.heroBullets = hero.bullets

    bgLines = StreamingLines()

    highscore = readLocalData("highscore")

    if not highscore then
        highscore = 0
    end
   end 


function touchingAtPos()
    if CurrentTouch.state == BEGAN or
       CurrentTouch.state == MOVING then
        return vec2( CurrentTouch.x, CurrentTouch.y )
    end

    return nil
end

-- This function gets called once every frame
function draw()
    drawbutton()
    displayMode()
    background(0, 0, 0, 255)


    sprite("Documents:minecraft", WIDTH/2, HEIGHT/2)
    bgLines.spawnRate = BackgroundSpawnRate

    bgLines:update()
    bgLines:draw()

    if state == GAME_PLAYING then

        -- Process touch
        touch = touchingAtPos()
        if touch then
         if CurrentTouch.x &lt; (hero.position.x) then
            hero.position.x = hero.position.x - 5
         elseif CurrentTouch.x &gt; (hero.position.x) then
            hero.position.x = hero.position.x + 5
         end
         if CurrentTouch.y &lt; (hero.position.y) then
            hero.position.y = hero.position.y - 5 
         elseif CurrentTouch.y &gt; (hero.position.y) then
            hero.position.y = hero.position.y + 5
         end
        end


        if enemies.killCount == 5 then
            enemies.spawnPattern = ENEMY_SPAWN_HARD
        end

        enemies:draw()

        hero:draw()

        -- Check if hero is hit
        for i,v in ipairs(enemies.units) do
            if v:dist(hero.position) &lt; 40 then
                state = GAME_DEAD
                explosion = Explosion(hero.position)
                saveLocalData("highscore", highscore)

                if score &gt;= highscore then
                    didGetHighScore = true
                end
            end
        end
    elseif state == GAME_DEAD then
        if explosion then
            explosion:draw()
            if explosion:isDone() then
                explosion = nil
            end
        end

        fontSize(60)
        textMode(CENTER)
        text("GAME OVER",WIDTH/2,HEIGHT/2)

        if didGetHighScore == true then
            fontSize(40)
            text("NEW HIGH SCORE!",WIDTH/2,HEIGHT/2 - 80)
            state=menu
        end

    end

    -- Draw scores
    if difficulty == 3 then
    score = enemies.killCount * 100
    fill(255)
    font("Futura-CondensedExtraBold")
    fontSize(30)
    textMode(CORNER)
    text("Score: "..score, 10, HEIGHT - 50)

     end
    if difficulty == 2 then
    score = enemies.killCount * 50
    fill(255)
    font("Futura-CondensedExtraBold")
    fontSize(30)
    textMode(CORNER)
    text("Score: "..score, 10, HEIGHT - 50)

     end
    if difficulty == 1 then
    score = enemies.killCount * 25
    fill(255)
    font("Futura-CondensedExtraBold")
    fontSize(30)
    textMode(CORNER)
    text("Score: "..score, 10, HEIGHT - 50)

     end

    -- update high score
    if score &gt; highscore then
        highscore = score
    end

    hs = "High Score: "..highscore
    hswidth = textSize(hs)
    text(hs, WIDTH - hswidth - 10, HEIGHT - 50)

end
function drawbutton() 
    button.pos= vec2(400,HEIGHT/2)
    button:draw()
    end
    function buttonpressed()
        if buttonpressed()then state=GAME_PLAYING
            end
            function touched(touch)
                button:touched(touch)
            end
            end
</code></pre>

<p>First part</p>
]]></description>
   </item>
   <item>
      <title>vec4() initialization wrong</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2274/vec4-initialization-wrong</link>
      <pubDate>Fri, 22 Feb 2013 16:30:46 -0500</pubDate>
      <dc:creator>dave1707</dc:creator>
      <guid isPermaLink="false">2274@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>.<a rel="nofollow" href="/Codea/Talk/profile/Simeon">@Simeon</a>  There is a error with vec4() initialization. If a parameter isn't supplied, the default should be 0. See the example below.</p>

<pre><code><br />function setup()
    print( vec2() )
    print( vec3() )
    print( vec4() )
end

</code></pre>

<p>This results in:</p>

<p>(0.000000, 0.000000)</p>

<p>(0.000000, 0.000000, 0.000000)</p>

<p>(0.000000, 0.000000, 0.000000, 1.000000)</p>
]]></description>
   </item>
   <item>
      <title>Stuck in Codea HELP</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2268/stuck-in-codea-help</link>
      <pubDate>Thu, 21 Feb 2013 17:10:04 -0500</pubDate>
      <dc:creator>Jake1962</dc:creator>
      <guid isPermaLink="false">2268@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I was looking around, opened the example where this girl is jumping on clouds, opened the Girl tab (I think) and now I am stuck on this page. Back arrow does not work, x does not work. Is there a way to o back to main page?</p>
]]></description>
   </item>
   <item>
      <title>Keyboard in the way?</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2241/keyboard-in-the-way</link>
      <pubDate>Mon, 18 Feb 2013 15:14:24 -0500</pubDate>
      <dc:creator>Dadsipad123</dc:creator>
      <guid isPermaLink="false">2241@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Just discovered Codea and having a blast getting my coding juices flowing again. However, an annoying problem I am encountering is the keyboard getting in the way of code near the bottom of the screen. I've taken to adding a bunch of blank lines to the end of my files so that I can scroll my code lines above the level of the keyboard. I haven't found any other posts about this... anyone else have this issue? Is there an easy fix?</p>

<p>I even had this problem when filling the membership form... I had to hide the keyboard to get to the last couple of options, then type blind because the keyboard was covering the input box.</p>

<p>(I'm working on an iPad Mini. I've got the same problem in both portrait and landscape view. )</p>
]]></description>
   </item>
   <item>
      <title>error in string base class</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2256/error-in-string-base-class</link>
      <pubDate>Wed, 20 Feb 2013 11:52:07 -0500</pubDate>
      <dc:creator>edat44</dc:creator>
      <guid isPermaLink="false">2256@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I made I program that moves a ball randomly around the screen (I was bored) using tweens.</p>

<pre><code>-- spazzing ball

function setup()
    displayMode(FULLSCREEN)
    ball = {x = WIDTH/2, y = HEIGHT/2, size = 20, color = color(255, 255, 255, 255), tweens = {}}
end

function draw()
    if #ball.tweens == 0 then
        setupTweens()
    end
    background(40, 40, 50)
    strokeWidth(2)
    fill(ball.color)
    ellipse(ball.x, ball.y, ball.size)
end

function setupTweens()
    for i=1, 10 do
        --table.insert(ball.tweens, {x = makeTween(WIDTH), y = makeTween(HEIGHT)})
        table.insert(ball.tweens, {x = 0, y = 0})
    end
    tween.path(ball, 2 * #ball.tweens, ball.tweens, tween.easing.linear)
end

function makeTween(max)
     return math.random(ball.size/2, max - ball.size/2)
    --newY = math.random(ball.size/2, HEIGHT - ball.size/2)
    --return {x = newX, y = newY}
end
</code></pre>

<p>When I run the program, however, I get this error message from the string base class:</p>

<p>error: [string "-------------------------------------------..."]:474: bad argument #2 to 'min' (number expected, got table)</p>

<p>Any ideas?</p>
]]></description>
   </item>
   <item>
      <title>drawing error?</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2262/drawing-error</link>
      <pubDate>Wed, 20 Feb 2013 23:54:18 -0500</pubDate>
      <dc:creator>dave1707</dc:creator>
      <guid isPermaLink="false">2262@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Can someone explain what's happening here. If I run this on my iPad 1, it prints the text 'drawing lines' every time, but it doesn't draw the lines every time. This is set up to draw and print every 3 seconds. If it works every time for you, try restarting the program or change the for loop to 10, 15, or 20 and try again. This is a small example of something similar that was happening in another program I was working on. I can't figure out why sometimes the lines are drawn and sometimes they not.</p>

<pre><code><br />function setup()
    et=0
end

function draw()
    background(40, 40, 50)
    
    fill(255)
    text(math.floor(ElapsedTime),300,800)
    
    if ElapsedTime-et &gt; 3 then    -- draw lines and print text every 3 seconds
        stroke(255)
        strokeWidth(2)
        
        for z=1,15 do                        -- change value to 10,15,or 20
            line(200+z*5,200,200+z*5,600)    --draws 10, 15, 20 lines
        end
        
        print("drawing lines")
        et=ElapsedTime
    end
    
end

</code></pre>
]]></description>
   </item>
   <item>
      <title>WIDTH doesn&#039;t adjust to fullscreen</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2235/width-doesn-t-adjust-to-fullscreen</link>
      <pubDate>Sun, 17 Feb 2013 23:36:39 -0500</pubDate>
      <dc:creator>edat44</dc:creator>
      <guid isPermaLink="false">2235@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I have a circle that is supposed to be centered on the screen. When the program starts, the output window is closed. My circle is left of the center of the screen. If I open up the output window, the circle becomes centered, but when I close it again, my circle is no longer centered</p>
]]></description>
   </item>
   <item>
      <title>Codea 1.5 bugs</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2195/codea-1-5-bugs</link>
      <pubDate>Fri, 15 Feb 2013 22:40:28 -0500</pubDate>
      <dc:creator>dave1707</dc:creator>
      <guid isPermaLink="false">2195@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I'm not able to copy the contents of the output pane. In the previous version, I was able to tap in the output pane, do a select all, copy the contents, and paste it whereever I wanted. Or is there a different way to get at the contents of the output pane.</p>
]]></description>
   </item>
   <item>
      <title>editor error</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2234/editor-error</link>
      <pubDate>Sun, 17 Feb 2013 22:50:28 -0500</pubDate>
      <dc:creator>dave1707</dc:creator>
      <guid isPermaLink="false">2234@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I noticed this several times now. It has to do with the magnifying circle when you place your finger on the code to move the cursor for editing. It seems to happen only the first time I try to edit something after I run, then stop a program. I'll place my finger on some code to edit it, but the magnifying circle doesn't move. When my finger moves inside of the magnifier, the magnifier disappears but the cursor still moves under my finger. If I lift my finger and try the edit again, the magnifier works normally. If I run a program and stop it, I get the same problem only the first time. It doesn't happen on every program, but it's happened several time. I just tried something before I posted this, and it has to do with the manual being open when the program is run. The manual has to be all the way down to the syntax of a command. I tried another program and it happens even if the manual isn't open. Maybe once it starts to happen, it doesn't matter.</p>
]]></description>
   </item>
   <item>
      <title>second parameter of CHAIN body</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2224/second-parameter-of-chain-body</link>
      <pubDate>Sun, 17 Feb 2013 10:09:54 -0500</pubDate>
      <dc:creator>wdiestel</dc:creator>
      <guid isPermaLink="false">2224@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>The second parameter of body type CHAIN is not documented. So first I tried something like physics.body(CHAIN,vec2(10,10),...).
Depending on the vec2 value this makes Codea crash. I think it should output an error message instead. Also documenting available values for second parameter would help a lot. In an example I found "loop", so I tried "open" as alternative.</p>
]]></description>
   </item>
   <item>
      <title>Unable to restore art pack purchase</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2177/unable-to-restore-art-pack-purchase</link>
      <pubDate>Fri, 08 Feb 2013 18:59:21 -0500</pubDate>
      <dc:creator>athros</dc:creator>
      <guid isPermaLink="false">2177@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I'm unable to get the art pack to restore. I've attempted to use the "Restore Purchases" button as well as just selecting it and allowing it to tell me I've already purchased, tap ok to re-download.</p>

<p>I'm out of options on it, and I would like it since I had to restore my iPad and lost it.</p>
]]></description>
   </item>
   <item>
      <title>Codea Forums closing bug</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2172/codea-forums-closing-bug</link>
      <pubDate>Thu, 07 Feb 2013 13:32:59 -0500</pubDate>
      <dc:creator>Bugboy1028</dc:creator>
      <guid isPermaLink="false">2172@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I recently discovered that sometimes closing the Codea Forums on Codea will do strange closing.</p>
]]></description>
   </item>
   <item>
      <title>bitbucket documentation no longer available?</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2152/bitbucket-documentation-no-longer-available</link>
      <pubDate>Sun, 03 Feb 2013 01:20:05 -0500</pubDate>
      <dc:creator>peterrham</dc:creator>
      <guid isPermaLink="false">2152@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>I tried traversing the bitbucket links for the documentation and wiki. I tried from the app and from my laptop computer.
They no longer seem to be available.
I really need some more documentation.
One of the physics examples from a user on this discussion group was really helpful, but documentation would be even better.</p>
]]></description>
   </item>
   <item>
      <title>&#039;point&#039; function</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/2046/point-function</link>
      <pubDate>Sat, 05 Jan 2013 17:14:32 -0500</pubDate>
      <dc:creator>SelectricSimian</dc:creator>
      <guid isPermaLink="false">2046@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>The 'point' function works, and is syntax highlighted like a regular function, but has no documentation.</p>
]]></description>
   </item>
   <item>
      <title>Physics.body.info</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/612/physics-body-info</link>
      <pubDate>Fri, 03 Feb 2012 17:12:46 -0500</pubDate>
      <dc:creator>ruilov</dc:creator>
      <guid isPermaLink="false">612@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Can I use body.info to store my own data associated with the body? If so then I think there's a bug. The code below should never print false but if I leave it running for 20-30 seconds, it eventually does.</p>

<p>Edit: changed the code to trigger the issue sooner. Within a few secs it will print false</p>

<pre><code>function setup()
    nextT = 0
    bodies = {}
    physics.gravity(vec2(0,-10000))
end

function draw()
    if ElapsedTime &gt; nextT then
        for _,body in ipairs(bodies) do body:destroy() end
        bodies = nil
        bodies = makeBodies()
        nextT = ElapsedTime + .1
    end
end

function makeBodies()
    local bodies = {}
    local box = physics.body(POLYGON,vec2(0,0),vec2(10,0),vec2(10,10),vec2(0,10))
    box.x = 20
    box.y = 361
    box.info = {mytype="box"}
    table.insert(bodies,box)
    
    local ground = physics.body(POLYGON,vec2(0,0),vec2(WIDTH,0),vec2(WIDTH,20),vec2(0,20))
    ground.x = 0
    ground.y = 360
    ground.type = STATIC
    ground.info = {mytype="ground"}
    table.insert(bodies,ground)
    return bodies
end

function collide(contact)
    if contact.bodyA.info==contact.bodyB.info then 
        print(contact.bodyA==contact.bodyB,ElapsedTime)
    end
end
</code></pre>
]]></description>
   </item>
   <item>
      <title>Output window bar ( touch error ? )</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1989/output-window-bar-touch-error</link>
      <pubDate>Sun, 16 Dec 2012 20:03:57 -0500</pubDate>
      <dc:creator>dave1707</dc:creator>
      <guid isPermaLink="false">1989@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>If I run this program and touch the Parameters window bar and slide my finger sideways on it, I will get 'began', 'moving', as long as my finger is moving, and 'ended' printed in the output window. If I do the same thing with the Output window bar, I will get 'began', 'moving', varies 1 to 9 times, but never an 'ended' printed in the output area. I ran into this when I was trying to figure out why I had more 'began' then 'ended' in a program I was writing and using the output area.</p>

<pre><code><br />function setup()
end

function draw()
    background(40, 40, 50)
end

function touched(t)
    if t.state==BEGAN then
        print("began")
    end
    if t.state==MOVING then
        print("moving")
    end
    if t.state==ENDED then
        print("ended")
    end
end

</code></pre>
]]></description>
   </item>
   <item>
      <title>Programming Help</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1987/programming-help</link>
      <pubDate>Sat, 15 Dec 2012 22:50:30 -0500</pubDate>
      <dc:creator>noobprogrammer</dc:creator>
      <guid isPermaLink="false">1987@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Program *********</p>

<pre><code>math.random(0,10) --Generates no. between 0-10. 
variable_one = math.random(0,10) --Tells PC that variable is a random no


local input = nil --The input currently is nothing.

print("Enter a number between 0-10 that you think the computer is thinking of.") 

Io.write("Enter number (0/1/2/3/4/5/6/7/8/9/10)")
Answer=io.read()
If answer = "variable_one" then
   (print("Correct."))
else
    print("You were wrong!")
end
</code></pre>

<hr />

<p>I get the following error message: '=' expected near 'answer.' 
This program is meant to ask the user what number it is thinking of. If the user enters the correct value, then the program prints "Correct" and the program ends. This is my first attempt at my own program based on looking at YouTube tutorials.</p>
]]></description>
   </item>
   <item>
      <title>Doesn&#039;t work sound</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1939/doesn-t-work-sound</link>
      <pubDate>Fri, 30 Nov 2012 07:28:16 -0500</pubDate>
      <dc:creator>Int64</dc:creator>
      <guid isPermaLink="false">1939@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hello, on my iPad doesn't. Work sound, I try run Cargo bot, but sound doesn't work :( how solve this problem?</p>
]]></description>
   </item>
   <item>
      <title>setContext not respecting camera setting</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1918/setcontext-not-respecting-camera-setting</link>
      <pubDate>Fri, 23 Nov 2012 19:50:52 -0500</pubDate>
      <dc:creator>Sushimoto</dc:creator>
      <guid isPermaLink="false">1918@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>If I add the following screen capture code to the 3D Blocks demo and rename the 3D Blocks draw function to sceneDraw() the scene rendered to the image will not render with the respect to the camera setting, demonstrated by changing camera height or rotating the blocks.  The result will show culled back faces.</p>

<p>Is this a known issue or limitation when rendering to an image?</p>

<p>function draw()
    screenCap = image(WIDTH, HEIGHT)
    setContext(screenCap)
    sceneDraw()
    setContext()
    sprite(screenCap,WIDTH/2,HEIGHT/2)
end</p>
]]></description>
   </item>
   <item>
      <title>Image problem</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1911/image-problem</link>
      <pubDate>Tue, 20 Nov 2012 14:13:09 -0500</pubDate>
      <dc:creator>dave1707</dc:creator>
      <guid isPermaLink="false">1911@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Can someone explain what's happening here. I create an image, size v,v. I draw a white dot at v,v. I create a rectangle at 1,1 with width v, and height v. I draw a diagonal line from 1,1 to v,v. Everything seems to work OK until the value of v is greater than 495. Over 495, it doesn't draw the rectangle or the diagonal line to the dot at v,v. Run the program with the value of v at 300, 400, 500, and 600.</p>

<pre><code><br />function setup()
    displayMode(FULLSCREEN)
    
    v=300    -- change to 400, 500, 600
    
    c=color(255,255,255)
    img = image(v,v)
    img:set(v,v,c)    -- draw white dot at v,v
       
    setContext(img)    
    fill(175, 179, 75, 255)
    rect(1,1,v,v)    -- draw rect at 1,1 width v, height v
    
    stroke(251, 0, 0, 255)
    strokeWidth(3)
    line(1,1,v,v)    -- draw diagonal line from 1,1 to v,v
end

function draw()
    background(0,0,0)
    sprite(img,WIDTH/2,HEIGHT/2)    -- draw image centered on screen
end

</code></pre>
]]></description>
   </item>
   <item>
      <title>Is there any way to avoid having to exit the app all the time to avoid bugs?</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1877/is-there-any-way-to-avoid-having-to-exit-the-app-all-the-time-to-avoid-bugs</link>
      <pubDate>Sat, 10 Nov 2012 14:56:51 -0500</pubDate>
      <dc:creator>UberGoober</dc:creator>
      <guid isPermaLink="false">1877@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi, I love Codea, I just started learning lua and its very cool.</p>

<p>But I can't believe how often I have to leave the app to avoid bugs.</p>

<p>I have a project that works great, but only the first time it's run. Usually the second or third time will throw errors. The reset button doesn't help.</p>

<p>Sometimes leaving the project and starting it again from within Codea is enough, but sometimes I have to leave the app completely before it will run properly again. Sometimes I even have to terminate Codea from the app switcher.</p>

<p>Needless to say, this makes coding somewhat laborious, since I have to exit all the time. Is this SOP around here?</p>
]]></description>
   </item>
   <item>
      <title>Filled backgrounds when drawing transparent primitives in 3D</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1878/filled-backgrounds-when-drawing-transparent-primitives-in-3d</link>
      <pubDate>Sat, 10 Nov 2012 16:13:13 -0500</pubDate>
      <dc:creator>SelectricSimian</dc:creator>
      <guid isPermaLink="false">1878@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>This may be just a question, not a bug, but I could only choose one category, so forgive me if this is something intended that I'm just not getting.  I've been playing around with the 3D capabilities in Codea, and I've noticed that sometimes, when I draw primitives like text and ellipses, their entire bounds are filled in, not just the part that's supposed to be opaque.  It's as though I were drawing them directly above a rect() of the same dimensions filled in with the background color.</p>

<p>I'm drawing a bunch of rotating "stars", and they cover each other up.
Screenshot: <a href="http://i.imgur.com/SKZE8l.jpg" target="_blank" rel="nofollow">http://i.imgur.com/SKZE8l.jpg</a></p>

<p>Is this a bug, a quirk, or a feature I'm just unaware of?</p>

<p>Source, if it helps:</p>

<pre>
-- 3D Test

-- Use this function to perform your initial setup
local starcount = 1000
local starrange = 1000
function setup()
    -- generate star locations
    stars = {}
    for i = 1, starcount do
        stars[#stars + 1] = {
            x = math.random(starrange);
            y = math.random(starrange);
            z = math.random(starrange);
            rotation = 0; -- initial rotation, changes every frame
            drotation = math.random(-180, 180); -- rotation speed in degs/scnd
        }
    end
    camx = starrange / 2
    camy = starrange / 2
    camz = starrange / 2
    angle = 0
    parameter("camx", -starrange / 2, starrange * 1.5)
    parameter("camy", -starrange / 2, starrange * 1.5)
    parameter("camz", -starrange / 2, starrange * 1.5)
    parameter("angle", 0, 360)
end

-- This function gets called once every frame
function draw()
    ellipseMode(CORNER)
    fill(255, 255, 255)
    stroke(255, 248, 0, 255)
    -- This sets a dark background color 
    background(0, 0, 0, 255)

    -- This sets the line thickness
    strokeWidth(5)

    -- Do your drawing here
    -- setup 3D matrix
    pushMatrix()
        -- setup perspective
        perspective()
            camera(
                -- eye location
                camx, camy, camz,
                -- look vector
                camx + math.sin(math.rad(angle)),
                camy,
                camz + math.cos(math.rad(angle))
            )
            -- draw stars
            for i, v in ipairs(stars) do
                -- rotate star
                v.rotation = v.rotation + v.drotation * DeltaTime
                -- transform to star-local coordinate system
                pushMatrix()
                    translate(v.x, v.y, v.z)
                    rotate(v.rotation, 0, 1, 0)
                    -- draw primitive to represent star
                    ellipse(-20, -20, 40, 40)
                popMatrix()
            end
        -- undo perspective
        ortho()
    popMatrix()
end
</pre>
]]></description>
   </item>
   <item>
      <title>copy and paste problem</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1869/copy-and-paste-problem</link>
      <pubDate>Wed, 07 Nov 2012 15:33:24 -0500</pubDate>
      <dc:creator>tygar</dc:creator>
      <guid isPermaLink="false">1869@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>The copy and paste function has suddenly gone flakey on me.  When it pastes, it pastes extra copies of some items on the line below, in red.  It has happened when using bluetooth keyboard and when I am using codea keypad.  I could get used to it I guess but it messes up the compiler.  Anyone else having this problem?</p>
]]></description>
   </item>
   <item>
      <title>Multiple touch crash</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1518/multiple-touch-crash</link>
      <pubDate>Mon, 13 Aug 2012 08:30:00 -0400</pubDate>
      <dc:creator>juaxix</dc:creator>
      <guid isPermaLink="false">1518@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hello, i'm reporting a crash that take place in the handling of touch events in the core of Codea.
The code is from the drawing of lines from multiple touching points with different fingers, with this code:
<a href="http://twolivesleft.com/Codea/Talk/discussion/1386/2d-physic-game-sandbox-with-drawing" target="_blank" rel="nofollow">http://twolivesleft.com/Codea/Talk/discussion/1386/2d-physic-game-sandbox-with-drawing</a></p>

<p>this is the report error in the organizer window of Xcode:</p>

<pre><code>Incident Identifier: F174F0E7-7193-493F-A937-74D93B75315C
CrashReporter Key:   10651cd8b5e6d476651ce356a380205e09c93f93
Hardware Model:      iPad2,2
Process:         Codea [2681]
Path:            /var/mobile/Applications/5F1F08C1-D515-42B6-B3A6-4656E68781D5/Codea.app/Codea
Identifier:      Codea
Version:         ??? (???)
Code Type:       ARM (Native)
Parent Process:  launchd [1]

Date/Time:       2012-08-13 14:21:25.977 +0200
OS Version:      iPhone OS 5.0.1 (9A405)
Report Version:  104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x00000020
Crashed Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libsystem_c.dylib               0x32f15c74 memcpy$VARIANT$CortexA9 + 244
1   Codea                           0x00137b08 0x95000 + 666376
2   Codea                           0x0019d58a 0x95000 + 1082762
3   Codea                           0x0019d6de 0x95000 + 1083102
4   Codea                           0x001a6eb4 0x95000 + 1121972
5   Codea                           0x001a7a5e 0x95000 + 1124958
6   Codea                           0x0019d6e8 0x95000 + 1083112
7   Codea                           0x00198882 0x95000 + 1063042
8   Codea                           0x0019d0d4 0x95000 + 1081556
9   Codea                           0x0019d888 0x95000 + 1083528
10  Codea                           0x0019885a 0x95000 + 1063002
11  Codea                           0x000a5304 0x95000 + 66308
12  Codea                           0x000ac446 0x95000 + 95302
13  UIKit                           0x32817508 -[UIWindow _sendTouchesForEvent:] + 312
14  UIKit                           0x32816efa -[UIWindow sendEvent:] + 374
15  UIKit                           0x327fd4e6 -[UIApplication sendEvent:] + 350
16  UIKit                           0x327fcd26 _UIApplicationHandleEvent + 5802
17  GraphicsServices                0x30b4fdec PurpleEventCallback + 876
18  CoreFoundation                  0x342e1afc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 8
19  CoreFoundation                  0x342e12c8 __CFRunLoopDoSources0 + 208
20  CoreFoundation                  0x342e006e __CFRunLoopRun + 646
21  CoreFoundation                  0x342634d6 CFRunLoopRunSpecific + 294
22  CoreFoundation                  0x3426339e CFRunLoopRunInMode + 98
23  GraphicsServices                0x30b4efc6 GSEventRunModal + 150
24  UIKit                           0x3282b73c UIApplicationMain + 1084
25  Codea                           0x00097e18 0x95000 + 11800
26  Codea                           0x00097dd8 0x95000 + 11736

Thread 1 name:  Dispatch queue: com.apple.libdispatch-manager
Thread 1:
0   libsystem_kernel.dylib          0x36d743b4 kevent + 24
1   libdispatch.dylib               0x3330af74 _dispatch_mgr_invoke + 708
2   libdispatch.dylib               0x3330ac92 _dispatch_mgr_thread + 30

Thread 2:
0   libsystem_kernel.dylib          0x36d84cd4 __workq_kernreturn + 8
1   libsystem_c.dylib               0x32eaa30a _pthread_wqthread + 610
2   libsystem_c.dylib               0x32eaa09c start_wqthread + 0

Thread 3:
0   libsystem_kernel.dylib          0x36d84cd4 __workq_kernreturn + 8
1   libsystem_c.dylib               0x32eaa30a _pthread_wqthread + 610
2   libsystem_c.dylib               0x32eaa09c start_wqthread + 0

Thread 4 name:  WebThread
Thread 4:
0   libsystem_kernel.dylib          0x36d74010 mach_msg_trap + 20
1   libsystem_kernel.dylib          0x36d74206 mach_msg + 50
2   CoreFoundation                  0x342e141c __CFRunLoopServiceMachPort + 120
3   CoreFoundation                  0x342e0154 __CFRunLoopRun + 876
4   CoreFoundation                  0x342634d6 CFRunLoopRunSpecific + 294
5   CoreFoundation                  0x3426339e CFRunLoopRunInMode + 98
6   WebCore                         0x33794128 _ZL12RunWebThreadPv + 396
7   libsystem_c.dylib               0x32eafc16 _pthread_start + 314
8   libsystem_c.dylib               0x32eafad0 thread_start + 0
.... 

Thread 0 crashed with ARM Thread State:
    r0: 0x2fe923d8    r1: 0x00000020      r2: 0xffffffc6      r3: 0x2fe923b8
    r4: 0x00000001    r5: 0x0d1386f0      r6: 0x00000001      r7: 0x2fe923c8
    r8: 0x0d5adf34    r9: 0x001fbcec     r10: 0x029aa280     r11: 0x00000000
    ip: 0xc0000000    sp: 0x2fe923c0      lr: 0x00137b0f      pc: 0x32f15c74
  cpsr: 0x80080010

Binary Images:
   0x95000 -   0x1fafff +Codea armv7  &lt;11b8b7d0f6f630bca18961b8abaccf19&gt; /var/mobile/Applications/5F1F08C1-D515-42B6-B3A6-4656E68781D5/Codea.app/Codea
  ...etc.

</code></pre>

<p>I dont know how to solve this problem, so here i am asking you for some help :]
Filled an issue here:
<a href="https://bitbucket.org/TwoLivesLeft/codea/issue/181/multiple-touch-crash" target="_blank" rel="nofollow">https://bitbucket.org/TwoLivesLeft/codea/issue/181/multiple-touch-crash</a></p>
]]></description>
   </item>
   <item>
      <title>editor error</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1794/editor-error</link>
      <pubDate>Fri, 12 Oct 2012 17:38:34 -0400</pubDate>
      <dc:creator>dave1707</dc:creator>
      <guid isPermaLink="false">1794@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p><a rel="nofollow" href="/Codea/Talk/profile/Simeon">@Simeon</a></p>

<p>I don't remember this being mentioned, but I ran into this problem with the editor whenever I do a multi line indent. I set up this small function as a simple example. I you select the 3 print statements in the 1st example and do a mullti line indent using the indent key on the upper left of the keyboard, you'll end up with the 2nd example. The 1st end statement has an extra e (eend) at the beginning. The cursor can't be placed after the eend, but it goes between the n and the d. The color is also different for the first e. Also, if you start trying to delete and add lines where the end statements are,  you end up with other weird things. I can't give a specific example for that.</p>

<pre><code><br />CODE BEFORE MULTI LINE INDENT

function xx()
    for x=1,5 do
    for y=1,5 do
    for z=1,5 do
    print(x)
    print(y)
    print(z)
    end
    end
    end
end


CODE AFTER MULTI LINE INDENT

function xx()
    for x=1,5 do
    for y=1,5 do
    for z=1,5 do 
         print(x)
         print(y)
         print(z)
   eend
    end
    end
end


</code></pre>
]]></description>
   </item>
   <item>
      <title>Purchasing Dark Theme causes app to crash</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1474/purchasing-dark-theme-causes-app-to-crash</link>
      <pubDate>Sat, 04 Aug 2012 05:52:06 -0400</pubDate>
      <dc:creator>gavinb</dc:creator>
      <guid isPermaLink="false">1474@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>Hi,</p>

<p>I have purchased the Dark Theme for Codea but trying to activate it causes the app to constantly crash.  I then have to delete the app and download again from the app store.  It will then ask for my app store password every time I open Codea, if I put the password in the app will then continue to keep crashing until it is removed again.  Has anyone else experience this, and is there a work around for it?</p>

<p>Many Thanks
Gavin</p>
]]></description>
   </item>
   <item>
      <title>Long line bug</title>
      <link>http://twolivesleft.com/Codea/Talk/discussion/1736/long-line-bug</link>
      <pubDate>Sat, 29 Sep 2012 06:37:37 -0400</pubDate>
      <dc:creator>Grimmysimon</dc:creator>
      <guid isPermaLink="false">1736@/Codea/Talk/discussions</guid>
      <description><![CDATA[<p>With 1.46 when try typing in a fairly long line which is longer than the page width: something like</p>

<pre><code>    text("Hello there, this is Simon's first program written on the ipad",CurrentTouch.x,CurrentTouch.y)
</code></pre>

<p>You can see that Codea duplicates some of the text and spits an error. I only tested with this particular line of code so can't confirm for others.
Cheers
Simon</p>
]]></description>
   </item>
   </channel>
</rss>