Autocomplete triggers PreGet and PostGet events

2 ビュー (過去 30 日間)
Christian Vetter
Christian Vetter 2020 年 4 月 15 日
コメント済み: FreSch 2024 年 12 月 8 日
Hi everyone,
I just observed a very strange behavior, which I do not understand. If I implement a PreGet or PostGet listener, an event is triggered every time I want to use the autocompletion via the tab key. Here is a minimum example
classdef minimal < handle
properties (GetObservable)
prop
end
methods
function obj = minimal()
obj.prop = randn(1);
addlistener(obj,'prop','PreGet',@obj.handlePreGet);
end
function handlePreGet(~, ~, ~)
disp('PreGet')
end
end
end
And here is my output by just pressing <tab> a few times
>> B = minimal
B =
PreGet
minimal with properties:
prop: 0.2696
PreGet
PreGet
PreGet
PreGet
PreGet
PreGet
>> B.
Can anyone explain to me why this is happening and if it can be avoided?
Thanks a lot!
  1 件のコメント
FreSch
FreSch 2024 年 12 月 8 日
I've just observed the same Issue in R2024a. Did you find an answer?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeDebugging and Analysis についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by