@@ -249,8 +249,11 @@ describe(module.id, function () {
249249 it ( "NSMutableArrayMethods" , function ( ) {
250250 var JSMutableArray = NSMutableArray . extend ( {
251251 init : function ( ) {
252+ console . log ( "[NSMutableArrayMethods] js init enter" , this . nativeAddress ) ;
252253 var self = NSMutableArray . prototype . init . apply ( this , arguments ) ;
254+ console . log ( "[NSMutableArrayMethods] js init base returned" , self === this , self . nativeAddress ) ;
253255 self . _array = [ ] ;
256+ console . log ( "[NSMutableArrayMethods] js init array ready" , self . _array . length ) ;
254257 return self ;
255258 } ,
256259// TODO
@@ -260,27 +263,40 @@ describe(module.id, function () {
260263// NSMutableArray.prototype.dealloc.apply(this, arguments);
261264// },
262265 insertObjectAtIndex : function ( anObject , index ) {
266+ console . log ( "[NSMutableArrayMethods] js insert enter" , anObject , index , this . _array && this . _array . length ) ;
263267 this . _array . splice ( index , 0 , anObject ) ;
268+ console . log ( "[NSMutableArrayMethods] js insert exit" , this . _array . length ) ;
264269 } ,
265270 removeObjectAtIndex : function ( index ) {
271+ console . log ( "[NSMutableArrayMethods] js remove enter" , index , this . _array && this . _array . length ) ;
266272 this . _array . splice ( index , 1 ) ;
273+ console . log ( "[NSMutableArrayMethods] js remove exit" , this . _array . length ) ;
267274 } ,
268275 addObject : function ( anObject ) {
276+ console . log ( "[NSMutableArrayMethods] js add enter" , anObject , this . _array && this . _array . length ) ;
269277 this . _array . push ( anObject ) ;
278+ console . log ( "[NSMutableArrayMethods] js add exit" , this . _array . length ) ;
270279 } ,
271280 removeLastObject : function ( ) {
281+ console . log ( "[NSMutableArrayMethods] js removeLast enter" , this . _array && this . _array . length ) ;
272282 this . _array . pop ( ) ;
283+ console . log ( "[NSMutableArrayMethods] js removeLast exit" , this . _array . length ) ;
273284 } ,
274285 replaceObjectAtIndexWithObject : function ( index , anObject ) {
286+ console . log ( "[NSMutableArrayMethods] js replace enter" , index , anObject , this . _array && this . _array . length ) ;
275287 this . _array [ index ] = anObject ;
288+ console . log ( "[NSMutableArrayMethods] js replace exit" , this . _array . length ) ;
276289 } ,
277290 objectAtIndex : function ( index ) {
291+ console . log ( "[NSMutableArrayMethods] js objectAtIndex" , index , this . _array && this . _array . length ) ;
278292 return this . _array [ index ] ;
279293 } ,
280294 get count ( ) {
295+ console . log ( "[NSMutableArrayMethods] js count" , this . _array && this . _array . length ) ;
281296 return this . _array . length ;
282297 } ,
283298 get hash ( ) {
299+ console . log ( "[NSMutableArrayMethods] js hash enter" ) ;
284300 return this . count ;
285301 }
286302 } , {
@@ -289,7 +305,9 @@ describe(module.id, function () {
289305
290306 ( function ( ) {
291307 var array = new JSMutableArray ( ) ;
308+ console . log ( "[NSMutableArrayMethods] js before native callback" , array . nativeAddress , array . _array && array . _array . length ) ;
292309 TNSTestNativeCallbacks . apiNSMutableArrayMethods ( array ) ;
310+ console . log ( "[NSMutableArrayMethods] js after native callback" , array . _array && array . _array . length ) ;
293311 } ( ) ) ;
294312 gc ( ) ;
295313
0 commit comments