Hi Jeremy,
On working with strings, you need to use the internal string
representation, like so:
public static function connect(host:String, uid:String, pwd:String)
{
var r = test(untyped host.__s, untyped uid.__s, untyped pwd.__s);
}
For debugging, choose your projects 'debug' configuration, set 'project
setttings','debugging','command' to 'neko' (or its full path) and enter the
path to your compiled .n test file in 'command arguments'.
Cheers,
Edwin
flashvan wrote:
> Hello list,
> I am try to write my odbc module for neko vm these days. when testing a
> simple c function, I have got a exception.
> this is just a test,
>
> /*
> ** odbc.c output a module file named sql.ndll
> */
> static value test(value src, value uid, value pwd)
> {
> val_check(src, string);
> val_check(uid, string);
> val_check(pwd, string);
>
> return alloc_int(1);
> }
> DEFINE_PRIM(test, 3);
>
>
> // Odbc.hx, for test
> class Odbc
> {
> private static var test = neko.Lib.load("sql","test",3);
>
> public static function connect(host:String, uid:String, pwd:String)
> {
> var r = test(host, uid, pwd);
> }
>
> public static function main()
> {
> Odbc.connect("jeremy", "sa", "sa");
> }
> }
>
> after compiled, use command line
> F:\haxe-1.07>neko Odbc.n
> Called from <null> line 1
> Called from Odbc.hx line 16
> Called from Odbc.hx line 10
> Uncaught exception - [EMAIL PROTECTED]
>
> what's going wrong ? who can explain it?
>
> I also found that it is very difficult to debug the module. How can I use
> step-by-step debugging in neko module developping?
> I use visual studio.net 2003.
>
> thanks,
>
>
>
>
> jeremy
> 2006-09-26
>
>
--
Neko : One VM to run them all
(http://nekovm.org)