Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Apparently I am too stupid ...

    Help wanted · · · – – – · · ·
    2
    3
    2136
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Matt Isaacson
      Matt Isaacson last edited by

      … to find the editor command that will scroll the document to make the caret visible. I tried editor.goToPos( ), which I found in the PythonScript documentation, but it produces only “AttributeError: ‘Editor’ object has no attribute ‘goToPos’” in the console. Everything else I’ve found will put the caret where it is supposed to but won’t scroll the document to make it visible. Can any smart person out there clue me in?

      Thanks,
      Matt

      Claudia Frank 1 Reply Last reply Reply Quote 0
      • Claudia Frank
        Claudia Frank @Matt Isaacson last edited by

        Hello Matt,

        python is case sensitive

        >>> help(editor.gotoPos)
        Help on method gotoPos:
        
        gotoPos(...) method of Npp.Editor instance
            gotoPos( (Editor)arg1, (int)pos) -> None :
                Set caret to a position and ensure it is visible.
        

        Regarding scrolling, here is the documentation.

        Cheers
        Claudia

        1 Reply Last reply Reply Quote 0
        • Matt Isaacson
          Matt Isaacson last edited by

          Ah! So not only too stupid, but also too blind to notice a singular deviation from otherwise very uniform use of camel case for function names. Unless “goto” is now a single English word in its own right and not just a programming command. Grumble grumble.

          Thanks again Claudia for getting me unstuck !!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright © 2014 NodeBB Forums | Contributors