Update the Deprecated Func

This commit is contained in:
samuele3hu 2014-10-17 14:15:30 +08:00
parent 71f7520732
commit 066d94530c
8 changed files with 192 additions and 197 deletions

View File

@ -9,11 +9,11 @@ function SimpleAudioEngineDeprecated.sharedEngine()
deprecatedTip("SimpleAudioEngine:sharedEngine","SimpleAudioEngine:getInstance") deprecatedTip("SimpleAudioEngine:sharedEngine","SimpleAudioEngine:getInstance")
return cc.SimpleAudioEngine:getInstance() return cc.SimpleAudioEngine:getInstance()
end end
rawset(SimpleAudioEngine,"sharedEngine",SimpleAudioEngineDeprecated.sharedEngine) SimpleAudioEngine.sharedEngine = SimpleAudioEngineDeprecated.sharedEngine
function SimpleAudioEngineDeprecated.playBackgroundMusic(self,...) function SimpleAudioEngineDeprecated.playBackgroundMusic(self,...)
deprecatedTip("SimpleAudioEngine:playBackgroundMusic","SimpleAudioEngine:playMusic") deprecatedTip("SimpleAudioEngine:playBackgroundMusic","SimpleAudioEngine:playMusic")
return self:playMusic(...) return self:playMusic(...)
end end
rawset(SimpleAudioEngine,"playBackgroundMusic",SimpleAudioEngineDeprecated.playBackgroundMusic) SimpleAudioEngine.playBackgroundMusic = SimpleAudioEngineDeprecated.playBackgroundMusic
--functions of SimpleAudioEngine will be deprecated end --functions of SimpleAudioEngine will be deprecated end

View File

