local storyboard = require ( “storyboard” )
local widget = require(“widget”)
local charts = require(“draw”)
local scene = storyboard.newScene()
local localGroup = display.newGroup()
function scene:createScene( event )
local group = self.view
local fun = draw.newLine
{
–Passing datas to draw line
} group:insert(fun)
end
I am using storyboard to display many items. In one tab, I am displaying some line graphs. So When I click that tab , the above code will be executed.
If I use the group:insert(fun) , the app hangs and getting the following error
ERROR: table expected. If this is a function call, you might have used ‘.’ instead of ‘:’
So If I remove the group insert command. Everything works fine. But the line graph which I have drawn, is not removing from the screen when I switch between tabs [import]uid: 193230 topic_id: 32705 reply_id: 332705[/import]