These are my native calls!
AdkLibrary.ADK_DATA adkData=aw.createAdkData();
aw.printError(aw.AdkSetSortOrder(adkData,
AdkLibrary.ADK_SORT_ORDER.eArticleNr));
AdkLibrary.ADK_ERROR e=aw.AdkFirst(adkData);
while(e.lRc==aw.ADKE_OK){
System.err.println(aw.getAdkStr(adkData,
aw.ADK_ARTICLE_NUMBER)+" "+aw.getAdkStr(adkData, aw.ADK_ARTICLE_NAME)+"
"+aw.getAdkStr(adkData,aw.ADK_ARTICLE_NAME_X)+" "+aw.getAdkDouble(adkData,
aw.ADK_ARTICLE_PRICE));
}
This loop runs for about 100 times but always fails after a while...
Actually I haven't checked the size in Java corresponds to the C size, cause
I don't know how to actually print the size... Help!
And I still don't understand how to insert that byte[] code trick, cause
everytime I try to insert it, the program fails at once. Shall I add it as a
public member to the Union and initialize it within the default constructor
of the union? Help!
I've also tried to use the setType method of the Union, but I don't know the
type of each union until I've called aw.createAdkData(); So what I did was
looping through each ADK_FIELD inside the ADK_DATA and setType to
String.class on each one containing a String and to IntegerType.class on int
Unions. Is this correct? The program doesn't work better, but when I read
the documentation it seemed to be the solution...
/Johan