< prev index next >

modules/javafx.graphics/src/main/native-glass/mac/GlassApplication.m

Print this page

        

*** 170,189 **** if ((*env)->ExceptionCheck(env) == JNI_TRUE) { (*env)->ExceptionDescribe(env); (*env)->ExceptionClear(env); } ! jmethodID runMethod = (*env)->GetMethodID(env, runnableClass, "run", "()V"); if ((*env)->ExceptionCheck(env) == JNI_TRUE) { (*env)->ExceptionDescribe(env); (*env)->ExceptionClear(env); } ! ! if ((runnableClass != 0) && (runMethod != 0)) ! { (*env)->CallVoidMethod(env, self->jLaunchable, runMethod); if ((*env)->ExceptionCheck(env) == JNI_TRUE) { (*env)->ExceptionDescribe(env); (*env)->ExceptionClear(env); --- 170,187 ---- if ((*env)->ExceptionCheck(env) == JNI_TRUE) { (*env)->ExceptionDescribe(env); (*env)->ExceptionClear(env); } ! if (runnableClass) { jmethodID runMethod = (*env)->GetMethodID(env, runnableClass, "run", "()V"); if ((*env)->ExceptionCheck(env) == JNI_TRUE) { (*env)->ExceptionDescribe(env); (*env)->ExceptionClear(env); } ! if (runMethod) { (*env)->CallVoidMethod(env, self->jLaunchable, runMethod); if ((*env)->ExceptionCheck(env) == JNI_TRUE) { (*env)->ExceptionDescribe(env); (*env)->ExceptionClear(env);
*** 213,231 **** // LOG("NSRightMouseDownMask global: %p num %d win %p appwin %p", // targetWindowForEvent, [incomingEvent windowNumber], window, // [[NSApplication sharedApplication] mainWindow]); // }]; } } ! else if (runnableClass == 0) ! { NSLog(@"ERROR: Glass could not find Runnable class\n"); } - else //if (runMethod == 0) - { - NSLog(@"ERROR: Glass could not find run() method\n"); - } } (*env)->CallVoidMethod(env, self->jApplication, [GlassHelper ApplicationNotifyWillFinishLaunchingMethod]); self->started = YES; --- 211,226 ---- // LOG("NSRightMouseDownMask global: %p num %d win %p appwin %p", // targetWindowForEvent, [incomingEvent windowNumber], window, // [[NSApplication sharedApplication] mainWindow]); // }]; } + } else { + NSLog(@"ERROR: Glass could not find run() method\n"); } ! } else { NSLog(@"ERROR: Glass could not find Runnable class\n"); } } (*env)->CallVoidMethod(env, self->jApplication, [GlassHelper ApplicationNotifyWillFinishLaunchingMethod]); self->started = YES;
*** 357,367 **** GET_MAIN_JENV; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; { NSUInteger count = [filenames count]; ! jobjectArray files = (*env)->NewObjectArray(env, (jsize)count, [GlassHelper ClassForName:"java.lang.String" withEnv:env], NULL); GLASS_CHECK_EXCEPTION(env); for (NSUInteger i=0; i<count; i++) { NSString *file = [filenames objectAtIndex:i]; if (file != nil) --- 352,366 ---- GET_MAIN_JENV; NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; { NSUInteger count = [filenames count]; ! jclass stringClass = [GlassHelper ClassForName:"java.lang.String" withEnv:env]; ! if (!stringClass) { ! return; ! } ! jobjectArray files = (*env)->NewObjectArray(env, (jsize)count, stringClass, NULL); GLASS_CHECK_EXCEPTION(env); for (NSUInteger i=0; i<count; i++) { NSString *file = [filenames objectAtIndex:i]; if (file != nil)
< prev index next >