2013-02-14 9 views
0

내 코드입니다 :객체가 초기화되지 [.NET 비즈니스 커넥터가 여기

AxaptaObject dict = (AxaptaObject)DynAx.CallStaticClassMethod("Dictionary", "new"); 
object id = (object)dict.Call("enumName2Id", "TimeZone"); 
AxaptaObject dictEnum = (AxaptaObject)DynAx.CallStaticClassMethod("DictEnum", "new", id); 
string s = (string)dictEnum.Call("index2Label", "2"); 

나는 다음과 같은 오류가 점점 오전 :

Error executing code: Dictionary object not initialized. 

가 왜 사전 개체의 초기화 중에 해당 오류를 던지고을? 친절하게 도와주세요.

+0

첫 번째 줄을 'AxaptaObject dict = (AxaptaObject) DynAx.CallStaticClassMethod ("Dictionary");로 바꿀 수 있습니까? – user1416420

답변

1

알 수 있습니다.

int enumId = (int)ax.CallStaticClassMethod("Global", "enumName2Id", enumName); 
AxaptaObject dictEnum = (AxaptaObject)ax.CreateAxaptaObject("DictEnum", enumId); 
return (string)dictEnum.Call("index2Label", index); 

당신은 "AxaptaObj.CreateAxaptaObject"를 사용할 필요가 다음과 같이

코드입니다. 이렇게하면 작은 작업을 위해 C++에서 간접적으로 X ++ 코드를 작성할 수 있습니다. 나는 성과 요소에 대해 확신하지 못한다.