Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: How to: create DLL file for Windows 10 64-Bit Pro
« Last post by paule32 on Today at 09:24:19 pm »
in general, you would not making a question on a question.
That is not gentle.

I can not ask your question's, because I don't know that FPC needs so many compilerproc functions, and procedures.
As such, I would be expect, that FPC sould me let to make/compile my own stuff.
As such, I would be expect, that you can help me with working things.

For me, I can not claim, that you give anything.
But I would expect solutions (so little they are) - and not the things like: "use existing code.".
2
Please let me have a checkbox "display in dateformat".

Often I have data in the format double, e.g. 45122.

That should now be fully possible in 3.99. See image.

In the image, it has been set to show both, the human readable date, and the float. That can be configured. (red box)

You can also configure the format for the date (see https://www.freepascal.org/docs-html/rtl/sysutils/formatchars.html ). (green box)
Different formats can be given for each type (TDate, TTime, TDateTime). So you can decide what happens if a TDate has a time different from 0.

You can add other types (yellow box), if you have your own
Code: Pascal  [Select][+][-]
  1. type TMyTime = double;


You can also repeat the config, and add different setting for different nest levels. That is values shown in the array could be shown shorter.
If the array gets expanded (and each element listed in its own line) then those expanded values are at nestlevel = 0 (top level).
But in the single line display, where all array entries are coma separated, they are at level=1 (or in the case where the array is in a record, they are at level 2)

You can also set the formatter for each watch. (blue box / watch properties)
- You can disable the formatter
- You can choose a specific one (if you have set up formatters with different format-string yyddmm...)
- You can set up formatters inactive (Not checking the checkbox in the options list), and those will not be applied unless specifically selected in the watch properties)

There is a topic on "value formatters" https://forum.lazarus.freepascal.org/index.php/topic,66186.0.html


From the thread https://forum.lazarus.freepascal.org/index.php/topic,66398.msg508570.html#msg508570

It would be nice if the characters in a null terminated array of characters were displayed without single quotes and without commas separating them.

I added a value formatter, that will show an array of char as string.

You can add the value converter (global or per project).
- To add a new formatter, first select the type-of-formatter in the drop down, then press add.
- "match type by name" (brown box) you would probably want an "*", so it acts on any typename. (It will only act if it is an array of char).
- There is a checkbox (brown box), to select if it should stop at the last char before the first #0  encountered.
- You do want "Replace/Hide original value", or the array data is shown on the same line before/after the string.

It only changes the displayed value (and what gets copied to clipboard). At current it does not prevent the watches window from showing a [ + ] symbol to expand the array.

Please test.
3
General / Re: Converting a string/index to upper/lower ...
« Last post by 1HuntnMan on Today at 08:48:12 pm »
WP, with my testing on this project, mostly from a fellow photographer, you can see from the 2 procedures that I provided, the user is selecting an Index.  Then they use the JvDBSearchEdit to context search via the Index they selected from the DBLookUpCombo.  So they are searching by index.
For example if the user selects Client Name in the DBLookupCombo and then tabs to the JvDBSearchEdit and starts typing for example the Client "Asheville Photography Gallery".  When they select to search by Client Name the Index for the table is set to CUSTOMER.  So, he starts typing to find "Ash..." the second he types the letter 'a', it should move the pointer in the table to the first Client that begins with the letter 'a' but even though in the property of the JvDBSearchEdit is set to CaseInsensitive and also the index CUSTOMER which is also set to ixCaseInsensitive, if he types 'a' nothing happens because there is no Customer stored beginning with a lower-case 'a'.  In the test data, all the customers are stored with the first letter capitalized, i.e. Asheville vs. asheville.  He has to capitalize the first letter A and the pointer jumps directly to Asheville Photography Gallery because it happens to be the first customer starting with a capital A in the table.  But, if he types a lowercase 'a', nothing happens because he didn't type capital A.  So, don't understand totally why this is happening when the CUSTOMER field is indexed ixCaseInsensitive and also the JvDBSearchEdit property is also set to CaseInsensitive.  It should find Asheville no matter if the user types 'a' or 'A' ...
4
General / Re: How to: create DLL file for Windows 10 64-Bit Pro
« Last post by TRon on Today at 08:40:06 pm »
Question is: how to fix the error above ?
Question in return: is there a particular reason to ignore the already existing implementation(s) and invent your own (instead of copy-pasting the bits that you require) ?

