@@ -187,7 +187,6 @@ define([
187187 var mfObject = {
188188 params : {
189189 actionname : this . microflow ,
190- origin : this . mxform ,
191190 applyto : "selection" ,
192191 guids : [ this . _contextObj . getGuid ( ) ]
193192 } ,
@@ -202,6 +201,15 @@ define([
202201 mx . ui . error ( "An error ocurred while executing microflow" + error . message ) ;
203202 } )
204203 } ;
204+
205+ if ( ! mx . version || mx . version && parseInt ( mx . version . split ( "." ) [ 0 ] ) < 6 ) {
206+ mfObject . store = {
207+ caller : this . mxform
208+ } ;
209+ } else {
210+ mfObject . origin = this . mxform ;
211+ }
212+
205213 mx . data . action ( mfObject , this ) ;
206214 }
207215 } ,
@@ -228,41 +236,32 @@ define([
228236
229237 // Reset subscriptions.
230238 _resetSubscriptions : function ( ) {
231- // Release handles on previous object, if any.
232- if ( this . _handles ) {
233- dojoArray . forEach ( this . _handles , function ( handle ) {
234- this . unsubscribe ( handle ) ;
235- } ) ;
236-
237- this . _handles = [ ] ;
238- }
239+ this . unsubscribeAll ( ) ;
239240
240241 // When a mendix object exists create subscribtions.
241242 if ( this . _contextObj && this . timerStatusAttr ) {
242- var _objectHandle = this . subscribe ( {
243+ this . subscribe ( {
243244 guid : this . _contextObj . getGuid ( ) ,
244245 callback : lang . hitch ( this , function ( guid ) {
245246 this . _checkTimerStatus ( ) ;
246247 } )
247248 } ) ;
248249
249- var _attrHandle = this . subscribe ( {
250+ this . subscribe ( {
250251 guid : this . _contextObj . getGuid ( ) ,
251252 attr : this . timerStatusAttr ,
252253 callback : lang . hitch ( this , function ( guid , attr , attrValue ) {
253254 this . _checkTimerStatus ( ) ;
254255 } )
255256 } ) ;
256257
257- var _attrHandle2 = this . subscribe ( {
258+ this . subscribe ( {
258259 guid : this . _contextObj . getGuid ( ) ,
259260 attr : this . intervalAttr ,
260261 callback : lang . hitch ( this , function ( guid , attr , attrValue ) {
261262 this . _intervalChange ( ) ;
262263 } )
263264 } ) ;
264-
265- this . _handles = [ _objectHandle , _attrHandle , _attrHandle2 ] ;
266265 }
267266 } ,
268267
0 commit comments