Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2008-10

Problem with editor

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Johann Spies

I am a total newbie with Lazarus, but not to programming. I has been my hobby for years and I have at times played with Turbo Pascal, Dbase III+, Basic, Turbo Prolog, Python, Ruby, Ocaml and others.

I have the following problem with Lazarus - illustrated by the following two lines. The first was entered using vim, the second (using the same keystrokes) using the Lazarus IDE. The second line would not compile.

  Button1.caption := 'Press again';
  Button1.caption := ?Press again?;

I would like to know where I can set the preferences of the editor to correct this.

Regards
Johann

Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "Blessed is the man that endureth temptation: for when he is tried, he shall receive the crown of life, which the Lord hath promised to them that love him." James 1:12

Reply by email

ik
to Johann Spies

It happened to me as well. It seems that VIM (or a web site you copy from) is using a specific unicode char for ', while FPC expect the ASCII value of ', and does not know about other types of ' .

Ido

Johann Spies wrote 30 lines
I am a total newbie with Lazarus, but not to programming. I has been my hobby for years and I have at times played with Turbo Pascal, Dbase III+, Basic, Turbo Prolog, Python, Ruby, Ocaml and others. I have the following problem with Lazarus - illustrated by the following two lines. The first was entered using vim, the second (using the same keystrokes) using the Lazarus IDE. The second line would not compile. Button1.caption := 'Press again'; Button1.caption := ?Press again?; I would like to know where I can set the preferences of the editor to correct this. Regards Johann -- Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "Blessed is the man that endureth temptation: for when he is tried, he shall receive the crown of life, which the Lord hath promised to them that love him." James 1:12 _______________________________________________ Lazarus mailing list http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply by email

Mattias Gärtner
to Johann Spies: I am a total newbie with Lazarus, but not to programming. I has been my hobby for years…

Zitat von Johann Spies :

Show quoted text 14 lines
I am a total newbie with Lazarus, but not to programming. I has been my hobby for years and I have at times played with Turbo Pascal, Dbase III+, Basic, Turbo Prolog, Python, Ruby, Ocaml and others. I have the following problem with Lazarus - illustrated by the following two lines. The first was entered using vim, the second (using the same keystrokes) using the Lazarus IDE. The second line would not compile. Button1.caption := 'Press again'; Button1.caption := ?Press again?; I would like to know where I can set the preferences of the editor to correct this.

My first guess is, that you type the wrong keys and vim is fixing this automatically and Lazarus does not.

What OS, lazarus version, widget set, window manager, language, keyboard layout do you use?

Mattias

Reply by email

Johann Spies
to Mattias Gärtner
Mattias G?rtner wrote 8 lines
> Button1.caption := 'Press again'; > Button1.caption := ?Press again?; > > I would like to know where I can set the preferences of the editor to > correct this. My first guess is, that you type the wrong keys and vim is fixing this automatically and Lazarus does not.

I typed the ownly possible keys to produce the required characters.

What OS, lazarus version, widget set, window manager, language, keyboard layout do you use?

Sorry, I realised that I should have provided it in the first place:

Ubuntu Hardy
Gnome
Keyboard: us_intl
locale: af_ZA

Regards
Johann

Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "Blessed is the man that endureth temptation: for when he is tried, he shall receive the crown of life, which the Lord hath promised to them that love him." James 1:12

Reply by email

Graeme Geldenhuys
to Johann Spies
Johann Spies wrote 9 lines
> > Button1.caption := 'Press again'; > > Button1.caption := ?Press again?; > > Ubuntu Hardy Gnome Keyboard: us_intl locale: af_ZA

Lets try and eliminate the keyboard layout first... Run the following. You can use Copy & Paste after it changes to Dvorak (if you don't know Dvorak layout).

Open a Terminal window (console, gnome-terminal, xterm etc...). CD to your Lazarus root directory and run the following.

xmodmap /usr/share/xmodmap/xmodmap.dvorak
./lazarus

The single quote (') key will be the qwerty lowercase "Q" key. Type a few in Lazarus and see what happens.

You can then reset your keyboard layout using the following. Copy & Paste might help again. ;-)

xmodmap /usr/share/xmodmap/xmodmap.us

I believe US-Intl layout is different to the standard US layout. Now launch Lazarus again and type in some single quote keys. If the quotes work now, it's the layout. To change back to US International, run the following.

xmodmap /usr/share/xmodmap/xmodmap.us_intl

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Johann Spies
to Graeme Geldenhuys
Graeme Geldenhuys wrote
Lets try and eliminate the keyboard layout first... Run the following.

Thanks. It is the keyboard layout causing this. I will just use a wrapper-script for starting lazarus.

Regards
Johann

Johann Spies Telefoon: 021-808 4036 Informasietegnologie, Universiteit van Stellenbosch "Let no man say when he is tempted, I am tempted of God: for God cannot be tempted with evil, neither tempteth he any man: But every man is tempted, when he is drawn away of his own lust, and enticed." James 1:13,14

Reply by email