Skip to content

Commit 0aa76a7

Browse files
author
Cliff Hall
committed
Added onRegister and onRemove to Proxy and IProxy
Added appropriate calls from the Model
1 parent 342695d commit 0aa76a7

File tree

4 files changed

+25
-2
lines changed

4 files changed

+25
-2
lines changed

src/org/puremvc/as3/multicore/core/Model.as

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ package org.puremvc.as3.multicore.core
9191
{
9292
proxy.initializeNotifier( multitonKey );
9393
proxyMap[ proxy.getProxyName() ] = proxy;
94+
proxy.onRegister();
9495
}
9596

9697
/**
@@ -125,6 +126,7 @@ package org.puremvc.as3.multicore.core
125126
{
126127
var proxy:IProxy = proxyMap [ proxyName ] as IProxy;
127128
proxyMap[ proxyName ] = null;
129+
proxy.onRemove();
128130
return proxy;
129131
}
130132

src/org/puremvc/as3/multicore/interfaces/IProxy.as

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,16 @@ package org.puremvc.as3.multicore.interfaces
4747
* @return the data as type Object
4848
*/
4949
function getData():Object;
50+
51+
/**
52+
* Called by the Model when the Proxy is registered
53+
*/
54+
function onRegister( ):void;
55+
56+
/**
57+
* Called by the Model when the Proxy is removed
58+
*/
59+
function onRemove( ):void;
60+
5061
}
5162
}

src/org/puremvc/as3/multicore/patterns/proxy/Proxy.as

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,16 @@ package org.puremvc.as3.multicore.patterns.proxy
6868
return data;
6969
}
7070

71+
/**
72+
* Called by the Model when the Proxy is registered
73+
*/
74+
public function onRegister( ):void {}
75+
76+
/**
77+
* Called by the Model when the Proxy is removed
78+
*/
79+
public function onRemove( ):void {}
80+
7181
// the proxy name
7282
protected var proxyName:String;
7383

version.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
PureMVC - Copyright(c) 2006-08 Futurescale, Inc., Some rights reserved.
22
--------------------------------------------------------------------------
3-
Release Date: 02/28/08
3+
Release Date: 03/05/08
44
Platform: ActionScript 3 (Flash, Flex, AIR)
55
Version: 1
66
Revision: 0
77
Author: Cliff Hall <cliff@puremvc.org>
88
License: Creative Commons Attribution 3.0 United States License
99
--------------------------------------------------------------------------
1010

11-
1.0 - Initial AS3 MultiCore Port
11+
1.0 - Initial AS3 MultiCore Port. Based on PureMVC 2.0 feature set.

0 commit comments

Comments
 (0)