Forum > FPC development

fpc 3.3.1 or lazarus 2.3 not working well

(1/4) > >>

edgarrod71:
I wrote a few weeks ago that using latest lazarus couldn't let me write this caret ^ nor any foreign characters like áÁéÉíÍóÓúÚüÜ.  Tested it and it let me write russian characters.  Problem seem to be SynEdit.  That was tested using BigSur.  I moved to El Capitan partition on my hard disk where I have lazarus version 2.0.12 with fpc 3.0.2 and the problem is not shown.  I upgraded fpc to 3.2.0 and everything is ok.  So I decided last night to upgrade fpc to 3.3.1 and Lazarus to 2.3.0 and the problem shows again with some addings...

For instance, I created a new project, put a TSynEdit, a TMemo and a TButton on the form, put a line to copy from Memo1 to SynEdit1 but I found that IDE doesn't put the declaration of 3 classes inside the TForm!  (I put a screen capture). 

I thought it was because of lazarus 2.3.0, but when I went to my old lazarus 2.0.12 results that same happened!   My logic points that is a fpc problem.  Any ideas?

Returning to make the app work to see if the problem of chars not showing, results that the button copies from memo "áéíóúÁÉÍÓÚ^üÜ" but when I try to write inside TSynEdit, it doesn't write them correctly, they are without the tildes.

Martin_fr:
It's (likely) not SynEdit.

There are 2 types of controls
- custom
- native

A TEdit or TMemo is native. It offers what the OS provides. It mostly can't be customized beyond that (e.g. you can't easily add colors to a memo). The key handling is passed through, the LCL (lcl/wigdetset) does not do much to the keys.

SynEdit is custom. It is all in Pascal, and can be changed. All key handling however is done in lcl/wigdetset.

So whatever causes the issue, is then (most likely) affecting all custom controls.

edgarrod71:
I can write tilde chars on any customcontrol, but not on SynEdit.  AFAIK FreePascal uses SynEdit for the Source Code window and other forms.

What I'm worried now is about why the IDE is putting the unit of SynEdit but not SynEdit1: TSynEdit; inside TForm

Martin_fr:
I don't use Mac, so I can't test.

The previous mention however, applies in the same way to all OS, hence it is information I could supply. And it has in the past in similar ways happened on Linux.

Anyway, if you are 100% certain that all other custom controls work (e.g. AtSynEdit / mind that many grids, albeit custom, do use a normal TEdit for input, and therefore their input is actually not custom).
So if you are certain, then it might be a conflict with the configured keys.

In the IDE they are in Tools > Options > Editor > Keymap.
In TSynEdit on your own app, the object inspector will list them as a property "KeyStroke" (IIRC) of the SynEdit.

If any key matches the physical key that triggers the accent, the that key will be used on its own, and never mades it as accent. The key may in the list appear with some generic description (according to VK codes, or some default keymap / I am not sure about how it will be labelled)
Simple clear *all* codes from KeyStrokes and test.



--- Quote ---What I'm worried now is about why the IDE is putting the unit of SynEdit but not SynEdit1: TSynEdit; inside TForm
--- End quote ---

Does that also happen with a brand new project?

- Usually that points to a problem parsing the rest of the code in the unit. Though in that case an error dialog should pop up.
- As for Lazarus 2.3 there was a recent fix (this week) regarding a maybe related issue, where sometimes the projects package list wasn't updated.

Also mind, that fpc 3.3.1 can be unstable at times. At current I know of at least one bug in it, that actually generates wrong asm code for some projects. It shouldn't affect SynEdit, but I don't know about lcl/widgetset. https://gitlab.com/freepascal.org/fpc/source/-/issues/40165

edgarrod71:
One curious thing is when I delete de components on form, the component declaration lines inside TForm added by hand are deleted by IDE! (it is supposed to do) :D   

Checked the advise about Tools keymapping and it's not the problem.  Put a SynEdit component on a brand new project form and deleted all keystrokes, problem continues. 

Changed to Russian Keyboard and it prints the ^ caret.  But Spanish, even English Keyboard cannot.  I put a screen capture image to show with comments, and app running.

Navigation

[0] Message Index

[#] Next page

Go to full version