次のコードを使用して、Python から Obj を呼び出しています。
print "Login begin";
nc = Foundation.NSDistributedNotificationCenter.defaultCenter();
userInfo = NSDictionary.dictionaryWithObjectsAndKeys_("7","operation",user,"username",password,"password",None);
nc.postNotificationName_object_userInfo_deliverImmediately_(SIMULATOR_NOTIFICATION,"",userInfo,1);
return;
ObjC は次のように受け取ります。
- (void) recievedNotification:(NSNotification *) notification
{
NSDictionary *userInfo = [notification userInfo];
NSControl *postingObject = [notification object]; // the object that posted the notification
NSMutableDictionary *response = [NSMutableDictionary dictionaryWithCapacity:1];
int switcher = [[userInfo objectForKey:@"operation"] intValue];
switch (switcher) {
私の質問は、値 (成功/失敗のブール値など) を Python コードに返すにはどうすればよいですか?
ところで、それは私のコードではありません。はい、さまざまな問題が見られますが、その開発者は去り、今は更新するように求められています。あなたはそれがどのように知っています。