Giter Site home page Giter Site logo

scrollto's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

scrollto's Issues

Undefined function 'getRowCount'

I tried out this utility today, and I'm encountering the following error when running the example code (Win10, R2018aU4). I can reproduce this locally by clearing the workspace and running all commands "at once" (i.e. via "Run" or "Run Section", and not line-by-line).

a   = false(1e6,100);
pos = randi(1e8,1);
scrollto('a',pos)

Initial error:

Error while evaluating TimerFcn for timer 'timer-1' 

Undefined function 'getRowCount' for input arguments of type
  'javahandle_withcallbacks.com.mathworks.mde.array.ArrayEditor'.

After clearing the workspace manually and re-running the example:

Undefined function 'getRowCount' for input arguments of type
  'javahandle_withcallbacks.com.mathworks.mde.array.ArrayEditor'.

Error in scrollto (line 148)
row = min(pos(1)-1, h.getRowCount-1);

When running the code a second time after the error happened (now that the variables are created), there is no problem. This appeared to be a race condition, but even when I surrounded the offending line with a "failsafe", it just resulted in an infinite loop.

... L146
while true
  try
    % Rebase to 0 and bound to max scrollability if pos is not a scalar
    row = min(pos(1)-1, h.getRowCount-1);
    col = min(pos(2)-1, h.getColumnCount-1);
    break;
  catch
    pause(0.05)
    % h = findjobj(desktop.getClient(name),'property',{'name',typeName}); % has no effect
  end
end

I also tried reassigning h inside the catch, but this too did not help.

A dataset scrolls incorrectly with a linear index

Suppose you have the following dataset:

d = mat2dataset(rand(5));

Scrolling to the 7th position, i.e. in subscripts terms to d(2, 2), selects the 7th cell in the first row:

scrollto('d',7)

capture

Now, the workaround is to supply pos as subscripts directly.

Check why the internal position to subscript conversion fails.

Variables Editor row height re-sized after scrolling

The following image shows the effect on the row height after using scrollto() on variable a:

capture

To reproduce the problem:

a = rand(3)
b = rand(3)
scrollto('a',4)

The problem might be caused by the Java method updateUI() which I originally use to avoid flickering and artifacts in the Variables Editor rendering.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.