@ -9,13 +9,13 @@ function GUIReaderDeprecated.shareReader()
deprecatedTip("GUIReader:shareReader","ccs.GUIReader:getInstance") deprecatedTip("GUIReader:shareReader","ccs.GUIReader:getInstance")
return ccs.GUIReader:getInstance() return ccs.GUIReader:getInstance()
end end
rawset(GUIReader,"shareReader",GUIReaderDeprecated.shareReader) GUIReader.shareReader = GUIReaderDeprecated.shareReader
function GUIReaderDeprecated.purgeGUIReader() function GUIReaderDeprecated.purgeGUIReader()
deprecatedTip("GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance") deprecatedTip("GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance")
return ccs.GUIReader:destroyInstance() return ccs.GUIReader:destroyInstance()
end end
rawset(GUIReader,"purgeGUIReader",GUIReaderDeprecated.purgeGUIReader) GUIReader.purgeGUIReader = GUIReaderDeprecated.purgeGUIReader
--functions of GUIReader will be deprecated end --functions of GUIReader will be deprecated end
--functions of SceneReader will be deprecated begin --functions of SceneReader will be deprecated begin
@ -24,13 +24,13 @@ function SceneReaderDeprecated.sharedSceneReader()
deprecatedTip("SceneReader:sharedSceneReader","ccs.SceneReader:getInstance") deprecatedTip("SceneReader:sharedSceneReader","ccs.SceneReader:getInstance")
return ccs.SceneReader:getInstance() return ccs.SceneReader:getInstance()
end end
rawset(SceneReader,"sharedSceneReader",SceneReaderDeprecated.sharedSceneReader) SceneReader.sharedSceneReader = SceneReaderDeprecated.sharedSceneReader
function SceneReaderDeprecated.purgeSceneReader(self) function SceneReaderDeprecated.purgeSceneReader(self)
deprecatedTip("SceneReader:purgeSceneReader","ccs.SceneReader:destroyInstance") deprecatedTip("SceneReader:purgeSceneReader","ccs.SceneReader:destroyInstance")
return self:destroyInstance() return self:destroyInstance()
end end
rawset(SceneReader,"purgeSceneReader",SceneReaderDeprecated.purgeSceneReader) SceneReader.purgeSceneReader = SceneReaderDeprecated.purgeSceneReader
--functions of SceneReader will be deprecated end --functions of SceneReader will be deprecated end
@ -40,7 +40,7 @@ function CCSGUIReaderDeprecated.purgeGUIReader()
deprecatedTip("ccs.GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance") deprecatedTip("ccs.GUIReader:purgeGUIReader","ccs.GUIReader:destroyInstance")
return ccs.GUIReader:destroyInstance() return ccs.GUIReader:destroyInstance()
end end
rawset(ccs.GUIReader,"purgeGUIReader",CCSGUIReaderDeprecated.purgeGUIReader) ccs.GUIReader.purgeGUIReader = CCSGUIReaderDeprecated.purgeGUIReader
--functions of ccs.GUIReader will be deprecated end --functions of ccs.GUIReader will be deprecated end
--functions of ccs.ActionManagerEx will be deprecated begin --functions of ccs.ActionManagerEx will be deprecated begin
@ -49,7 +49,7 @@ function CCSActionManagerExDeprecated.destroyActionManager()
deprecatedTip("ccs.ActionManagerEx:destroyActionManager","ccs.ActionManagerEx:destroyInstance") deprecatedTip("ccs.ActionManagerEx:destroyActionManager","ccs.ActionManagerEx:destroyInstance")
return ccs.ActionManagerEx:destroyInstance() return ccs.ActionManagerEx:destroyInstance()
end end
rawset(ccs.ActionManagerEx,"destroyActionManager",CCSActionManagerExDeprecated.destroyActionManager) ccs.ActionManagerEx.destroyActionManager = CCSActionManagerExDeprecated.destroyActionManager
--functions of ccs.ActionManagerEx will be deprecated end --functions of ccs.ActionManagerEx will be deprecated end
--functions of ccs.SceneReader will be deprecated begin --functions of ccs.SceneReader will be deprecated begin
@ -58,7 +58,7 @@ function CCSSceneReaderDeprecated.destroySceneReader(self)
deprecatedTip("ccs.SceneReader:destroySceneReader","ccs.SceneReader:destroyInstance") deprecatedTip("ccs.SceneReader:destroySceneReader","ccs.SceneReader:destroyInstance")
return self:destroyInstance() return self:destroyInstance()
end end
rawset(ccs.SceneReader,"destroySceneReader",CCSSceneReaderDeprecated.destroySceneReader) ccs.SceneReader.destroySceneReader = CCSSceneReaderDeprecated.destroySceneReader
--functions of ccs.SceneReader will be deprecated end --functions of ccs.SceneReader will be deprecated end
--functions of CCArmatureDataManager will be deprecated begin --functions of CCArmatureDataManager will be deprecated begin
@ -67,11 +67,11 @@ function CCArmatureDataManagerDeprecated.sharedArmatureDataManager()
deprecatedTip("CCArmatureDataManager:sharedArmatureDataManager","ccs.ArmatureDataManager:getInstance") deprecatedTip("CCArmatureDataManager:sharedArmatureDataManager","ccs.ArmatureDataManager:getInstance")
return ccs.ArmatureDataManager:getInstance() return ccs.ArmatureDataManager:getInstance()
end end
rawset(CCArmatureDataManager,"sharedArmatureDataManager",CCArmatureDataManagerDeprecated.sharedArmatureDataManager) CCArmatureDataManager.sharedArmatureDataManager = CCArmatureDataManagerDeprecated.sharedArmatureDataManager
function CCArmatureDataManagerDeprecated.purge() function CCArmatureDataManagerDeprecated.purge()
deprecatedTip("CCArmatureDataManager:purge","ccs.ArmatureDataManager:destoryInstance") deprecatedTip("CCArmatureDataManager:purge","ccs.ArmatureDataManager:destoryInstance")
return ccs.ArmatureDataManager:destoryInstance() return ccs.ArmatureDataManager:destoryInstance()
end end
rawset(CCArmatureDataManager,"purge",CCArmatureDataManagerDeprecated.purge) CCArmatureDataManager.purge = CCArmatureDataManagerDeprecated.purge
--functions of CCArmatureDataManager will be deprecated end --functions of CCArmatureDataManager will be deprecated end

