The type signature of wxWidgets SetIncludes is an wxArrayString. The textValidatorGetIncludes is coded for an array of strings, but textValidatorSetIncludes passes a pointer to a single string. The result is the validator does not work. Changing it to an array of strings fixes the problem.
This code was tested in an application and it works. There might be a better way to allocate and free the array using a with... FFI statement that I am unaware of. But as long as it has the same effect as the code supplied here it should work.
This code appears to be auto generated, because when I changed it in the classes file, it was overwritten. I had to put it in my application code with a different name to test it.
If there is an easy way to change wxc or whatever is feeding the wxdirect, I am willing to attempt a real solution if I am given guidance and an example. I don't have time to learn all about wxdirect, etc.
Working version:
textValidatorSetIncludes :: TextValidator a -> String -> Int -> IO () textValidatorSetIncludes _obj list count = withObjectRef "textValidatorSetIncludes" _obj $ \cobj__obj -> do let s = map (\ch -> ch:"") list print s ss <- mapM (\s -> newCWString s) s sa <- newArray ss wxTextValidator_SetIncludes cobj__obj sa (fromIntegral count) mapM_ (\s -> free s) ss free sa foreign import ccall "wxTextValidator_SetIncludes" wxTextValidator_SetIncludes :: Ptr (TTextValidator a) -> Ptr CWString -> CInt -> IO ()