Community
    • Login

    Apparently I am too stupid ...

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    3 Posts 2 Posters 2.4k Views
    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 IsaacsonM
      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 FrankC 1 Reply Last reply Reply Quote 0
      • Claudia FrankC
        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 IsaacsonM
          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
          The Community of users of the Notepad++ text editor.
          Powered by NodeBB | Contributors