createVarCharField crash
jda
jda at his.com
Tue Nov 16 21:11:27 CST 2004
> Ruslan,
>
>I've adapted this code from my 1.x-based app. It creates a temporary
>method that should return one of three fields (depending on if any
>are NULL or not).
>
>fld is dimmed as a VField (although I've also tried VVarChar). When
>this line is run it crashes:
>
> fld =
>myDatabase.myReferences.createVarCharField("authorEditorSortMethod",
>2000, "en_US", EVFlag.fNone, "if (authors IS NULL, if (editors IS
>NULL,title,editors),authors)")
>
A little followup.
The crash is caused by the "if" method at the end. I've tidied it up
using IFNULL:
fld =
myDatabase.myReferences.createVarCharField("authorEditorSortMethod",
2000, "en_US", EVFlag.fNone, "IFNULL(authors), authors,
(IFNULL(editors),editors,title)")
but I get a similar crash in Table_CreateField_Simple__
Is there anything wrong with the method (the logic is: if authors,
return authors; if no authors, return editors; if no editors, return
title).
Jon
More information about the Valentina-beta
mailing list