[Vm-dev] iOS VM - MainWindow.xib - Hand crafted?

John McIntosh johnmci at smalltalkconsulting.com
Fri Mar 1 02:12:35 UTC 2013


SqueakNoOGLIPhoneAppDelegate
Squeak Delegate with no open GL support, but I lie.

IApplicationMain(argc, argv, nil,
> NSStringFromClass([HOAppDelegate class]));
is a new form versus the OLD 2009 form.

argc	
The count of arguments in argv; this usually is the corresponding
parameter to main.
argv	
A variable list of arguments; this usually is the corresponding
parameter to main.
principalClassName	
The name of the UIApplication class or subclass. If you specify nil,
UIApplication is assumed.
delegateClassName	
The name of the class from which the application delegate is
instantiated. If principalClassName designates a subclass of
UIApplication, you may designate the subclass as the delegate; the
subclass instance receives the application-delegate messages. Specify
nil if you load the delegate object from your application’s main nib
file.


Application windows are expected to have a root view
> controller at the end of application
You need a
	window.rootViewController = theViewController;

But that has to be in the applicationDidFinishLaunching logic, but I
don't think we make the squeak window yet?
Exercise for the reader...

>
> CGImageCreate: invalid image size: 0 x 0.

See
- (CGImageRef) createImageFrom: (void *) dispBitsIndex affectedT:
(int) affectedT affectedB: (int) affectedB affectedL: (int)
You are creating a 0x0 image? MMM no squeak view? 0x0 window size?

Sent from my iPhone

On 2013-02-28, at 1:14 PM, "phil at highoctane.be" <phil at highoctane.be> wrote:

>
> Hello,
>
> In order to get the external keyboard events, I need to overload
> sendEvent: my own UIApplication class.
>
> But it looks like the iOS VM has its own weird way of being done.
>
> The MainWindow.xib has the SqueakNoOGLIPhoneAppDelegate mentioned in
> there (in ...-3... SqueakNo...).
>
> Usually, one does't start its UIKit app with:
>
> #import <UIKit/UIKit.h>
>
> int main(int argc, char *argv[]) {
>   NSAutoreleasePool * pool = [NSAutoreleasePool new];
>
>   int retVal = UIApplicationMain(argc, argv, nil, nil);
>   [pool drain];
>   return retVal;
> }
>
> but with something like:
>
>
> #import <UIKit/UIKit.h>
>
> #import "HOAppDelegate.h"
>
> int main(int argc, char *argv[])
> {
>    @autoreleasepool {
>        return UIApplicationMain(argc, argv, nil,
> NSStringFromClass([HOAppDelegate class]));
>    }
> }
>
> forget the pool stuff of course. but the second nil argument disturbs
> me. Also, we have this annoying console message:
> <Warning>: Application windows are expected to have a root view
> controller at the end of application
>
> Along with some   Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595]
> <Error>: CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
> Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
> Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
> Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
> Feb 28 19:12:52 iPad-de-Philippe-Back iStackVM[595] <Error>:
> CGImageCreate: invalid image size: 0 x 0.
>  Feb 28 19:12:52 iPad-de-Philippe-Back backboardd[26] <Warning>:
> CoreAnimation: updates deferred for too long
>  Feb 28 19:12:52 iPad-de-Philippe-Back backboardd[26] <Warning>:
> CoreAnimation: timed out fence 26083
>  Feb 28 19:12:52 iPad-de-Philippe-Back SpringBoard[66] <Warning>:
> CoreAnimation: failed to receive fence reply: 10004003
>
> of which I have no clue.
>
> So, how does the iOS VM startup process work?
>
> Where to put my sendEvent: hook?
>
> TIA
> Phil


More information about the Vm-dev mailing list