website/archived/monotouch_troubleshoot.md

34 строки
1.1 KiB
Markdown
Исходник Постоянная ссылка Обычный вид История

2014-05-07 19:35:06 +04:00
---
title: "MonoTouch Troubleshoot"
lastmodified: '2009-08-10'
2014-05-07 19:35:06 +04:00
redirect_from:
- /MonoTouch_Troubleshoot/
---
MonoTouch Troubleshoot
======================
#### this class is not key value coding-compliant for the key XXXX
If you get this error when loading a NIB file it means that the value XXXX was not found on your managed class. This means that you are missing a declaration like this:
``` csharp
[Connect]
TypeName XXXX {
2014-05-07 19:35:06 +04:00
get {
return (TypeName) GetNativeField ("XXXX");
}
set {
SetNativeField ("XXXX", value);
}
}
```
The above definition is automatically generated by MonoDevelop for any XIB files that you add to MonoDevelop in the `NAME_OF_YOUR_XIB_FILE.designer.xib.cs` file.
Additionally, the class that hosts this code must have the [Register] attribute.
#### You are getting a ModelNotImplementedException
If you are getting this exception this means that you are calling base.Method () on a class that overrides a Model. You do not need to call the base method in a class for models (these are classes that are flagged with the [Model] attribute).