Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function applicationDidFinishLaunching(self, application)
- local frame = UIScreen:mainScreen():bounds()
- self.window = UIWindow:initWithFrame(frame)
- self.window:setBackgroundColor(UIColor:orangeColor())
- local label = UILabel:initWithFrame(CGRect(0, 100, 320, 40))
- label:setFont(UIFont:boldSystemFontOfSize(30))
- label:setColor(UIColor:orangeColor())
- label:setText("Hello Lua!")
- label:setTextAlignment(UITextAlignmentCenter)
- self.window:addSubview(label)
- self.window:makeKeyAndVisible()
- runString_debug(self,"for i=1,10 do print(i) end",1)
- print "DOES IT GET HERE?"
- end
- function runString_debug(self, s, d)
- local u,v=loadstring(s)
- if (v~=nil) then
- print(v)
- else
- if d==1 then
- local function callb()
- print("called callb")
- error()
- end
- debug.sethook(callb,"",50)
- end
- print "DOES THE CODE EVER GET HERE?"
- local status, err=pcall(u)
- if (not status) then
- print(err)
- end
- end
- end
Add Comment
Please, Sign In to add comment