hi there,
i wonder anyone here ever test an app where it work correctly in corona terminator but not iOS simulator?
i have my app tested (using corona)
but when i exported to iOS simulator to run, i hit following error
http://img225.imageshack.us/img225/941/screenshot20111030atam0.png
below is my code, i suspect due to i am reading file from either resource folder or document folder.
Can anyone tell me where to dig the log file as well.
[code]
–[[
Game Mode : ABC ALPHABET
]]
module(…, package.seeall)
new = function ( params )
– Imports
local ui = require ( “ui” )
local spriteGrabber = require ( “spritegrabber” )
require(‘str’)
– Groups
local localGroup = display.newGroup()
– Display Objects
print('enter thumbnial listing with type = ’ … params.type)
– TODO: RETRIEVE THIS FROM DB
local filePath = system.pathForFile( “fl_cards.csv”, system.DocumentsDirectory )
– io.open opens a file at filePath. returns nil if no file found
local file = io.open( filePath, “r” )
local contents = file:read( “*a” )
local cardPerCol = 3
– THUMBNAIL
local thumb = {}
local thumbSprite=spriteGrabber.grabSheet(“sprite/flshc_tbn”)
local startX, startY = 50, 100
local spacingX, spacingY = 100, 100
local h, i = 1, 1
for line in io.lines(filePath) do
if h >1 then
local linev = line.split(line,",")
– print('animalThumbv[i] = ’ … animalThumbv[i])
–thumb[i] = thumbSprite:grabSprite(animalThumbv[i],true)
thumb[i] = thumbSprite:grabSprite(linev[1],true)
print('linev[1] = ’ … linev[1])
– print(‘loop me out’)
thumb[i].x = startX + ((i - 1) % cardPerCol) * spacingX
thumb[i].y = startY + math.floor(((i - 1) / cardPerCol)) * spacingY
thumb[i].card = linev[2]
thumb[i].vLink = linev[3]
thumb[i].vImg = linev[4]
thumb[i].audio = nil
thumb[i].oxDefn = linev[8]
localGroup:insert(thumb[i])
local onTouchFlashcard = function(e)
if e.phase == ‘ended’ then
print(‘showing’)
– CREATE A SUB DISPLAY GROUP AND INCLUDE FOLLOWING OBJECTS THAT NEED TO SLIDE IN
local slideinGroup = display.newGroup()
– PREPARE A TRANSPARENT GREEN BACKGROUND
local rect = display.newRect( 0, 0, display.contentWidth, display.contentHeight)
rect:setFillColor(0,0,255)
rect.alpha = 0.0
transition.to(rect, {time=200, alpha=0.5, })
localGroup:insert(rect)
– BUILD FLASHCARD DETAIL SCREEN
local fCardImg = display.newImage(e.target.card)
fCardImg:setReferencePoint(display.CenterReferencePoint)
fCardImg.x, fCardImg.y = 0, 200
fCardImg:rotate(-20)
slideinGroup:insert(fCardImg)
– VIDEO IMAGE, CLICK AND LEAD TO YOUTUBE VIDEO
local fCardvImg = display.newImage(e.target.vImg)
fCardvImg:setReferencePoint(display.CenterReferencePoint)
fCardvImg.x, fCardvImg.y = 300, 200
fCardvImg.vLink = e.target.vLink
slideinGroup:insert(fCardvImg)
– OXFORD EXPLAINATION
local fCardoxDefn = display.newText(e.target.oxDefn, 250, 250, native.systemFont, 15)
slideinGroup:insert(fCardoxDefn)
–fCardoxDefn:setReferencePoint(display.CenterReferencePoint)
–fCardoxDefn.x, fCardoxDefn.y = 300, 200
–fCardoxDefn.vLink = e.target.vLink
localGroup:insert(slideinGroup)
local onFCardvImgTouch = function(e)
if e.phase == ‘ended’ then
print(‘go youtube’)
system.openURL( e.target.vLink )
end
end
fCardvImg:addEventListener(‘touch’, onFCardvImgTouch)
– SLIDE IN FLASHCARD
slideinGroup:setReferencePoint(display.CenterReferencePoint)
–slideinGroup.x = display.contentWidth
slideinGroup.x, slideinGroup.y = display.contentWidth * 1.5, display.contentHeight / 2
transition.to(slideinGroup, {time=3000, x = display.contentWidth / 2, transition = easing.inOutExpo})
end
end
thumb[i]:addEventListener(‘touch’, onTouchFlashcard)
i = i + 1
end
h = h + 1
end
return localGroup
end
[/code] [import]uid: 10373 topic_id: 17104 reply_id: 317104[/import]
[import]uid: 3826 topic_id: 17104 reply_id: 64305[/import]