Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: Generics - correct syntax
« Last post by VisualLab on Today at 10:23:16 am »
I don't know what to tell you?

Basically the question was for people who know something about the documentation detailing generic types in FPC mode. Of course, I do not rule out that there is no detailed documentation on this subject. Still, it would be very useful. Programming using the "Macayev method" (also known as the "Grope method", "battle reconnaissance" or "trial and error :)) is ineffective and error-prone.
2
Editor / Re: match automatic highlight on NON matching text?
« Last post by Чебурашка on Today at 10:07:45 am »
Maybe there should be options for:
- toggling "highlight current selection"
- disable during search and replace

This is what I hoped...

There are some other ways of renaming stuff.

I know that there are some refactoring tools, but I am not confident in them. I my programming life I had bad experiences with blind renaming, so I never use them. Maybe because when I started doing software I used very poor tools.
3
Editor / Re: match automatic highlight on NON matching text?
« Last post by Чебурашка on Today at 10:04:24 am »
Btw, and without wanting to interfere with your teams guidelines, but have you considered: AnObject instead of Aobject ?

Simply we set the convention that all parameters class methods must start with A<something>, regardless of what is after. Then for classes, the fields with start with F<something> while when exposed they will be just <Something>. We extended the A rule also to all procs.

Of course AnObject is a more elegant English, but then one has to think about when the AnObject has to be tranformed into ASome/Many/Multiple/SeveralObjects or AnObjectsList in case input becomes a list. I prefer a simpler Aobject/Aobjects, taste.

4
General / Re: Compile/Convert Delphi project to MacOS
« Last post by TRon on Today at 09:59:52 am »
Hello :D,
Hi !

Quote
Any hint or help would be highly appreciated  :D
See thread.
5
General / Compile/Convert Delphi project to MacOS
« Last post by Joseph on Today at 09:49:15 am »
Hello :D,

(beginner's question) I have a compiled Delphi project that works as expected on a Windows. I'd like to use the source code to compile it for the Mac as well, but I'm at a sticking point.

The project basically contains 6 .pas files and 1 .dpr file.

I have installed Lazarus (following the tutorial here
https://wiki.lazarus.freepascal.org/Installing_Lazarus_on_macOS), then FPC.

I then converted the Delphi project into a Lazarus project using the tool provided in Lazarus. It worked as expected (some modifications in the files and appearance of a .lpr as well as .lpi etc).

I then try to compile the project. I've tried both "Compile" and "Clean up and Build", but both lead to the same errors after about 10/15 seconds of compilation:

- Error: -macosx_version_min has been renamed to -macos_version_min
- Error: linker: Undefined symbols for architecture x86_64:
- Error: linker: "WSRegisterBevel", referenced from:
- Error: ld: symbol(s) not found for architecture x86_64
- and finally: Error: Error while linking

There is definitely something related to the linker, but I can't find what the problem actually is and/or what should I do.

I should point out that I've managed to compile and run simple hello world type programs without any problems.

I use:
- MacOS Sonoma 14.4.1
- Lazarus 3.2
- FPC 3.2.2

Any hint or help would be highly appreciated  :D
6
Editor / Re: match automatic highlight on NON matching text?
« Last post by Martin_fr on Today at 09:44:52 am »
Btw, and without wanting to interfere with your teams guidelines, but have you considered: AnObject instead of Aobject ?
7
Editor / Re: match automatic highlight on NON matching text?
« Last post by Martin_fr on Today at 09:42:58 am »
That would be "Highlight current word".

If you normally edit the text, then whatever word is at the text-cursor (caret) is highlighted everywhere in the text (after a 1 second wait time).

You can find the settings under Tools > Options > Editor > Color: "Highlight current word"
Simple "uncheck" the colors (foreground/background/...) and it stops.
Also under Tools > Options > Editor > Markup and Matches: you can set the time, and minimum length for full words. But if you select text, it is always the selection.

Maybe there should be options for:
- toggling "highlight current selection"
- disable during search and replace




There are some other ways of renaming stuff.

Refactor "rename identifier"
Source editor, context menu > Refactoring   OR menu: Source > Refactoring.

Syncro edit: https://wiki.freepascal.org/New_IDE_features_since#Syncron-Edit
Select the entire procedure, then click the icon in the gutter or use ctrl-j.
Any word that appears more than once, will be in a "box". Editing it in one place will edit all others.

8
Suggestions / Re: add new targets to make
« Last post by Key-Real on Today at 09:38:23 am »
I added the new Target to fpcmmain.pp,
hope I did this right, at least the compiler compiles :)
what about fpcmake.ini?

still wanna compile the rtl...
9
macOS / Mac OS X / Re: Debugger crashes with Apple Silicon code
« Last post by Martin_fr on Today at 09:29:46 am »
It is possible that this is a timing issue. I.e., the IDE sends the commands faster than a human...

I was not able to reproduce it myself (for the limited testing I can do...)

When last discussed, I proposed a patch for testing, but did not get feedback (neither ok no  not ok).
One version of the patch is here
https://gitlab.com/martin_frb/lazarus/-/commit/092c51fc6fed9efb73e4e05778e31fdbb079caea

And that is the preferred version, as it only waits if the error happens.
It may need tweaking => please try the sleep with a factor of 50 or 30 instead of 100, and report what works (if any).
For each sleep time, check in the log, how often "process launch" was send (minus the echo).

If that does not work (not even with a sleep time factor of 500), then go a few lines down in the same file, and find
    constructor TLldbInstructionProcessLaunch.Create(AOpenTerminal: Boolean);
as first line in the constructor add a sleep(3000)
And see if that works (if yes, reduce the time as much as possible).



10
Editor / match automatic highlight on NON matching text?
« Last post by Чебурашка on Today at 09:17:08 am »
Hello,
I am doing a code refactoring in order to comply with a new coding standard I decided with my team.

One of my modifications is this: substitute a parameter of a procedure whose name was "o" (was a o: TObject) with "Aobject". Please nobody laugh on "o" (facepalm).

Now my problem is this: I did a replace on local file "o" to "Aobject" with case sensitive and whole word options checked and it works. But since I must be sure of each swap I need to give confirmation of each replace. The problem is that when a match is found, it is automatically selected for being replaced, but along with it, there is also a plenty of NON matches partially highlighted. Why is lazarus showing those invalid ones? What is the sense? Can I prevent this from happening?

The lazarus I am telling in this post is the one written below for Linux (2.0.10)

ADDENDUM: I know that the feature comes from the automatic highlighting of the selected text, but since the selected text in turn comes from the search itself, I believe it would be more smart to link it to the options asked by the user, that include case sensitivity and whole word in this case.


See attached picture.
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018