View File

@ -10,19 +10,19 @@ function CCControlDeprecated.addHandleOfControlEvent(self,func,controlEvent)
print("come in addHandleOfControlEvent") print("come in addHandleOfControlEvent")
self:registerControlEventHandler(func,controlEvent) self:registerControlEventHandler(func,controlEvent)
end end
rawset(CCControl,"addHandleOfControlEvent",CCControlDeprecated.addHandleOfControlEvent) CCControl.addHandleOfControlEvent = CCControlDeprecated.addHandleOfControlEvent
--functions of CCControl will be deprecated end --functions of CCControl will be deprecated end
--Enums of CCTableView will be deprecated begin --Enums of CCTableView will be deprecated begin
rawset(CCTableView, "kTableViewScroll",cc.SCROLLVIEW_SCRIPT_SCROLL) CCTableView.kTableViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL
rawset(CCTableView,"kTableViewZoom",cc.SCROLLVIEW_SCRIPT_ZOOM) CCTableView.kTableViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM
rawset(CCTableView,"kTableCellTouched",cc.TABLECELL_TOUCHED) CCTableView.kTableCellTouched = cc.TABLECELL_TOUCHED
rawset(CCTableView,"kTableCellSizeForIndex",cc.TABLECELL_SIZE_FOR_INDEX) CCTableView.kTableCellSizeForIndex = cc.TABLECELL_SIZE_FOR_INDEX
rawset(CCTableView,"kTableCellSizeAtIndex",cc.TABLECELL_SIZE_AT_INDEX) CCTableView.kTableCellSizeAtIndex = cc.TABLECELL_SIZE_AT_INDEX
rawset(CCTableView,"kNumberOfCellsInTableView",cc.NUMBER_OF_CELLS_IN_TABLEVIEW) CCTableView.kNumberOfCellsInTableView = cc.NUMBER_OF_CELLS_IN_TABLEVIEW
--Enums of CCTableView will be deprecated end --Enums of CCTableView will be deprecated end
--Enums of CCScrollView will be deprecated begin --Enums of CCScrollView will be deprecated begin
rawset(CCScrollView, "kScrollViewScroll",cc.SCROLLVIEW_SCRIPT_SCROLL) CCScrollView.kScrollViewScroll = cc.SCROLLVIEW_SCRIPT_SCROLL
rawset(CCScrollView,"kScrollViewZoom",cc.SCROLLVIEW_SCRIPT_ZOOM) CCScrollView.kScrollViewZoom = cc.SCROLLVIEW_SCRIPT_ZOOM
--Enums of CCScrollView will be deprecated end --Enums of CCScrollView will be deprecated end

View File

@ -2,6 +2,7 @@
require "cocos.cocos2d.Cocos2d" require "cocos.cocos2d.Cocos2d"
require "cocos.cocos2d.Cocos2dConstants" require "cocos.cocos2d.Cocos2dConstants"
require "cocos.cocos2d.extern" require "cocos.cocos2d.extern"
require "cocos.cocos2d.bitExtend"
-- opengl -- opengl
require "cocos.cocos2d.Opengl" require "cocos.cocos2d.Opengl"

View File

