フィルターのクリア

Why can't I get 'diaryfile', 'more', and other properties from groot?

2 ビュー (過去 30 日間)
Johnny B
Johnny B 2017 年 12 月 20 日
コメント済み: Johnny B 2019 年 9 月 1 日
In R2014b, groot was introduced as the root object, though "0" can still be used to refer to it. So now I can use the following commands to do return the same value:
r = groot;
ss1 = r.ScreenSize
ss2 = get(r, 'ScreenSize')
ss3 = get(0, 'ScreenSize')
But if I try the same thing with the 'More' property...
m1 = r.More
m2 = get(r, 'More')
m3 = get(0, 'More')
The first two return errors, but the third one works. The same holds true for 'Diary' and 'DiaryFile' properties. Also, if I type get(0,'Scr in the command window and hit tab, MATLAB suggests three different completions ( ScreenDepth, ScreenPixelsPerInch, and ScreenSize). But if I type get(0,'Mor and press tab, I get "No Completions Found."
I've been trying to convert to using more object-oriented syntax like all the cool kids are doing, but it seems that I've been thwarted in this instance. Is there a way to control command-window paging and the diary functions using groot? Or does the fact that the documentation for the diary command -- even in R2017b -- still tells me to use the get(0,'Diary') syntax mean that this functionality is being deprecated?
  1 件のコメント
Johnny B
Johnny B 2019 年 9 月 1 日
I've found in the 2014b release notes, under "Properties and syntaxes being removed or changed" that "The root properties CommandWindowSize, Diary, DiaryFile, Echo, Format, FormatSpacing, Language, More, RecursionLimit, BeingDeleted, ButtonDownFcn, UIContextMenu, Clipping, CreateFcn, DeleteFcn, BusyAction, Interruptible, HitTest, Selected, SelectionHighlight, and Visible" are removed and that the suggested action is to 'Remove all instances of root properties that are no longer supported. Use supported root properties." But if I type "doc get(0" at the R2018a command prompt, there are 51 (!) results returned. The official MathWorks documentation four years after removing this functionality and telling me to ""use supported root properties" is still telling me to use get(0,'Diary'), get(0,'DiaryFile'), get(0,'Format'), get(0,'More'), and possibly some others (I didn't slog through all 51 results that were returned).
Is there a MathWorks-approved method of accessing this functionality other than using the properties I've pointedly been told not to use?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by