[baseten-users] DatabaseObjectClass unable to set

Tuukka Norri tuukka.norri at karppinen.fi
Sat Oct 10 00:45:48 EEST 2009


Hi!

Michael Ruepp kirjoitti 9.10.2009 kello 19.10:
> 			Class GroupsBO;
Here, you're declaring a class variable called GroupsBO but not  
initializing it, so it points to something that is conveniently at  
hand. In this case, it happens to be an instance of  
BXEntityDescription, which is why you're getting the log messages:
> 09.10.09 17:58:34	FSRV_RW_01[6632]	-[BXEntityDescription  
> isSubclassOfClass:]: unrecognized selector sent to instance  
> 0x200052c00
> 09.10.09 17:58:34	FSRV_RW_01[6632]	-[BXEntityDescription  
> isSubclassOfClass:]: unrecognized selector sent to instance  
> 0x200052c00

> When I do this:		//Class GroupsBO;
>
> 			
> 			BXEntityDescription* entity = [context_ entityForTable: @"groups"  
> error: NULL];
> 			[entity setDatabaseObjectClass:GroupsBO];
>
> i get the Error:
>  error: expected expression before 'GroupsBO'
Try this instead: [entity setDatabaseObjectClass: [GroupsBO class]];

By the way, the compiler can warn about things that are allowed in the  
language but are likely to cause problems. All the warnings aren't  
enabled by default. I like to set WARNING_CFLAGS from the target's  
settings to -Wall and enable GCC_TREAT_WARNINGS_AS_ERRORS.
-- 
Best regards,
Tuukka Norri
MK&C




More information about the baseten-users mailing list