编辑
有问题的代码和'this here ...因为仅通过更改PfUser User中的参数PfUser Current User,应用程序不会产生问题...我忘记指出崩溃的类型...
-(void) {RichiamaDatiInattesa
PFQuery *EsamiInAttesa = [PFQuery queryWithClassName: @ "EsamiInAttesa"];
[EsamiInAttesa whereKey: @ "user" equalTo: [PFUser currentUser]];** //This is the problem Crash "Equal To: [PFUser currentUser]
[EsamiInAttesa countObjectsInBackgroundWithTarget: self selector: @ selector (countcallback: error :)];}
这会返回日志的崩溃
U 03/08/2013 00:04:10.650 [20120:907]将应用程序二终止为未捕获的异常“NSInvalidArgumentException”,原因:“无法对查询类型进行比较:(null)” First throw call stack: (0x31a703e7 0x3976b963 0x31a70307 0xcdb6b 0xbba53 0xa939d 0xa9117 0x3389e579 0x338ded59 0x338daaf5 0x3391c1e1 0x338df803 0x338d7833 0x3387fd1f 0x3387f7ad 0x3387f1ef 0x355975f7 0x35597227 0x31a453e7 0x31a4538b 0x31a4420f 0x319b723d 0x319b70c9 0x338d646d 0x338d32b9 0xa89bd 0x39b98b20) libc + + abi.dylib: terminate called throwing an exception
///////////////////////////////////////// /////////////////////////////////
我正在工作 PARSE(壮观),但我无法弄清楚我错在哪里,因为我不断地从这个 CRASH.... :(
终止两个未捕获的异常'NSInvalidArgumentException',原因:'无法对查询类型进行比较:(null)'
如果我在[PFUser用户]中修改这个查询“等于[PFUser当前用户]不会返回应用程序问题并且它工作正常,除了当我打开应用程序时,第一页我需要你给我值当前用户,如果不是当前用户只插入用户,这是不可能的...
问题发生在我运行LOGOUT的时候用户又尝试再次登录...此时应用程序崩溃...连屏幕都没有显示PF登录
代码'this,你能告诉我哪里错了吗?谢谢大家
- (void) {RichiamaDatiInattesa
PFQuery EsamiInAttesa * = [PFQuery queryWithClassName: @ "EsamiInAttesa"];
[EsamiInAttesa whereKey: @ "user" equalTo: [PFUser currentUser]];
[EsamiInAttesa countObjectsInBackgroundWithTarget: self selector: @ selector (countcallback: error :)];
}
- (void) countcallback: (NSNumber *) count error: (NSError *) error {
if (error) {
self.DisplayNumero.text = [NSString stringWithFormat: @ "% d tests are currently pending," [count intValue]];
Else {}
self.DisplayNumero.text = [NSString stringWithFormat: @ "Connection Absent"];
/ * [[[UIAlertView alloc] initWithTitle: @ "Missing Information"
message: @ "Make sure you fill out all of the information!"
delegate: nil
cancelButtonTitle: @ "ok"
otherButtonTitles: nil] show]; * /
}
}