Hello! Something strange is happening with my xcode application. I have following code:
I can see the "_viewingPaneController" property of my "explorer" instance in debugger window. And it's not 'nil'. But when I'm trying to get it by using
i'm getting an error "no known method _viewingPaneController..."
I tried to use:
But i'm getting 'nil' in that case.
I tried to get tall properties of MessageViewer class by using following code:
But there is no _viewingPaneController property there. So how it can be possible - i can see this property in the debug window, but this property even doesn't exist in my class? How can i get this property?
Mac osx version 10.9 mavericks. xcode 5.0.2
Code:
MessageViewer* explorer = [self activeExplorer];
Code:
MessageViewingPaneController *viewingPaneController = [explorer _viewingPaneController];
I tried to use:
Code:
- (void *)instanceVariableForKey:(NSString *)aKey instance:(id)_instance;
{
if (aKey) {
Ivar ivar = object_getInstanceVariable(_instance class, [aKey UTF8String], NULL);
if (ivar) { return (void *)((char *)_instance + ivar_getOffset(ivar)); } }
return NULL;
}
...
MessageViewer* explorer = [self activeExplorer];
MessageViewingPaneController *viewingPaneController = [self instanceVariableForKey:@"_viewingPaneController" instance:explorer];
I tried to get tall properties of MessageViewer class by using following code:
Code:
(id)getIvars:(id)value
{
unsigned int varCount;
Ivar *vars = class_copyIvarList([value class], &varCount);
NSMutableString * str = [[NSMutableString alloc] init];
for (int i = 0; i < varCount; i++) {
Ivar var = vars[i];
const char* name = ivar_getName(var);
const char* typeEncoding = ivar_getTypeEncoding(var);
[str appendFormat:@", %s ,", name];
// do what you wish with the name and type here
}
NSInteger s =0;
}
Mac osx version 10.9 mavericks. xcode 5.0.2
Last edited: