Re: [gnome-db] Making a field mandatory in a form/grid
- From: Murray Cumming <murrayc murrayc com>
- To: Johannes Schmid <johannes schmid gmx de>
- Cc: gnome-db-list gnome org, Vivien Malerba <vmalerba gmail com>
- Subject: Re: [gnome-db] Making a field mandatory in a form/grid
- Date: Thu, 01 Feb 2007 10:01:07 +0100
On Wed, 2007-01-31 at 22:45 +0100, Johannes Schmid wrote:
> Hi Vivien!
>
> Well, the docs are quite confusing in this point because they just
> mention that the parameter cannot be "0" if set_not_null(TRUE) was
> called. Anyway an empty string is usually non-NULL (especially in a C++
> context).
There is no concept of a NULL std::string in C++. Either string.empty()
is true or it's not - there's nothing in between.
> Maybe the docs and the method name could be improved.
For strings, NULLness is not very interesting. It's a concept from SQL
that isn't useful in an API.
Or do you have an example of a situation in which it is useful for the
application to distinguish between empty-string and NULL for a text
field? How would the application (or libgnomedb) show this distinction?
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]