[Mysql-cocoa-users] how to reflect a NULL field in a table
Brought to you by:
sergecohen
From: Serge C. <co...@em...> - 2002-05-28 11:35:01
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi; We just solved the problem from Jerome Rabas: It comes from the fact that the result he is having contain some field which are NULL. Obviously the framework doesn't support that because it then make a nil object and tries to add it to the returned NSArray or NSDictionary which is returned for every row. As you might now this collections object (array, dictionary...) does not support nil pointers as object. One easy solution would be for me to replace that par an empty string, or null number... but that CHANGES the information contained in the DB, for which NULL is not the same as empty string (for example); so using solution would remove the difference. The only solution I can think of so far is to make a NULL object, only a child of NSObject which doesn't have any instance variables, and only a - -description method (returning @"NULL"). I'm not sure that's a good solution. Any one have a better idea? Thanks in advance. Serge. PS: And thanks to Jerome for the first Bug report on the framework. - ---------------------------------------------------- Serge Cohen GPG Key ID: 1024D/69B1D346 - ---------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (Darwin) Comment: For info see http://www.gnupg.org iD8DBQE882v8Mygj1Wmx00YRAkNtAKCmif1cGR/DEUROjhsr/U0fhCi2TACeLLMy gc7qkoMZQP0vvJdFQgFMtcc= =axno -----END PGP SIGNATURE----- |