1

Arden MLM のリストと配列に関するドキュメントを見つけるのにかなり苦労しています。

ObjectsPlus を使用して、Arden から 4 桁の数字のリストを C# DLL に渡そうとしています。C# DLL は、そのリストを引数として取り、関数の設計目的を実行できます。

これは私がArden MLMに持っているものですが、.netエラー「オブジェクト参照がオブジェクトのインスタンスに設定されていません」が表示されるため機能しません

MLM は次のとおりです。

list_id_object       := OBJECT [id_list_holder];
id_list              := new list_id_object with "1154", "1155", "1158"; 

try
    send_alert_start := new net_object 'Webservices';
    result := call send_alert_start.'pageToMultipleIds' with
        ((sender_name as string) as 'String'),
        ((sender_message as string) as 'String'),
        ((list_id_object as list) as 'List<Int32>');
endtry;
catch Exception ex
    error_occured := true;
    error_message := "Error message here\n" || ex.Message || "\n\n";
endcatch;

そのリストを受け取る C# メソッドは次のとおりです。

public string testMethod(string sender_name, string sender_message, List<Int32> IdToPage)
    {
        try
            {
                testMethod2(sender_name, sender_message, IdToPage);
                return "Success";
            }
            catch(WebException e)
            {
                return e.ToString();
            }
    }
4

2 に答える 2

3

これは Allscripts SCM 用に書かれていますが、リストの作成方法を示す必要があります。残念ながら、標準の Arden リストを作成し、それをループして各項目をリストに追加する必要があります。

std_include_libs := mlm'std_include_libs';
include std_include_libs;

id_list := 1154, 1155, 1158;

try; 
    using "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
    using namespace "System.Collections.Generic";
    idList := new net_object 'List<Int32>';
    for i in id_list do
        void := call idList.'Add' with i as 'Int32';
    enddo;

    send_alert_start := new net_object 'Webservices';
    result := call send_alert_start.'pageToMultipleIds' with    ((sender_name as string) as 'String'),
                                                                ((sender_message as string) as 'String'),
                                                                idList;
endtry;
catch Exception ex;
    error_occurred := true;
    error_message := "Error message here\n" || ex.Message || "\n\n";
endcatch;
于 2016-01-15T23:22:54.103 に答える