V4CC - VField value returns not an object when the field is boolean

Ernesto Giannotta ernestogiannotta at tiscalinet.it
Mon Apr 19 06:17:08 CDT 2010


Hi Ruslan,

I've found that when asking for the value of a Vfield object it doesn't return a valid object if the field is boolean.

e.g.

	VCursor *testCursor = [mDB sqlSelect:@"Select * From Persons Order by FieldName"];
	NSLog(@"Name: %@", [[testCursor fieldAtIndex:1] value]);
	NSLog(@"Number: %@", [[testCursor fieldAtIndex:3] value]);

	// workaround casting the field to a VBool
	NSLog(@"Bool: %d", [[testCursor booleanFieldAtIndex:2] value]);

	// this will crash since the returned value of Bool field is not a proper object ref (it is a bool indeed, 0 or 1)
	NSLog(@"Bool: %@", [[testCursor fieldAtIndex:2] value]);	
	////////////////////////////////////////////////////////////////////////////////


I'll mantis it.


Cool Runnings,
Erne.



More information about the Valentina mailing list