curses.setsyx()?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • linkmaster032000@gmail.com

    curses.setsyx()?

    I tried curses.setsyx(2 ,3) in my script and it doesn't move the curses
    cursor. Any alternatives/solutions?
  • Tim Roberts

    #2
    Re: curses.setsyx() ?

    linkmaster03200 0@gmail.com wrote:
    >
    >I tried curses.setsyx(2 ,3) in my script and it doesn't move the curses
    >cursor. Any alternatives/solutions?
    Did you call doupdate after? setsyx just manipulates the data structures.
    It takes a call to doupdate to force those changes to take effect visually.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.

    Comment

    • linkmaster032000@gmail.com

      #3
      Re: curses.setsyx() ?

      On Sep 19, 1:24 am, Tim Roberts <t...@probo.com wrote:
      linkmaster032.. .@gmail.com wrote:
      >
      I tried curses.setsyx(2 ,3) in my script and it doesn't move the curses
      cursor. Any alternatives/solutions?
      >
      Did you call doupdate after?  setsyx just manipulates the data structures.
      It takes a call to doupdate to force those changes to take effect visually.
      --
      Tim Roberts, t...@probo.com
      Providenza & Boekelheide, Inc.
      I added it and it still doesn't work. This is what I'm doing when I
      want to display the cursor and prepare it for input at 2,3:

      curses.echo()
      curses.curs_set (1)
      curses.setsyx(2 ,3)
      curses.doupdate ()

      Comment

      • linkmaster032000@gmail.com

        #4
        Re: curses.setsyx() ?

        On Sep 19, 6:42 pm, linkmaster032.. .@gmail.com wrote:
        On Sep 19, 1:24 am, Tim Roberts <t...@probo.com wrote:
        >
        linkmaster032.. .@gmail.com wrote:
        >
        >I tried curses.setsyx(2 ,3) in my script and it doesn't move the curses
        >cursor. Any alternatives/solutions?
        >
        Did you call doupdate after?  setsyx just manipulates the data structures.
        It takes a call to doupdate to force those changes to take effect visually.
        --
        Tim Roberts, t...@probo.com
        Providenza & Boekelheide, Inc.
        >
        I added it and it still doesn't work. This is what I'm doing when I
        want to display the cursor and prepare it for input at 2,3:
        >
        curses.echo()
        curses.curs_set (1)
        curses.setsyx(2 ,3)
        curses.doupdate ()
        Any idea what's wrong?

        Comment

        • Tim Roberts

          #5
          Re: curses.setsyx() ?

          linkmaster03200 0@gmail.com wrote:
          >On Sep 19, 6:42 pm, linkmaster032.. .@gmail.com wrote:
          >On Sep 19, 1:24 am, Tim Roberts <t...@probo.com wrote:
          >>
          linkmaster032.. .@gmail.com wrote:
          >>
          >I tried curses.setsyx(2 ,3) in my script and it doesn't move the curses
          >cursor. Any alternatives/solutions?
          >>
          Did you call doupdate after?  setsyx just manipulates the data structures.
          It takes a call to doupdate to force those changes to take effect visually.
          --
          Tim Roberts, t...@probo.com
          Providenza & Boekelheide, Inc.
          >>
          >I added it and it still doesn't work. This is what I'm doing when I
          >want to display the cursor and prepare it for input at 2,3:
          >>
          >curses.echo( )
          >curses.curs_se t(1)
          >curses.setsyx( 2,3)
          >curses.doupdat e()
          >
          >Any idea what's wrong?
          No. Are you able to post an entire sample that demonstrates the problem?
          --
          Tim Roberts, timr@probo.com
          Providenza & Boekelheide, Inc.

          Comment

          • brad.at.school@gmail.com

            #6
            Re: curses.setsyx() ?

            On Sep 22, 11:24 pm, Tim Roberts <t...@probo.com wrote:
            linkmaster032.. .@gmail.com wrote:
            On Sep 19, 6:42 pm, linkmaster032.. .@gmail.com wrote:
            On Sep 19, 1:24 am, Tim Roberts <t...@probo.com wrote:
            >
            linkmaster032.. .@gmail.com wrote:
            >
            >I tried curses.setsyx(2 ,3) in my script and it doesn't move the curses
            >cursor. Any alternatives/solutions?
            >
            Did you call doupdate after?  setsyx just manipulates the data structures.
            It takes a call to doupdate to force those changes to take effect visually.
            --
            Tim Roberts, t...@probo.com
            Providenza & Boekelheide, Inc.
            >
            I added it and it still doesn't work. This is what I'm doing when I
            want to display the cursor and prepare it for input at 2,3:
            >
            curses.echo()
            curses.curs_set (1)
            curses.setsyx(2 ,3)
            curses.doupdate ()
            >
            Any idea what's wrong?
            >
            No.  Are you able to post an entire sample that demonstrates the problem?
            --
            Tim Roberts, t...@probo.com
            Providenza & Boekelheide, Inc.
            Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.


            Run that and press 'n' key. It is supposed to move the cursor to 2,3
            and it doesn't.

            Comment

            • linkmaster032000@gmail.com

              #7
              Re: curses.setsyx() ?

              On Sep 23, 4:16 pm, brad.at.sch...@ gmail.com wrote:
              On Sep 22, 11:24 pm, Tim Roberts <t...@probo.com wrote:
              >
              >
              >
              linkmaster032.. .@gmail.com wrote:
              >On Sep 19, 6:42 pm, linkmaster032.. .@gmail.com wrote:
              >On Sep 19, 1:24 am, Tim Roberts <t...@probo.com wrote:
              >
              linkmaster032.. .@gmail.com wrote:
              >
              >I tried curses.setsyx(2 ,3) in my script and it doesn't move the curses
              >cursor. Any alternatives/solutions?
              >
              Did you call doupdate after?  setsyx just manipulates the data structures.
              It takes a call to doupdate to force those changes to take effect visually.
              --
              Tim Roberts, t...@probo.com
              Providenza & Boekelheide, Inc.
              >
              >I added it and it still doesn't work. This is what I'm doing when I
              >want to display the cursor and prepare it for input at 2,3:
              >
              >curses.echo( )
              >curses.curs_se t(1)
              >curses.setsyx( 2,3)
              >curses.doupdat e()
              >
              >Any idea what's wrong?
              >
              No.  Are you able to post an entire sample that demonstrates the problem?
              --
              Tim Roberts, t...@probo.com
              Providenza & Boekelheide, Inc.
              >
              Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

              >
              Run that and press 'n' key. It is supposed to move the cursor to 2,3
              and it doesn't.
              Sorry that was me, forgot to switch emails. But yes that is it. Remove
              the line about ppm/settings.conf if you don't want to create it
              because it will throw an exception.

              Comment

              • Tim Roberts

                #8
                Re: curses.setsyx() ?

                linkmaster03200 0@gmail.com wrote:
                >On Sep 23, 4:16 pm, brad.at.sch...@ gmail.com wrote:
                >On Sep 22, 11:24 pm, Tim Roberts <t...@probo.com wrote:
                linkmaster032.. .@gmail.com wrote:
                >On Sep 19, 6:42 pm, linkmaster032.. .@gmail.com wrote:
                >On Sep 19, 1:24 am, Tim Roberts <t...@probo.com wrote:
                >>
                linkmaster032.. .@gmail.com wrote:
                >>
                >I tried curses.setsyx(2 ,3) in my script and it doesn't move the curses
                >cursor. Any alternatives/solutions?
                >>...
                >I added it and it still doesn't work. This is what I'm doing when I
                >want to display the cursor and prepare it for input at 2,3:
                >>
                >curses.echo( )
                >curses.curs_se t(1)
                >curses.setsyx( 2,3)
                >curses.doupdat e()
                >>
                >Any idea what's wrong?
                >>
                >http://pastebin.com/m6413db1
                >>
                >Run that and press 'n' key. It is supposed to move the cursor to 2,3
                >and it doesn't.
                Of course it does. It moves the cursor, then does an update, then
                immediately calls draw.game, which redraws the screen and moves the cursor.
                If you want curses.setsyx (or the equivalent and more mnemonic scr.move) to
                leave the cursor somewhere, you can't draw more text afterward.
                --
                Tim Roberts, timr@probo.com
                Providenza & Boekelheide, Inc.

                Comment

                • linkmaster032000@gmail.com

                  #9
                  Re: curses.setsyx() ?

                  On Sep 25, 2:39 am, Tim Roberts <t...@probo.com wrote:
                  linkmaster032.. .@gmail.com wrote:
                  On Sep 23, 4:16 pm, brad.at.sch...@ gmail.com wrote:
                  On Sep 22, 11:24 pm, Tim Roberts <t...@probo.com wrote:
                  linkmaster032.. .@gmail.com wrote:
                  >On Sep 19, 6:42 pm, linkmaster032.. .@gmail.com wrote:
                  >On Sep 19, 1:24 am, Tim Roberts <t...@probo.com wrote:
                  >
                  linkmaster032.. .@gmail.com wrote:
                  >
                  >I tried curses.setsyx(2 ,3) in my script and it doesn't move the curses
                  >cursor. Any alternatives/solutions?
                  >...
                  >I added it and it still doesn't work. This is what I'm doing whenI
                  >want to display the cursor and prepare it for input at 2,3:
                  >
                  >curses.echo( )
                  >curses.curs_se t(1)
                  >curses.setsyx( 2,3)
                  >curses.doupdat e()
                  >
                  >Any idea what's wrong?
                  >>
                  Run that and press 'n' key. It is supposed to move the cursor to 2,3
                  and it doesn't.
                  >
                  Of course it does.  It moves the cursor, then does an update, then
                  immediately calls draw.game, which redraws the screen and moves the cursor.
                  If you want curses.setsyx (or the equivalent and more mnemonic scr.move) to
                  leave the cursor somewhere, you can't draw more text afterward.
                  --
                  Tim Roberts, t...@probo.com
                  Providenza & Boekelheide, Inc.
                  OH!!!! Thank you!!!

                  Comment

                  Working...