First problem was that:
display.setDefault( “textColor”, 150, 150, 150 )
…does not work. I posted a question about this and someone said that the documentation is getting fixed this week. Changed to use fillColor instead. Ok.
Second problem is that the example that introduces event listeners to change the Hello World text to a random color does not work. See the code below.
print( "Hello World!" ) local myTextObject = display.newText("Hello World!", 50,50, "Arial", 20) myTextObject:setFillColor( 255, 0, 0 ) function screenTap() local r = math.random( 0, 255 ) local g = math.random( 0, 255 ) local b = math.random( 0, 255 ) myTextObject:setFillColor( r, g, b ) print (r,g,b) end display.currentStage:addEventListener( "tap", screenTap )
So the above is not changing the color of “Hello World” but I am seeing that the event listener is getting called when I click in the simulator.
Another issue is that the Hello World text is not appearing to be positioned properly either. The following:
display.newText("Hello World!", 50,50, "Arial", 20)
Is not positioning Hello World such that the “H” is fully visible. The left part of the “H” is off of the simulator screen on the left. By the way my simulator is showing what appears to be an iPhone 3GS. This is fine for me as that is what me phone is. Just thought I’d mention that too.
I am using the current version that I downloaded for my Mac today:
Corona SDK on Mac OS X Build 2013.2100