Beside that, if you made no modifications to correct the writefile issue reported earlier then you got bigger fish to fry. In that case it does not matter how these compiler procs are implemented as there is fundamentally something wrong with the code as presented (and it will keep crashing, again as it should).
5
General / Re: Linux Workspaces -- StayOnTop?
« Last post by AmatCoder on Today at 08:34:20 pm »
Are you tried on a pure Wayland session? Without XWayland?
(XWayland is a X11 emulation layer under Wayland.)

Let's see:
Sticky is a Python/Gtk3 app. It uses gtk_window_stick() function.

gtk_window_stick() goes to gdk_x11_window_stick on X11 and to gdk_wayland_window_stick on Wayland.

As you can see gdk_wayland_window_stick function is empty so it does nothing.
6
General / Re: How to: create DLL file for Windows 10 64-Bit Pro
« Last post by paule32 on Today at 08:15:55 pm »
Hello @all:

I thinking over to came to the problem hot spot.
The RTL compilerproc function's may be give wrong result.
Now, WriteFile will not cause a crash.

And as such, I get in trouble with:

Code: Pascal  [Select][+][-]
  1. function  fpc_char_to_ansistr(const c : char): AnsiString; compilerproc;
  2. var
  3.     dest: PAnsiString;
  4. begin
  5.     dest := PAnsiString(c);
  6.     result := AnsiString(dest^);
  7. end;
  8.  
  9. function fpc_pchar_to_ansistr(
  10.     const p: PChar): AnsiString;
  11.     compilerproc;
  12. var
  13.     index: DWORD;
  14.     cchr : PChar;
  15.     DestS: AnsiString;
  16.     SLeng: DWORD;
  17. begin
  18.     SLeng := 0;
  19.     while true do begin
  20.         if p[SLeng] = #0 then
  21.         break;
  22.         SLeng := SLeng + 1;
  23.     end;
  24.     index :=  0;
  25.     DestS := '';
  26.     while index >= SLeng do begin
  27.         cchr  := PChar(p[index]);
  28.         DestS := DestS + cchr;
  29.         index := index + 1;
  30.     end;
  31.     result := DestS;
  32. end;

Code: Bash  [Select][+][-]
  1. FPC_System.pas(127,26) Error: Wrong number of parameters specified for call to "$fpc_pchar_to_ansistr"
  2. FPC_System.pas(110,11) Error: Found declaration: $fpc_pchar_to_ansistr(const PChar):AnsiString;
  3. system.pas(75) Fatal: There were 2 errors compiling module, stopping
  4. Fatal: Compilation aborted

Question is: how to fix the error above ?
7
General / Re: How to: create DLL file for Windows 10 64-Bit Pro
« Last post by TRon on Today at 08:11:24 pm »
When people want to know how a specific Windows API function operates, they don't come here, they don't look at how it is defined in the FPC units, they go to the author, that is MS and read the spec and code the calls as called for the spec.  You're right, there is absolutely nothing to argue about.  The Pascal definition is _wrong_, period.  Proof: code as spec'ed and you'll get a violation.
+1

With the sidenote that usually I first check the jedi declaration so that I do not have to do it myself because I'm a lazy as F*. :)
8
Для того чтоб люди заинтересовались вашей игрой, вы должны сделать минимальный обзор игры. Один из лучших вариантов - это сделать видеообзор. Человек посмотрит и сможет решить имеет ли смысл брать игру или нет.

-----------------
Google translate:
In order for people to become interested in your game, you must provide a minimal review of the game. One of the best options is to do a video review. A person will look and be able to decide whether it makes sense to take the game or not.
9
FPC development / Re: what to do if my target MIPS cpu has no FPU
« Last post by Thaddy on Today at 07:54:39 pm »
But I am on topic.
10
Thank you. A lot of information there for me to think about. I will certainly consider Steam.
I thought my landing page got the idea across, but I have been staring at this project for months and I am very familiar with it. It's probably very difficult for me to see it from the eyes of a newcomer.
It's very true what you said about considering the investment against the return for smaller sites. Gamejolt for example is just white noise of low quality games.

I have uploaded the windows version. Getting to release on both windows and linux with a relatively small porting effort was one of the main reasons I chose freepascal and lazarus.
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018