1. Text Editor RIGHT-->LEFT

Hello all!

I am planning about coding a text editor (for Fido Style messages) on Hebrew
and English. The main purpose will be the hebrew language, that is written
from right to left.
I am VERY new to Euphoria, and have no clue where to begin. Can someone give
me a little help about where and how to begin, how scan the ASCII codes,are
they hebrew/english letters and etc.
Thanx in advance.
Izchak Aronov.

new topic     » topic index » view message » categorize

2. Text Editor RIGHT-->LEFT

*** Reply to note of 01/23/97 10:38
you certainly chose a *hard* program for someone who is new to Euphoria.
i'd take a look at 'ed.ex' for an example of how one is written.

do you intend your users to be using english or hebrew keyboards? will you
be displaying english or hebrew letters?

-- david cuny

new topic     » goto parent     » topic index » view message » categorize

3. Re: Text Editor RIGHT-->LEFT

>you certainly chose a *hard* program for someone who is new to Euphoria.
>i'd take a look at 'ed.ex' for an example of how one is written.

Well, yeah, it's written very difficult to understand.

>do you intend your users to be using english or hebrew keyboards? will you
>be displaying english or hebrew letters?

Nope. Every computer in Israel has built-in Hebrew support.. The only think
I have to do, is to make an editor that will read the keys and show which
key was pressed on the other direction, from right to left.

Do you have any idea where to begin? :)

new topic     » goto parent     » topic index » view message » categorize

4. Re: Text Editor RIGHT-->LEFT

*** Reply to note of 01/24/97 08:55
the editor's complex because there are a lot of little things that an editor
needs to do.

for example, do you want to wrap words to the next line when the user reaches
the end of a line? this is complex: you read the text one word at a time, and
wrap to the next line if the current word does not fit on the line. but if the
word is longer than the line, you have to break it.

it's hard to write an example that does not get complex *very* fast.

here are some hints, though:

first, decide how you will internally represent the information. will it be
line based, word based, character based, or somthing else. make sure the
way you represent the information will allow you to do things you will want
to do in the editor: cut and paste, search, etc.

for example, storing text as a sequence of lines is fine for a editor if
it's going to be used for writing computer programs. but if it's going to
be used for word processing, you probably need a better level of granularity.

next, write the display routine. put some data in the structure, and display
it on the screen. then position the cursor.

now you can write the cursor positioning routines: move the cursor up a line,
down a line, forward and backwards. the key loop is simple:

   while not QUIT_PROGRAM do
      char = wait_key() -- wait for a key
      if char = UP_ARROW then
         -- up arrow code
      elsif char = DOWN_ARROW then
         -- down arrow code
      ...
      end if
   end while

that's all there is to it. you just need to keep adding commands to the
key loop.

good luck!

-- david cuny

new topic     » goto parent     » topic index » view message » categorize

5. Re: Text Editor RIGHT-->LEFT

> Nope. Every computer in Israel has built-in Hebrew support.. The only think
> I have to do, is to make an editor that will read the keys and show which
> key was pressed on the other direction, from right to left.
>
> Do you have any idea where to begin? :)
>
>

I would just try using get_key() to get the keyboard input and then
write a routine to handle putting it on the screen from right to
left.  But that is just me thinking, and I haven't contributed much.

andy

new topic     » goto parent     » topic index » view message » categorize

6. Re: Text Editor RIGHT-->LEFT

At 08:25 PM 1/23/97 +0200, you wrote:

>I am planning about coding a text editor (for Fido Style messages) on Hebrew
>and English. The main purpose will be the hebrew language, that is written
>from right to left.

Okay...

>I am VERY new to Euphoria, and have no clue where to begin. Can someone give
>me a little help about where and how to begin, how scan the ASCII codes,are
>they hebrew/english letters and etc.
>Thanx in advance.
>Izchak Aronov.

Aren't we all!  Look, first things first, a hebrew/english text editor is not
exactly the project to someone VERY new to Euphoria.  Great idea, though!  One
problem is that Euphoria probably doesn't support the built-in hebrew on your
computer, so you first have to find a way to mesh it in there. (don't ask me,
I'm new too!) If you want my opinion, try making a just-english text editor
first, then go ahead and try making a hebrew one.  Only if you can make
these should you try to mix them together.  Good Luck!
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The Reaper  (J. Lays)      http://www.dragonfire.net/~TheReaper/
reaper at auracom.com  ........................
               . .. -||..........__......  "There are no miracles,
                . /  ||......../-- \\.::::  Just dreams that come true,
             . ..|   ||...... / o o| |.:::  By the actions of someone
               .|  _-||.......||   / /.:::: Who didn't waste time dreaming."
              ..| |..||...... -\_  \ |\-.:::
               .| |.[< \ .../            \.::
                .||.|||\|\ |           .  \.::::
               ...|.\|| |  \  |        |   |.:::.
              . .....|||_      |       /    |.::.
                 . ..||/..-__\   ---  |     |.::::.
                   ..||.......|.__         |.:::::::.
                    .||.......|           /.::::::.....
                  ...||......|          /.::::::::::...
                 . ..||......|          |.::::::
                   ..||......|          |.::::::::::.
                  ...||.....|            |.::::::....
              . .....||.....|             |.:::.......
              ------ || --- |             | ----------
                     ||     |

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu