Recent

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Re: Dynarray initialization pattern
« Last post by Martok on Today at 05:39:03 pm »
Managed types - like in this case dynamic arrays - always have valid values. If not, it's a bug.
No weird corner cases? This is extremely good to know, thanks.

Do you happen to know if DFA knows/counts this "assignment"? Not neccessarily for optimization, but for the initialized logic checks.
2
I added delay(500) before the call and that seems to have fixed the attachment problem.
It looks like I have to do that anytime I want to send an email with attachments of ftp a file.
I also have to do it before deleting a file.

There must be something else wrong. I have multiple applications sending attachments and never had this problem. And I create file (pdf or xlsx) and send it immediately after creating.
3
General / Re: how to change the color font and background of a button
« Last post by Handoko on Today at 05:14:06 pm »
TButton.Color cannot be changed on Windows. See the attached picture below. It is restricted on Windows.

Solutions? Don't use Windows or use other third party button components, for examples:

https://wiki.lazarus.freepascal.org/BGRAControls/de#TBGRAButton
https://wiki.lazarus.freepascal.org/TGradButton

But if you have time and want to do something challenging, you can write your own button component. There were several discussions about creating custom button in the past, you can search the forum if you want learn about it.

I'm newbie in lazarus and exploring the components of the lazarus

Lazarus as a rapid application development tool has plenty of ready-to-use components:
https://wiki.lazarus.freepascal.org/Category:Components

For your information, to enable a component that comes with your Lazarus default installation:
Lazarus main menu > Package > Install/Uninstall Packages > in the right panel, type or select the package you want > click "Install selection" > click "Save and rebuild IDE" > wait until the IDE restarted

For installing a third party component, you can use OPM:
Lazarus main menu > Package > Online Package Manager
4
I added delay(500) before the call and that seems to have fixed the attachment problem.
It looks like I have to do that anytime I want to send an email with attachments of ftp a file.
I also have to do it before deleting a file.


5
General / how to change the color font and background of a button
« Last post by lemodizon on Today at 05:06:14 pm »
Hi everyone,

i tried to change the color of the font of my button and background also but it didn't change.

I'm using the standard button.

I'm newbie in lazarus and exploring the components of the lazarus

hope you can help.

thanks


6
General / Re: JEDI error but unit compiles??
« Last post by bobonwhidbey on Today at 05:03:48 pm »
It took me some time to whittle down a large unit to find the problem. You can create a new project with only this little FormShow procedure
Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormShow(Sender: TObject);
  2. const
  3.   TestSET: set of tWindowState = [wsNormal..wsMinimized,wsFullScreen];
  4. begin
  5.   ShowMessage('Test');
  6. end;

Of course this compiles and runs but I can not use JEDI to format the PAS file.  The problem occurs when I add "wsFullScreen". Without that, I can use JEDI. I have no idea how to fix JEDI to correct this.
7
But don't forget, fpc-322 will not work with openssl 3 and most up to date systems have openssl 3 now.

One (very ugly) solution to that is to create a symlink called libssl.so from libssl.so.3. Usually works but no guarantee !

Davo

Ohh!!!
Then i just will have it like i have done. i use this.
I don't need these "unknown" elements i created in my app. I really don't know what they should be, but i only need the string type, so it is working good after i added it.
I could go deeper in the source and figure out maybe, but it's working.

Thanks for this info, very useful indeed.
9
Android / Re: [LAMW] How to create a callback ? (eg. Datalogic)
« Last post by af0815 on Today at 03:48:16 pm »
I have tried this with your explanation and created a branch https://github.com/afriess/lazandroidmodulewizard/tree/Andi_WIP on github, where my actual not working changes are stored.

I did not full find the missing link between the two world (actual i am landed in 'never man's land' :-)  between Pascal and Java)
10
Windows (32/64) / Re: Complex package installation problem
« Last post by wp on Today at 03:38:16 pm »
The UOS player compiles after correcting for a missing USES statement, but 1) it always opens with a big black form behind the actual program, almost as if it ran a DOS window from which it then ran the actual program
Checked the "simpleplayer". The black form behind the program is a console window usually meant to catch debug output. It has nothing todo with running an external program. Go to "Project options" > "Compiler options" > "Config and target" and check "Win32 gui application" to remove the console window.

it ALWAYS asks where the libraries are, which is pretty annoying.
This is just a matter of these demo projects. You certainly can write code where loading of the needed libraries is done automatically, but then you must provide the correct paths to the dlls; the way it is done in the demos is to give to user a chance go specify the paths individually. Study the code in the demo and you'll find out.
Pages: [1] 2 3 ... 10

TinyPortal © 2005-2018