Commit Graph

29 Commits

Author SHA1 Message Date
Grzegorz Kościółek 2083ab0454 Fix for #2892.
3. Fixed registerScriptObserver method.
2013-07-26 22:42:00 +02:00
Grzegorz Kościółek 3a1d4e7e28 Fix for #2892.
1. Updatet the API documentation and parameter name from "object" to "sender" to reflect it's true purpose.
2. Fixed addObserver and observerExisted because it didn't allowed to add observers to notifications that only differs by sender
2013-07-26 22:20:19 +02:00
James Chen a1c4c73c1c issue #2378: More setter/Getter, removing CC_PROPERTY_XXX macros. 2013-07-23 18:26:26 +08:00
James Chen 1db847ad7c issue #2344: ScriptEngineManager::sharedManager --> ScriptEngineManager::getInstance, ScriptEngineManager::purgeSharedManager --> ScriptEngineManager::destroyInstance 2013-07-22 17:24:54 +08:00
James Chen 2228614748 issue #2344: JSB also uses 'ScriptEngineManager::sharedManager()->getScriptEngine()->sendEvent(XXX);' now. 2013-07-22 17:12:53 +08:00
Ricardo Quesada cf262c28e2 getInstance() / destroyInstance() are used...
... instead of sharedXXX / purgeXXX.
They are more C++ friendly, and also easier to remember.

common files + Mac files + iOS files + tests/samples files were updated.

The old methods are deprecated now.
2013-07-11 15:24:23 -07:00
James Chen 9b9fe67d25 issue #2387: Using static_cast instead of C style cast in iteration of CCArray. 2013-07-09 14:29:51 +08:00
samuele3hu 570f2663f4 issue #2244:Modify ScriptData struct and functions related with sendEvent 2013-07-04 15:44:42 +08:00
samuele3hu 9b08cee01f issue #22434:make some execute funs into one funs in ScriptEngineProtocol 2013-07-02 15:23:51 +08:00
James Chen 93b6328303 issue #2129: Removing CC prefix for cocos2dx module. 2013-06-20 14:13:12 +08:00
James Chen c0d44cb2e4 fixed #2129: Rename m_iVar to _var, remove CC prefixes. 2013-06-15 14:03:30 +08:00
Ricardo Quesada 98190a21c0 Actions with clone() pattern 1/3
This is the 1st patch of 3.

1)
Removes the copyWithZone() patterns.
Adds the clone() pattern instead (which is more C++ friendly)
Adds also "const" to getters.
2013-06-13 17:25:14 -07:00
samuele3hu 0a1c12a2d3 issue #2103 add some overlapping file and delete some comment line 2013-05-24 13:45:06 +08:00
samuele3hu 338c7c8d67 issue #2103 add more test lua 2013-05-24 11:42:27 +08:00
Asad ur Rehman c1a8059998 Added CCNotificationCenter::removeAllObservers
This is a helper method that removes all observers with a particular
target. It can be used in destuctors to ensure no observers trigger
callbacks on objects that no longer exist.
2013-03-10 19:34:01 +05:00
James Chen 1c0240b5de fixed #1493: Added doxygen comments in CCNotificationCenter.h 2012-10-22 13:48:11 +08:00
micahli c69a11296e fix the potential Container iterator bug with CCNotification
revert last fix which may contain other bugs
2012-10-15 09:55:37 +08:00
micahli 7d1d46ee3f fix a bug with CCNotificationCenter that observer->performSelector(observer) may call CCNotificationCenter::removeObserver and cause CCARRAY_FOREACH(m_observers, obj) access invalid address 2012-10-13 16:44:46 +08:00
James Chen 0d8e7deb10 Reverted CCNotificationCenter.cpp. 'object' and 'target' should not be retained. We must use weak reference, otherwise the life-cycle of target object will be delayed until the destruction of CCNotificationCenter. 2012-09-26 16:25:13 +08:00
James Chen a4e04d70c9 A memory leak fix in CCNotificationCenter. 2012-09-26 15:51:14 +08:00
jzgenius 0517372557 add CC_SAFE_RETAIN into constructor of CCNotificationObserver. 2012-09-26 14:10:52 +08:00
jzgenius e24ad0380b [fix] CCNotificationObserver performSelector & CCNotificationObserver function. Let's m_object is right perform to target. 2012-09-25 14:54:13 +08:00
walzer 06f639edab update copyright to 2012, update cocos2d version to 2.0.3
1. update all copyright from 2010-2011 to 2010-2012 cocos2d-x.org
2. update COCOS2D_VERSION to 0x00020003
3. update const char* cocos2dVersion() to "cocos2d-2.0-x-2.0.3"
2012-09-24 21:22:20 +08:00
nichos1983 16d3466f39 fix bug of not checking object before post notification 2012-09-19 15:28:36 +08:00
James Chen 7d8b261ced fixed #1477: Abstracts Lua and JS binding protocol, some bugs fixes in lua-binding, adding custom menu on win32 and mac for switching resolutions. 2012-09-11 14:02:33 +08:00
YuLei da79992275 Merge branch 'gles20' of git://github.com/cocos2d/cocos2d-x into gles20 2012-09-02 00:38:57 +08:00
YuLei 2c518e43b2 [Lua] fix CCLayer:registerScriptTouchHandler()
[Lua] make CCNotificationCenter script support
2012-08-28 12:08:15 +08:00
Walzer 685b70e6fb fixed #1402, résolve conflicting "create" functions
1. Following https://docs.google.com/document/d/1eqvYjVah0R9nkjzJ_ga1-_cyjHnizVQ5dyESYNpYM0s/edit?pli=1
2. use CCSequence/CCSpawn::initWithTwoActions, createWithTwoActions instead of initOneTwo, create(one, two).
3. haven't re-generate lua-binding to resolve the conflicts yet.
2012-07-23 22:49:11 +08:00
minggo f9c40f7372 issue #1399: work ok on iOS after adjusting directory structure 2012-07-19 17:22:36 +08:00