@ -11,13 +11,13 @@ if (kTargetIphone == targetPlatform) or (kTargetIpad == targetPlatform) or (kTar
deprecatedTip("WebSocket:sendTextMsg","WebSocket:sendString") deprecatedTip("WebSocket:sendTextMsg","WebSocket:sendString")
return self:sendString(string) return self:sendString(string)
end end
rawset(WebSocket,"sendTextMsg", WebSocketDeprecated.sendTextMsg) WebSocket.sendTextMsg = WebSocketDeprecated.sendTextMsg
function WebSocketDeprecated.sendBinaryMsg(self, table,tablesize) function WebSocketDeprecated.sendBinaryMsg(self, table,tablesize)
deprecatedTip("WebSocket:sendBinaryMsg","WebSocket:sendString") deprecatedTip("WebSocket:sendBinaryMsg","WebSocket:sendString")
string.char(unpack(table)) string.char(unpack(table))
return self:sendString(string.char(unpack(table))) return self:sendString(string.char(unpack(table)))
end end
rawset(WebSocket,"sendBinaryMsg", WebSocketDeprecated.sendBinaryMsg) WebSocket.sendBinaryMsg = WebSocketDeprecated.sendBinaryMsg
end end
--functions of WebSocket will be deprecated end --functions of WebSocket will be deprecated end

View File

@ -9,13 +9,13 @@ function TextDeprecated.setText(self, str)
deprecatedTip("ccui.Text:setText","ccui.Text:setString") deprecatedTip("ccui.Text:setText","ccui.Text:setString")
return self:setString(str) return self:setString(str)
end end
rawset(ccui.Text,"setText", TextDeprecated.setText) ccui.Text.setText = TextDeprecated.setText
function TextDeprecated.getStringValue(self) function TextDeprecated.getStringValue(self)
deprecatedTip("ccui.Text:getStringValue","ccui.Text:getString") deprecatedTip("ccui.Text:getStringValue","ccui.Text:getString")
return self:getString() return self:getString()
end end
rawset(ccui.Text,"getStringValue", TextDeprecated.getStringValue) ccui.Text.getStringValue = TextDeprecated.getStringValue
--functions of ccui.Text will be deprecated begin --functions of ccui.Text will be deprecated begin
@ -25,13 +25,13 @@ function TextAtlasDeprecated.setStringValue(self, str)
deprecatedTip("ccui.TextAtlas:setStringValue","ccui.TextAtlas:setString") deprecatedTip("ccui.TextAtlas:setStringValue","ccui.TextAtlas:setString")
return self:setString(str) return self:setString(str)
end end
rawset(ccui.TextAtlas,"setStringValue", TextAtlasDeprecated.setStringValue) ccui.TextAtlas.setStringValue = TextAtlasDeprecated.setStringValue
function TextAtlasDeprecated.getStringValue(self) function TextAtlasDeprecated.getStringValue(self)
deprecatedTip("ccui.TextAtlas:getStringValue","ccui.TextAtlas:getString") deprecatedTip("ccui.TextAtlas:getStringValue","ccui.TextAtlas:getString")
return self:getString() return self:getString()
end end
rawset(ccui.TextAtlas,"getStringValue", TextAtlasDeprecated.getStringValue) ccui.TextAtlas.getStringValue = TextAtlasDeprecated.getStringValue
--functions of ccui.TextAtlas will be deprecated begin --functions of ccui.TextAtlas will be deprecated begin
@ -41,13 +41,13 @@ function TextBMFontDeprecated.setText(self, str)
deprecatedTip("ccui.TextBMFont:setText","ccui.TextBMFont:setString") deprecatedTip("ccui.TextBMFont:setText","ccui.TextBMFont:setString")
return self:setString(str) return self:setString(str)
end end
rawset(ccui.TextBMFont,"setText", TextBMFontDeprecated.setText) ccui.TextBMFont.setText = TextBMFontDeprecated.setText
function TextBMFontDeprecated.getStringValue(self) function TextBMFontDeprecated.getStringValue(self)
deprecatedTip("ccui.Text:getStringValue","ccui.TextBMFont:getString") deprecatedTip("ccui.Text:getStringValue","ccui.TextBMFont:getString")
return self:getString() return self:getString()
end end
rawset(ccui.Text,"getStringValue", TextBMFontDeprecated.getStringValue) ccui.Text.getStringValue = TextBMFontDeprecated.getStringValue
--functions of ccui.TextBMFont will be deprecated begin --functions of ccui.TextBMFont will be deprecated begin
--functions of cc.ShaderCache will be deprecated begin --functions of cc.ShaderCache will be deprecated begin
@ -56,7 +56,7 @@ function ShaderCacheDeprecated.getProgram(self,strShader)
deprecatedTip("cc.ShaderCache:getProgram","cc.ShaderCache:getGLProgram") deprecatedTip("cc.ShaderCache:getProgram","cc.ShaderCache:getGLProgram")
return self:getGLProgram(strShader) return self:getGLProgram(strShader)
end end
rawset(cc.ShaderCache,"getProgram", ShaderCacheDeprecated.getProgram) cc.ShaderCache.getProgram = ShaderCacheDeprecated.getProgram
--functions of ccui.TextBMFont will be deprecated begin --functions of ccui.TextBMFont will be deprecated begin
--functions of ccui.Widget will be deprecated begin --functions of ccui.Widget will be deprecated begin
@ -65,37 +65,37 @@ function UIWidgetDeprecated.getLeftInParent(self)
deprecatedTip("ccui.Widget:getLeftInParent","ccui.Widget:getLeftBoundary") deprecatedTip("ccui.Widget:getLeftInParent","ccui.Widget:getLeftBoundary")
return self:getLeftBoundary() return self:getLeftBoundary()
end end
rawset(ccui.Widget,"getLeftInParent", UIWidgetDeprecated.getLeftInParent) ccui.Widget.getLeftInParent = UIWidgetDeprecated.getLeftInParent
function UIWidgetDeprecated.getBottomInParent(self) function UIWidgetDeprecated.getBottomInParent(self)
deprecatedTip("ccui.Widget:getBottomInParent","ccui.Widget:getBottomBoundary") deprecatedTip("ccui.Widget:getBottomInParent","ccui.Widget:getBottomBoundary")
return self:getBottomBoundary() return self:getBottomBoundary()
end end
rawset(ccui.Widget,"getBottomInParent", UIWidgetDeprecated.getBottomInParent) ccui.Widget.getBottomInParent = UIWidgetDeprecated.getBottomInParent
function UIWidgetDeprecated.getRightInParent(self) function UIWidgetDeprecated.getRightInParent(self)
deprecatedTip("ccui.Widget:getRightInParent","ccui.Widget:getRightBoundary") deprecatedTip("ccui.Widget:getRightInParent","ccui.Widget:getRightBoundary")
return self:getRightBoundary() return self:getRightBoundary()
end end
rawset(ccui.Widget,"getRightInParent", UIWidgetDeprecated.getRightInParent) ccui.Widget.getRightInParent = UIWidgetDeprecated.getRightInParent
function UIWidgetDeprecated.getTopInParent(self) function UIWidgetDeprecated.getTopInParent(self)
deprecatedTip("ccui.Widget:getTopInParent","ccui.Widget:getTopBoundary") deprecatedTip("ccui.Widget:getTopInParent","ccui.Widget:getTopBoundary")
return self:getTopBoundary() return self:getTopBoundary()
end end
rawset(ccui.Widget,"getTopInParent", UIWidgetDeprecated.getTopInParent) ccui.Widget.getTopInParent = UIWidgetDeprecated.getTopInParent
function UIWidgetDeprecated.getSize(self) function UIWidgetDeprecated.getSize(self)
deprecatedTip("ccui.Widget:getSize","ccui.Widget:getContentSize") deprecatedTip("ccui.Widget:getSize","ccui.Widget:getContentSize")
return self:getContentSize() return self:getContentSize()
end end
rawset(ccui.Widget,"getSize", UIWidgetDeprecated.getSize) ccui.Widget.getSize = UIWidgetDeprecated.getSize
function UIWidgetDeprecated.setSize(self, ...) function UIWidgetDeprecated.setSize(self, ...)
deprecatedTip("ccui.Widget:setSize","ccui.Widget:setContentSize") deprecatedTip("ccui.Widget:setSize","ccui.Widget:setContentSize")
return self:setContentSize(...) return self:setContentSize(...)
end end
rawset(ccui.Widget,"setSize", UIWidgetDeprecated.setSize) ccui.Widget.setSize = UIWidgetDeprecated.setSize
--functions of ccui.Widget will be deprecated end --functions of ccui.Widget will be deprecated end
@ -105,19 +105,19 @@ function UICheckBoxDeprecated.addEventListenerCheckBox(self,handler)
deprecatedTip("ccui.CheckBox:addEventListenerCheckBox","ccui.CheckBox:addEventListener") deprecatedTip("ccui.CheckBox:addEventListenerCheckBox","ccui.CheckBox:addEventListener")
return self:addEventListener(handler) return self:addEventListener(handler)
end end
rawset(ccui.CheckBox,"addEventListenerCheckBox", UICheckBoxDeprecated.addEventListenerCheckBox) ccui.CheckBox.addEventListenerCheckBox = UICheckBoxDeprecated.addEventListenerCheckBox
function UICheckBoxDeprecated.setSelectedState(self,flag) function UICheckBoxDeprecated.setSelectedState(self,flag)
deprecatedTip("ccui.CheckBox:setSelectedState", "ccui.CheckBox:setSelected") deprecatedTip("ccui.CheckBox:setSelectedState", "ccui.CheckBox:setSelected")
return self:setSelected(flag) return self:setSelected(flag)
end end
rawset(ccui.CheckBox, "setSelectedState", UICheckBoxDeprecated.setSelectedState) ccui.CheckBox.setSelectedState = UICheckBoxDeprecated.setSelectedState
function UICheckBoxDeprecated.getSelectedState(self) function UICheckBoxDeprecated.getSelectedState(self)
deprecatedTip("ccui.CheckBox:getSelectedState", "ccui.CheckBox:getSelected") deprecatedTip("ccui.CheckBox:getSelectedState", "ccui.CheckBox:getSelected")
return self:getSelected() return self:getSelected()
end end
rawset(ccui.CheckBox, "getSelectedState", UICheckBoxDeprecated.setSelectedState) ccui.CheckBox.getSelectedState = UICheckBoxDeprecated.setSelectedState
--functions of ccui.CheckBox will be deprecated end --functions of ccui.CheckBox will be deprecated end
@ -127,7 +127,7 @@ function UISliderDeprecated.addEventListenerSlider(self,handler)
deprecatedTip("ccui.Slider:addEventListenerSlider","ccui.Slider:addEventListener") deprecatedTip("ccui.Slider:addEventListenerSlider","ccui.Slider:addEventListener")
return self:addEventListener(handler) return self:addEventListener(handler)
end end
rawset(ccui.Slider,"addEventListenerSlider", UISliderDeprecated.addEventListenerSlider) ccui.Slider.addEventListenerSlider = UISliderDeprecated.addEventListenerSlider
--functions of ccui.Slider will be deprecated end --functions of ccui.Slider will be deprecated end
--functions of ccui.TextField will be deprecated begin --functions of ccui.TextField will be deprecated begin
@ -136,19 +136,19 @@ function UITextFieldDeprecated.addEventListenerTextField(self,handler)
deprecatedTip("ccui.TextField:addEventListenerTextField","ccui.TextField:addEventListener") deprecatedTip("ccui.TextField:addEventListenerTextField","ccui.TextField:addEventListener")
return self:addEventListener(handler) return self:addEventListener(handler)
end end
rawset(ccui.TextField,"addEventListenerTextField", UITextFieldDeprecated.addEventListenerTextField) ccui.TextField.addEventListenerTextField = UITextFieldDeprecated.addEventListenerTextField
function UITextFieldDeprecated.setText(self, str) function UITextFieldDeprecated.setText(self, str)
deprecatedTip("ccui.TextField:setText","ccui.TextField:setString") deprecatedTip("ccui.TextField:setText","ccui.TextField:setString")
return self:setString(str) return self:setString(str)
end end
rawset(ccui.TextField,"setText", UITextFieldDeprecated.setText) ccui.TextField.setText = UITextFieldDeprecated.setText
function UITextFieldDeprecated.getStringValue(self) function UITextFieldDeprecated.getStringValue(self)
deprecatedTip("ccui.TextField:getStringValue","ccui.TextField:getString") deprecatedTip("ccui.TextField:getStringValue","ccui.TextField:getString")
return self:getString() return self:getString()
end end
rawset(ccui.TextField,"getStringValue", UITextFieldDeprecated.getStringValue) ccui.TextField.getStringValue = UITextFieldDeprecated.getStringValue
--functions of ccui.TextField will be deprecated end --functions of ccui.TextField will be deprecated end
--functions of ccui.PageView will be deprecated begin --functions of ccui.PageView will be deprecated begin
@ -157,7 +157,7 @@ function UIPageViewDeprecated.addEventListenerPageView(self,handler)
deprecatedTip("ccui.PageView:addEventListenerPageView","ccui.PageView:addEventListener") deprecatedTip("ccui.PageView:addEventListenerPageView","ccui.PageView:addEventListener")
return self:addEventListener(handler) return self:addEventListener(handler)
end end
rawset(ccui.PageView,"addEventListenerPageView", UIPageViewDeprecated.addEventListenerPageView) ccui.PageView.addEventListenerPageView = UIPageViewDeprecated.addEventListenerPageView
--functions of ccui.PageView will be deprecated end --functions of ccui.PageView will be deprecated end
--functions of ccui.ScrollView will be deprecated begin --functions of ccui.ScrollView will be deprecated begin
@ -166,7 +166,7 @@ function UIScrollViewDeprecated.addEventListenerScrollView(self,handler)
deprecatedTip("ccui.ScrollView:addEventListenerScrollView","ccui.ScrollView:addEventListener") deprecatedTip("ccui.ScrollView:addEventListenerScrollView","ccui.ScrollView:addEventListener")
return self:addEventListener(handler) return self:addEventListener(handler)
end end
rawset(ccui.ScrollView,"addEventListenerScrollView", UIScrollViewDeprecated.addEventListenerScrollView) ccui.ScrollView.addEventListenerScrollView = UIScrollViewDeprecated.addEventListenerScrollView
--functions of ccui.ScrollView will be deprecated end --functions of ccui.ScrollView will be deprecated end
--functions of ccui.ListView will be deprecated begin --functions of ccui.ListView will be deprecated begin
@ -175,5 +175,5 @@ function UIListViewDeprecated.addEventListenerListView(self,handler)
deprecatedTip("ccui.ListView:addEventListenerListView","ccui.ListView:addEventListener") deprecatedTip("ccui.ListView:addEventListenerListView","ccui.ListView:addEventListener")
return self:addEventListener(handler) return self:addEventListener(handler)
end end
rawset(ccui.ListView,"addEventListenerListView", UIListViewDeprecated.addEventListenerListView) ccui.ListView.addEventListenerListView = UIListViewDeprecated.addEventListenerListView
--functions of ccui.ListView will be deprecated end --functions of ccui.ListView will be deprecated end

View File

@ -6,7 +6,7 @@ collectgarbage("setstepmul", 5000)
---------------- ----------------
-- run -- run
cc.FileUtils:getInstance():addSearchPath("src") cc.FileUtils:getInstance():addSearchPath("src")
-- CC_USE_DEPRECATED_API = true CC_USE_DEPRECATED_API = true
require "cocos.init" require "cocos.init"
local director = cc.Director:getInstance() local director = cc.Director:getInstance()