Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
Thanks, TWaveformGraph(FParent).Chart.Refresh in
Code: Pascal  [Select][+][-]
  1. function TPlotAreaSize.GetWidth: integer;
  2. begin
  3.   TWaveformGraph(FParent).Chart.Refresh;
  4.   Result := TWaveformGraph(FParent).Chart.ClipRect.Width;
  5. end;
seems to solve the issue!
2
the ability to manipulate an array of constants, i.e. the number of its elements (adding, deleting) and its contents (changing the value of a specific cell) is a definite disadvantage. An array of constants should not be modifiable. Otherwise it's basically no different from a regular dynamic array.
If that is a requirement then it is not possible to use a typed const as that is known/documented behaviour.
3
So Can you write a correct linker example file to link all pascal files together?I will refer to it and write my own.
And how to use the internal linker of fpc,which format of EFI file it is?
I have add ConsoleOutHandle to my uefi.pas

No, I don't have time to do that with binutils. The documentation seems non-existing

I attached a zip in the previous post with all the files and a modified build.sh that builds everything with only FPC.
Ok,I will try this.If I encounter any error,I will report to you.
4
So Can you write a correct linker example file to link all pascal files together?I will refer to it and write my own.
And how to use the internal linker of fpc,which format of EFI file it is?
I have add ConsoleOutHandle to my uefi.pas

No, I don't have time to do that with binutils. The documentation seems non-existing

I attached a zip in the previous post with all the files and a modified build.sh that builds everything with only FPC.
5
General / Re: Arabic text, problem on Linux
« Last post by marius.maximus on Today at 12:59:47 pm »
How is that text drawn? Is it the Caption of a TLabel or TStaticText? Or is it drawn by Canvas.TextOut/.TextRect? In the latter case, is the text drawn as one string, or character by character?
It is Caption in TLabel 
6
There seems to be some problems in how the PE Executable is linked in the manner you do it. When using the internal linker in FPC it works fine (requires a bit of hacking)

Other than that you have a bug in your efi type definitions. You are missing ConsoleOutHandle

I have attached a version that works fine for me with a trunk compiler. It compiles uefimain as a DLL instead of an executable just to illustrate that it can exit, but the compiler hardcodes the PASCALMAIN entry as no_return for EXEs (it messes up the stack if it does exit and just crashes after fpc_do_exit)
So Can you write a correct linker example file to link all pascal files together?I will refer to it and write my own.
And how to use the internal linker of fpc,which format of EFI file it is?
I have add ConsoleOutHandle to my uefi.pas
7
General / CORBA interface and Variants
« Last post by JdeHaan on Today at 12:51:37 pm »
Hi,

For various reasons I use CORBA interfaces. In my code I also use Variants, to support different types of value in a variable. This may include an interface value.

At some point I need to check if a Variable (of type Variant) is a (CORBA) interface. I use the following code for that:

Code: Pascal  [Select][+][-]
  1. isSymTabEntry := VarSupports(Value, StringToGUID(ISymTabEntry_GUID), SymTabEntry);
  2.  
Here, Value is a variable of type Variant,
ISymTabEntry_GUID, is a string constant, such as:
'{DCD95BA9-90CB-9AA2-0090-DBA0749AF179}'
and SymTabEntry is a CORBA interface ISymTabEntry, defined as :

Code: Pascal  [Select][+][-]
  1.   ISymTabEntry = interface
  2.     [ISymTabEntry_GUID]
  3.     function getName: String;
  4.     //etc…
  5.   end;
  6.  
It doesn’t seem to work. Function getName produces the GUID string constant instead of the name of the SymTabEntry…
Could it be that only COM interfaces can be used with VarSupports?

Is there maybe another way of retrieving an Interface value/variable from a Variant value?

Any suggestion is appreciated.

Regards, J



------------------------------
I use trunk Lazarus and FPC on MacOS Sonoma
8
IIRC, the package "sqlite3laz" which is accessible for installation in "Package" > "Install/uninstall packages", requires the sqlite3.dll to be either in the correct system directory or in the Lazarus directory; otherwise the IDE won't start. On the other hand, when you need sqlite3 you can use the SQLDB library which is installed by default (tab "SQLdb") and does not have this limitation.
9
Now I understand a bit more what you want to achieve.

TAChart starts with the size given to it by its Width and Height properties. Then, in the Draw method (which is called from the Paint cycle), it does all its internal size calculations to fit all its elements into this given rectangle. The ClipRect is only known afterwards. So, I think you can solve your issues by FIRST forcing the chart to draw itself; but don't call Chart.Invalidate which is delayed and not executed immediately; Chart.Refresh maybe should do.

10
There seems to be some problems in how the PE Executable is linked in the manner you do it. When using the internal linker in FPC it works fine (requires a bit of hacking)

Other than that you have a bug in your efi type definitions. You are missing ConsoleOutHandle

I have attached a version that works fine for me with a trunk compiler. It compiles uefimain as a DLL instead of an executable just to illustrate that it can exit, but the compiler hardcodes the PASCALMAIN entry as no_return for EXEs (it messes up the stack if it does exit and just crashes after fpc_do_exit)
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018