• Login
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.
  • M
    Matt Isaacson
    last edited by Feb 2, 2016, 5:04 AM

    … 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

    C 1 Reply Last reply Feb 2, 2016, 12:36 PM Reply Quote 0
    • C
      Claudia Frank @Matt Isaacson
      last edited by Feb 2, 2016, 12:36 PM

      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
      • M
        Matt Isaacson
        last edited by Feb 2, 2016, 5:18 PM

        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
        1 out of 3
        • First post
          1/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors