Loading a PopOverViewController via a nib on iPad - [SOLVED]
by Brian Szatkowski · in iTorque 2D · 05/19/2011 (9:25 am) · 3 replies
Hi All;
I had previously tried to tackle this issue eight months ago (Old post) but the thread died before any solution was reached and I had moved on to address other problems.
I am trying to create a PopOverViewController via a nib on the iPad. Despite having the code work flawlessly as a standalone app (i.e. sans iT2D inclusion), as soon as the same code is introduced into my universal app, it causes a fatal assertion in the Torque engine...
...which results in the app crashing.
If I click "Cancel" on the dialog box that pops up, I get another fatal error:
After that, the errors are cyclic between the two, leaving me only with the option to close the app.
I've added in breakpoints to debug the code:
I have no idea what is causing the assertion but it is leaving my app at a standstill now.
Does anyone have any insight as to what could be causing the problem? Has anyone successfully created a Universal app that utilizes popovers for the iPad?
Thank you
I had previously tried to tackle this issue eight months ago (Old post) but the thread died before any solution was reached and I had moved on to address other problems.
I am trying to create a PopOverViewController via a nib on the iPad. Despite having the code work flawlessly as a standalone app (i.e. sans iT2D inclusion), as soon as the same code is introduced into my universal app, it causes a fatal assertion in the Torque engine...
Quote:
Fatal: (../engine/source/platform/gameInterface.cc @ 79) Error! ProcessEvent is NOT reentrant.
...which results in the app crashing.
If I click "Cancel" on the dialog box that pops up, I get another fatal error:
Quote:
Fatal: (../engine/source/core/tVector.h @ 435) Vector<T>::operator[] - out of bounds array access!
After that, the errors are cyclic between the two, leaving me only with the option to close the app.
I've added in breakpoints to debug the code:
... PopOverViewController *popController = [[PopOverViewController alloc] initWithNibName: @"PopOverViewController" bundle: nil]; UIWindow* window = [UIApplication sharedApplication].keyWindow; [popController loadView]; // <-- This is where the error occurs! ...
I have no idea what is causing the assertion but it is leaving my app at a standstill now.
Does anyone have any insight as to what could be causing the problem? Has anyone successfully created a Universal app that utilizes popovers for the iPad?
Thank you
About the author
#2
First, it's nice to see these docs coming along. Basic concepts like those covered in this specific tutorial will really help newcomers--especially if we want them to "Read. Read Code. Drink Code Red. Code. Pee." ;)
I have to step away for several hours to tend to my son but will, upon my return to the computer, follow the pertinent steps of the tutorial and report back with my findings.
Perhaps this is an anomaly created by the transition from earlier versions of XCode to XCode 4. We'll see.
Thanks for your feedback!
05/19/2011 (12:35 pm)
Hi Michael;First, it's nice to see these docs coming along. Basic concepts like those covered in this specific tutorial will really help newcomers--especially if we want them to "Read. Read Code. Drink Code Red. Code. Pee." ;)
I have to step away for several hours to tend to my son but will, upon my return to the computer, follow the pertinent steps of the tutorial and report back with my findings.
Perhaps this is an anomaly created by the transition from earlier versions of XCode to XCode 4. We'll see.
Thanks for your feedback!
#3
I just wanted to chime in and say that creating a new nib from scratch in XCode 4 did the trick.
I'm still finagling with the nuances of using the required popovers for the iPad but the basic nib launch is now working as intended.
I would definitely say that, when time permits, you should create a tutorial that illustrates how to handle these iPad-specific differences (which will be even more desirable for others once the code base natively supports Universal apps without any engine tweaking).
Thank you
05/19/2011 (9:28 pm)
Hi Michael;I just wanted to chime in and say that creating a new nib from scratch in XCode 4 did the trick.
I'm still finagling with the nuances of using the required popovers for the iPad but the basic nib launch is now working as intended.
I would definitely say that, when time permits, you should create a tutorial that illustrates how to handle these iPad-specific differences (which will be even more desirable for others once the code base natively supports Universal apps without any engine tweaking).
Thank you
Employee Michael Perry
ZombieShortbus