function signature for package function

Well I just hit "cancel" instead of "submit" so here's a short version :/
I can't get functionSignatures.json to work for the function "fileWrite" inside a package "sl.io"
Validation (validateFunctionSignaturesJSON) can't find the function if it is just "fileWrite" and complains when it is "sl.io.fileWrite" => Unable to get metadata for method "fileWrite" of class "sl.io".
I am assuming this is a bug but am I missing something simple? Either version doesn't seem to work in the command window (ignoring validation)
Using 2018b

2 件のコメント

Ken Atwell
Ken Atwell 2019 年 3 月 2 日
That error message from validateFunctionSignaturesJSON is suspicious.
What does:
>> which sl.io.fileWrite
return?
Jim Hokanson
Jim Hokanson 2019 年 3 月 2 日
It returns the correct path:
...mat_std_lib\+sl\+io\fileWrite.m % static method or package function
I'm guessing it is a bug ... I'm going to go ahead and file a report.

サインインしてコメントする。

 採用された回答

Jim Hokanson
Jim Hokanson 2019 年 3 月 5 日

1 投票

So apparently there were two issues.
First, these json files must be placed in the same folder that gets added to the path. So rather than being in the "+io" folder it needs to be placed in the folder that contains the "+sl" folder. This means that there will be only 1 JSON file for a package and all of its subpackages.
Second, there is currently a bug that prevents the tip window from popping up when typing with these nested functions in the command window. As a workaround they suggested that I could use a live script instead.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDebugging and Analysis についてさらに検索

製品

リリース

R2018b

質問済み:

2019 年 2 月 21 日

回答済み:

2019 年 3 月 5 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by