Hi folks: I am calling to the OpenDBX library and this library uses C constants. Suppose something like this:<br><br>enum odbxerr {<br>    ODBX_ERR_SUCCESS,<br>#define ODBX_ERR_SUCCESS   ODBX_ERR_SUCCESS<br>    ODBX_ERR_BACKEND,<br>
#define ODBX_ERR_BACKEND   ODBX_ERR_BACKEND<br>    ODBX_ERR_NOCAP,<br>#define ODBX_ERR_NOCAP   ODBX_ERR_NOCAP<br>    ODBX_ERR_PARAM,<br>.........<br><br><br>Then I have a function like this:<br><br><pre>char* odbx_error( odbx_t* handle, int error )<br>
</pre>In that case the int error es the index of the array or I can use the constant. <br>Right now, I am using int from 0 to N. But I would like to invoke calls to that function using Smalltalk Strings that represent C constants. <br>
<br>For example, now I have this:<br><br>OpenDBXUnix&gt;&gt;apiError: handle number: err<br>    &quot;long odbx_error(odbx_t*, int)&quot;<br>    &lt;cdecl: char* &#39;odbx_error&#39; (ulong long) module: &#39;opendbx&#39; &gt;<br>
    ^self externalCallFailed    <br><br>And I call them this way for example:<br><br>OpenDBXUnix apiError:  handle number: 1.<br><br>But, I would love to do:<br><br>OpenDBXUnix apiError:  handle number: &#39;ODBX_ERR_BACKEND&#39;.<br>
<br>Of course this fails because it cannot coerce and String to a long.<br><br>So, that someone know how can I do this (if I can) ?<br><br>Thanks <br><br>Mariano<br><br><br>