Results 1 to 10 of 10
Like Tree1Likes
  • 1 Post By SurfMan

Thread: Locking the cursor

  1. #1
    Join Date
    Aug 2014
    Location
    South Africa
    Posts
    19
    Rep Power
    0

    Default Locking the cursor

    I want to lock the cursor/caret on a particular line as it is done in a Terminal emulator or command prompt.

    Suggestions?

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    12,059
    Rep Power
    25

    Default Re: Locking the cursor

    You'll need to give a bit of context if you hope to get any suggestions. Better still, post an SSCCE and indicate in what way it is inadequate for your purpose.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  3. #3
    Join Date
    Aug 2014
    Location
    South Africa
    Posts
    19
    Rep Power
    0

    Default Re: Locking the cursor

    Quote Originally Posted by DarrylBurke View Post
    You'll need to give a bit of context if you hope to get any suggestions. Better still, post an SSCCE and indicate in what way it is inadequate for your purpose.

    db
    What context would you like?

  4. #4
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    5,114
    Rep Power
    12

    Default Re: Locking the cursor

    Quote Originally Posted by Matthew John Dunk View Post
    What context would you like?
    ...

    Context - Definition and More from the Free Merriam-Webster Dictionary
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  5. #5
    Join Date
    Aug 2014
    Location
    South Africa
    Posts
    19
    Rep Power
    0

    Default Re: Locking the cursor

    Here it goes:
    I am building a interactive Lambda Calculus tutor , The user is given a problem and asked to propose a reduction that is performed. This checked to ensure that the reduction is valid.

    Example usage(well sort of...):
    $ The problem is : \x.x
    $ Enter a step
    $ an incorrect step
    $ That is is incorrect. Please try again.
    $ A correct step
    $ Please enter the next step.

    etc....

    Not enough?
    Last edited by Matthew John Dunk; 09-19-2014 at 03:40 PM.

  6. #6
    Hamenopi is offline Nub
    Join Date
    Sep 2014
    Location
    Houston
    Posts
    8
    Rep Power
    0

    Default Re: Locking the cursor

    Do you mean that if an incorrect step is entered, the program is to 'loop' back?

  7. #7
    Join Date
    Aug 2014
    Location
    South Africa
    Posts
    19
    Rep Power
    0

    Default Re: Locking the cursor

    Do you mean that if an incorrect step is entered, the program is to 'loop' back?
    Yes. Exactly
    Last edited by Matthew John Dunk; 09-19-2014 at 03:48 PM.

  8. #8
    Hamenopi is offline Nub
    Join Date
    Sep 2014
    Location
    Houston
    Posts
    8
    Rep Power
    0

    Default Re: Locking the cursor


  9. #9
    Join Date
    Aug 2014
    Location
    South Africa
    Posts
    19
    Rep Power
    0

    Default Re: Locking the cursor

    I know how to implement that. I want to fix the cursor
    on a line

  10. #10
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,991
    Rep Power
    8

    Default Re: Locking the cursor

    Quote Originally Posted by Matthew John Dunk View Post
    I know how to implement that. I want to fix the cursor
    on a line
    Maybe you use System.out.println() instead of System.out.print(). Println() includes a newline character and that will move the input to the next line. Hard to tell with a vague description and no code.
    Hamenopi likes this.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

Similar Threads

  1. need help in locking or synchronization
    By samanyu in forum New To Java
    Replies: 24
    Last Post: 07-06-2011, 06:19 AM
  2. change the mouse cursor - crosshair cursor
    By cassysumandak in forum New To Java
    Replies: 1
    Last Post: 09-28-2009, 01:57 AM
  3. locking strategies
    By jicxicmic in forum JDBC
    Replies: 0
    Last Post: 09-03-2009, 11:36 PM
  4. Row level locking........
    By jithan in forum New To Java
    Replies: 0
    Last Post: 09-02-2008, 07:09 AM
  5. row level locking
    By jithan in forum New To Java
    Replies: 1
    Last Post: 08-28-2008, 06:42 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •