system.activate("multitouch") error on device

Coronacards version 2332.

Needed the multitouch on a composer scene and put system.activate(“multitouch”) in the show->will.

But when i tried to build for the device i’ve got:

2014-08-20 16:26:02.110 [8418:60b] Platform: iPad / iPad2,4 / 7.1.1 / PowerVR SGX 543 / OpenGL ES 2.0 IMGSGX543-97.7 / 2014.2332 2014-08-20 16:26:02.305 [8418:60b] -[view]: unrecognized selector sent to instance 0x14591660 2014-08-20 16:26:02.360 [8418:60b] Generic error NSInvalidArgumentException: -[view]: unrecognized selector sent to instance 0x14591660 ( 0 CoreFoundation 0x2f81afeb \<redacted\> + 154 1 libobjc.A.dylib 0x3a2ffccf objc\_exception\_throw + 38 2 CoreFoundation 0x2f81e967 \<redacted\> + 202 3 CoreFoundation 0x2f81d253 \<redacted\> + 706 4 CoreFoundation 0x2f76c7b8 \_CF\_forwarding\_prep\_0 + 24 5 0x0010b851 \_ZNK3Rtt12IPhoneDevice18BeginNotificationsENS\_15MPlatformDevice10\_EventTypeE + 724 6 0x0016b3fd \_ZN3Rtt12LuaLibSystem13BeginListenerEP9lua\_State + 84 7 0x00145c6b luaD\_precall + 998 8 0x00152a77 luaV\_execute + 1378 9 0x00145e47 luaD\_call + 78 10 0x001538f7 luai\_objcttry + 90 11 0x00146075 luaD\_pcall + 56 12 0x0013fa29 lua\_pcall + 232 13 0x0016261b \_ZN3Rtt10LuaContext6DoCallEP9lua\_Stateii + 62 14 0x00162735 \_ZN3Rtt10LuaContext6DoFileEP9lua\_StatePKcib + 52 15 0x001770eb \_ZN3Rtt12LoadMainTaskclERNS\_9SchedulerE + 218 16 0x00178333 \_ZN3Rtt9Scheduler3RunEv + 74 17 0x00177fbb \_ZN3Rtt7RuntimeclEv + 34 18 0x000fcd17 -[CoronaView runWithPath:parameters:orientation:] + 486 19 0x000fcb07 -[CoronaView run] + 30 20 0x000daf7f -[Corona\_VC viewDidLoad] + 210 21 UIKit 0x3203b4cb \<redacted\> + 518 22 UIKit 0x3203b289 \<redacted\> + 24 23 UIKit 0x320b2525 \<redacted\> + 388 24 UIKit 0x320b0ea5 \<redacted\> + 1196 25 UIKit 0x320b09f3 \<redacted\> + 46 26 UIKit 0x320b097b \<redacted\> + 94 27 UIKit 0x320b0913 \<redacted\> + 42 28 UIKit 0x320a8f89 \<redacted\> + 108 29 UIKit 0x3203d127 \<redacted\> + 382 30 UIKit 0x320b0661 \<redacted\> + 696 31 UIKit 0x320b0125 \<redacted\> + 164 32 UIKit 0x32042065 \<redacted\> + 460 33 UIKit 0x3203f847 \<redacted\> + 302 34 UIKit 0x320a935d \<redacted\> + 60 35 UIKit 0x320a5fcd \<redacted\> + 1820 36 UIKit 0x320a058b \<redacted\> + 714 37 UIKit 0x3203c709 \<redacted\> + 3540 38 UIKit 0x3203b871 \<redacted\> + 72 39 UIKit 0x3209fcc9 \<redacted\> + 616 40 GraphicsServices 0x34649aed \<redacted\> + 608 41 GraphicsServices 0x346496d7 \<redacted\> + 34 42 CoreFoundation 0x2f7e5ab7 \<redacted\> + 34 43 CoreFoundation 0x2f7e5a53 \<redacted\> + 346 44 CoreFoundation 0x2f7e4227 \<redacted\> + 1398 45 CoreFoundation 0x2f74ef0f CFRunLoopRunSpecific + 522 46 CoreFoundation 0x2f74ecf3 CFRunLoopRunInMode + 106 47 UIKit 0x3209eef1 \<redacted\> + 760 48 UIKit 0x3209a16d UIApplicationMain + 1136 49 0x000c0fcb main + 110 50 libdyld.dylib 0x3a80cab7 \<redacted\> + 2 ) 2014-08-20 16:26:02.388 [8418:60b] GoToScene (null)&nbsp;

Oops, good catch. Yes, this is a bug in CoronaCards.

A quick workaround is to _not_ call system.activate() from Lua. Instead, set the corresponding property from the Obj-C side, i.e. set the multipleTouchEnabled property on the UIView, as in:

coronaViewController.view.multipleTouchEnabled = YES;

Thanks Walter for the reply, which made me hopeful… but :slight_smile:

After set up multitouch per view as suggested:

[super viewDidLoad]; // Do any additional setup after loading the view. view = (CoronaView \*)self.view; [view setMultipleTouchEnabled:YES]; view.coronaViewDelegate = self ; [view run];

I have a bad access error when tapping/touching anywhere on the ipad screen.

Did i miss something?

Argh, I spoke too soon.

We’ve fixed this in the latest daily build. (CoronaCards 2014.2407). In that build, you can call system.activate( “multitouch” ), and ignore what I said about the workaround.

Thanks, updated to 2407 and the problem is solved.

Oops, good catch. Yes, this is a bug in CoronaCards.

A quick workaround is to _not_ call system.activate() from Lua. Instead, set the corresponding property from the Obj-C side, i.e. set the multipleTouchEnabled property on the UIView, as in:

coronaViewController.view.multipleTouchEnabled = YES;

Thanks Walter for the reply, which made me hopeful… but :slight_smile:

After set up multitouch per view as suggested:

[super viewDidLoad]; // Do any additional setup after loading the view. view = (CoronaView \*)self.view; [view setMultipleTouchEnabled:YES]; view.coronaViewDelegate = self ; [view run];

I have a bad access error when tapping/touching anywhere on the ipad screen.

Did i miss something?

Argh, I spoke too soon.

We’ve fixed this in the latest daily build. (CoronaCards 2014.2407). In that build, you can call system.activate( “multitouch” ), and ignore what I said about the workaround.

Thanks, updated to 2407 and the problem is solved.