School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 300,420 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,528 people online right now. Registration is fast and FREE... Join Now!




Flashing line?

 

Flashing line?

RandCode

23 Oct, 2008 - 07:53 AM
Post #1

New D.I.C Head
*

Joined: 23 Oct, 2008
Posts: 7


My Contributions
I've started like couple of days ago to study seriously Ruby, and what i asked myself is:
How is possible to make those characters like flashing lines you see in
C:\ _
and then you type and you have always that line over the last character.
I'm interested in the fact on how actually Ruby can write and change something already printed.

I know about puts and print, but those one shows and goes under the line, am I correct?

So how can I do a thing like that?
Is that an hard thing to do?

User is offlineProfile CardPM
+Quote Post


janotte

RE: Flashing Line?

6 Dec, 2008 - 04:59 AM
Post #2

code > sword
Group Icon

Joined: 28 Sep, 2006
Posts: 2,157



Thanked: 152 times
Expert In: C/C++

My Contributions
I don't understand most of your question but thought you might get further by knowing that 'the flashing line' you are talking about is called a 'cursor'.

http://en.wikipedia.org/wiki/Cursor



User is offlineProfile CardPM
+Quote Post

FredT

RE: Flashing Line?

10 Dec, 2008 - 12:03 PM
Post #3

New D.I.C Head
*

Joined: 25 Jul, 2008
Posts: 4


My Contributions
I really don't know much about Ruby, but I would have to say that considering Ruby is a server side language, I would say you can't change things after the page loads, unless you use AJAX (which I assume you can use with Ruby). Nevertheless, AJAX isn't going to do anything to create a cursor... you don't need to refer back to the server at all.

You are going to need to use a client side scripting language (javascript) to create something like this. Post this question in the Javascript forum and you will probably get some great help there.

By the way, do you know any javascript? Where would the user be typing this message? In a text area? A little more info would be helpful.

Again, I don't know much about Ruby, but that is my view.

EDIT: WOOPS! I thought you were taking about Ruby on Rails... disregard this whole post, unless you really were talking about RoR.

This post has been edited by FredT: 10 Dec, 2008 - 06:04 PM
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/8/09 12:07AM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month