Удалить файл FWAne.h. Замените содержимое файла FWAne.m следующим:
'#import "FloatingWindow.h"
'#import "FlashRuntimeExtensions.h"
FREObject openFloatingWindow(FREContext ctx, void* funcData, uint32_t argc, FREObject argv[] )
{
uint32_t parm0Length, parm1Length, parm2Length, parm3Length, parm4Length, parm5Length, parm6Length, parm7Length, parm8Length, parm9Length, parm10Length, parm11Length, parm12Length, parm13Length;
const uint8_t *uparm0, *uparm1, *uparm2, *uparm3, *uparm4, *uparm5, *uparm6, *uparm7, *uparm8, *uparm9, *uparm10, *uparm11, *uparm12, *uparm13;
FREGetObjectAsUTF8(argv[0], &parm0Length, &uparm0);
NSString* parm0 = [NSString stringWithUTF8String:(char*)uparm0];
// FREGetObjectAsUTF8(argv[1], &parm1Length, &uparm1);
// NSString* parm1 = [NSString stringWithUTF8String:(char*)uparm1];
// FREGetObjectAsUTF8(argv[2], &parm2Length, &uparm2);
// NSString* parm2 = [NSString stringWithUTF8String:(char*)uparm2];
// FREGetObjectAsUTF8(argv[3], &parm3Length, &uparm3);
// NSString* parm3 = [NSString stringWithUTF8String:(char*)uparm3];
// FREGetObjectAsUTF8(argv[4], &parm4Length, &uparm4);
// NSString* parm4 = [NSString stringWithUTF8String:(char*)uparm4];
// FREGetObjectAsUTF8(argv[5], &parm5Length, &uparm5);
// NSString* parm5 = [NSString stringWithUTF8String:(char*)uparm5];
// FREGetObjectAsUTF8(argv[6], &parm6Length, &uparm6);
// NSString* parm6 = [NSString stringWithUTF8String:(char*)uparm6];
// FREGetObjectAsUTF8(argv[7], &parm7Length, &uparm7);
// NSString* parm7 = [NSString stringWithUTF8String:(char*)uparm7];
// FREGetObjectAsUTF8(argv[8], &parm8Length, &uparm8);
// NSString* parm8 = [NSString stringWithUTF8String:(char*)uparm8];
// FREGetObjectAsUTF8(argv[9], &parm9Length, &uparm9);
// NSString* parm9 = [NSString stringWithUTF8String:(char*)uparm9];
// FREGetObjectAsUTF8(argv[10], &parm10Length, &uparm10);
// NSString* parm10 = [NSString stringWithUTF8String:(char*)uparm10];
// FREGetObjectAsUTF8(argv[11], &parm11Length, &uparm11);
// NSString* parm11 = [NSString stringWithUTF8String:(char*)uparm11];
// FREGetObjectAsUTF8(argv[12], &parm12Length, &uparm12);
// NSString* parm12 = [NSString stringWithUTF8String:(char*)uparm12];
// FREGetObjectAsUTF8(argv[13], &parm13Length, &uparm13);
// NSString* parm13 = [NSString stringWithUTF8String:(char*)uparm13];
<pre><code>NSLog(@"Initializing delegate and window");
id delegate = [[UIApplication sharedApplication] delegate];
UIWindow *window = [delegate window];
NSLog(@"Creating FloatingWindow");
FloatingWindow* fw = [[FloatingWindow alloc] initWithNibName:@"FloatingWindow" bundle:nil];
NSLog(@"Adding FloatingWindow");
[window addSubview:fw.view];
NSLog(@"Setting frame size");
fw.view.frame = CGRectMake(100, 100, 200, 200);
NSLog(@"Done openFloatingWindow");
return NULL;
</code>
}
// ContextFinalizer ().
void ContextFinalizer (FREContext ctx)
{
NSLog (@ "ContextFinalizer");
// Очистка Здесь.
вернуть;
}
// ContextInitializer ()
void ContextInitializer (void * extData, const uint8_t * ctxType, FREContext ctx,
uint32_t * numFunctionsToTest, const FRENamedFunction ** functionsToSet)
{
NSLog (@ "ContextInitializer");
* numFunctionsToTest = 1;
FRENamedFunction* func = (FRENamedFunction*) malloc(sizeof(FRENamedFunction) * 1);
func[0].name = (const uint8_t*) "openFloatingWindow";
func[0].functionData = NULL;
func[0].function = &openFloatingWindow;
*functionsToSet = func;
}
// ExtInitializer ()
void ExtInitializer (void ** extDataToSet, FREContextInitializer * ctxInitializerToSet,
FREContextFinalizer * ctxFinalizerToSet)
{
NSLog (@ "ExtInitializer");
* extDataToSet = NULL;
* ctxInitializerToSet = & ContextInitializer;
* ctxFinalizerToSet = & ContextFinalizer;
}
// ExtFinalizer ()
void ExtFinalizer (void * extData) {
NSLog (@ "ExtFinalizer");
// Уборка здесь.
вернуть;
}