* * *

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: ShowModal problems...
« Last post by Mark- on Today at 07:55:09 pm »
OK.
Here is the test project.
The first time I ran it no problem.
Second time problem.
If the main window does not appear darker, no problem, when it does problem. Same for IDE.

Two screen capture of IDE with same issue.
https://ibb.co/d4bJhU
https://ibb.co/jTYW2U
2
General / Re: code source window vanished
« Last post by furious programming on Today at 07:41:34 pm »
Is there a configuration file for the IDE that will rebuild to default if I delete it?

All configuration files for IDE are stored in local app data folder—read more about locations. Remember to make backup of these files before modifying them. In case something goes wrong, you will be able to restore some.

Some folders are hidden, so you need to change settings of file explorer in your system to see them.
3
General / Re: array initialization
« Last post by furious programming on Today at 07:30:06 pm »
You can use open array of record as parameter, for example:

Code: Pascal  [Select]
  1. uses
  2.   Types;
  3.  
  4.   function Sum(const APoints: array of TPoint): Integer;
  5.   var
  6.     Point: TPoint;
  7.   begin
  8.     Result := 0;
  9.  
  10.     for Point in APoints do
  11.       Result += Point.X + Point.Y;
  12.   end;

but you need to have a function, that returns record, if you need to pass an array of values to function:

Code: Pascal  [Select]
  1. Write(Sum([Point(2, 2), Point(3, 3), Point(4, 4)]));

The Point above is a function from Types unit, that returns a TPoint structure, based on X and Y coords.
4
General / Re: ShowModal problems...
« Last post by Mark- on Today at 07:28:01 pm »
Hi,

Thanks for the response.
I was thinking to do that just to verify it is not something in my project.
And while I was creating the project, I selected the "save project as" menu item and the save dialog appear.

Guess what? Moving the dialog moves the Lazarus main top window (which is darkened).

Mark
5
General / array initialization
« Last post by fcu on Today at 07:21:26 pm »
Hi
is it possible to do the same initailization with array of record ?
or this is juts for primitive types ?

Code: Pascal  [Select]
  1. function sum(ps : array of byte): longint;
  2. var i : longint;
  3. begin
  4.  result := 0;
  5.  for i:= 0 to high(ps) do
  6.   result += ps[i];
  7. end;
  8. begin
  9.  writeln(sum([1,2,3,4,5]));
  10.  readln;
  11. end.
  12.  
  13.  

6
General / Re: ShowModal problems...
« Last post by howardpc on Today at 07:19:39 pm »
Attach a little compilable example that is problematic for you (Project->Publish Project), and see if anyone else can replicate the behaviour you see.
7
General / ShowModal problems...
« Last post by Mark- on Today at 07:05:55 pm »
Hello

Latest version of Lazarus and FPC, running on Debian (32) with Gnome (3.14.1).

I have a main form.
I create another from (form2) and display it using ShowModal.
1) Form2 is always centered on the main window regardless of the position property.
2) Setting the top or left property has not effect.
3) Selecting the title bar of form2 and moving the window also moves the main form. Too odd.  :o

Does the same while debugging or standalone.

Ideas?

Thanks,

Mark
8
General / Re: Pointer sintaxis and keyboard
« Last post by Thaddy on Today at 06:51:35 pm »
Code: Pascal  [Select]
  1. type
  2. PtrInteger = ^integer; // not type PtrInteger = ˆinteger;
  3.  

'~' is illegal. You want '^'
Also note that this particular type PInteger is already declared by the RTL, as are all pointers to simple types....

9
General / Re: code source window vanished
« Last post by ronhud on Today at 06:26:26 pm »
no centers doesnt help.  Under the Window menu there are tabs listed for all the units I had open.   Is there a configuration file for the IDE that will rebuild to default if I delete it?
10
General / Re: Too many cycles
« Last post by marcov on Today at 06:25:15 pm »
hoist  s:=(RoundTo(i / 3, -2)):4:2,' ',
                    {FloatToStr}(RoundTo(j / 4, -2)):4:2,' ',

out of the inner loop?
Pages: [1] 2 3 ... 10

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus