Recent

Author Topic: Problem with SynTaskDialog  (Read 9447 times)

Matek

  • New Member
  • *
  • Posts: 15
Problem with SynTaskDialog
« on: December 30, 2016, 07:03:54 pm »
HI! I use Lazarus 1.0.12 and I have a problem with SynTaskDialog. I've downloaded it from SynTaskDialog.pas Github repository, added to my project and inserted example code:


Task.Inst := 'Saving application settings';
Task.Content := 'This is the content';
Task.Radios := 'Store settings in registry'#10'Store settings in XML file';
Task.Verify := 'Do no ask for this setting next time'; Task.VerifyChecked := true;
Task.Footer := 'XML file is perhaps a better choice';
Task.Execute([],0,[],tiQuestion,tfiInformation,200);



I ran it, and the texts was different. I tried to use other combinations of SynTaskDialog, rebuilding it - but no effect. I attached image which presents that. Please help! :)

Regards, Marcin.
Lazarus 2.0.8, Windows 10 Pro
Lazarus 2.2.0, Windows 11 Home

ShowMessage('Zażółć gęślą jaźń');

Cyrax

  • Hero Member
  • *****
  • Posts: 836
Re: Problem with SynTaskDialog
« Reply #1 on: December 31, 2016, 12:21:37 am »
Upgrade to Lazarus 1.6.2, please. Lazarus 1.0.12 is ancient and unsupported.

Matek

  • New Member
  • *
  • Posts: 15
Re: Problem with SynTaskDialog
« Reply #2 on: December 31, 2016, 02:39:40 pm »
Upgrade to Lazarus 1.6.2, please. Lazarus 1.0.12 is ancient and unsupported.


I upgraded Lazarus to version 1.6.2 (on my 2nd computer with Windows 10). I created new project, put SynTaskDialog demo code, rebuilt and ran it. The results are similar to these from ver. 1.0.12. Please look at image attachment:
« Last Edit: December 31, 2016, 02:45:06 pm by Matek »
Lazarus 2.0.8, Windows 10 Pro
Lazarus 2.2.0, Windows 11 Home

ShowMessage('Zażółć gęślą jaźń');

Xor-el

  • Sr. Member
  • ****
  • Posts: 404
Re: Problem with SynTaskDialog
« Reply #3 on: December 31, 2016, 03:15:11 pm »
Upgrade to Lazarus 1.6.2, please. Lazarus 1.0.12 is ancient and unsupported.


I upgraded Lazarus to version 1.6.2 (on my 2nd computer with Windows 10). I created new project, put SynTaskDialog demo code, rebuilt and ran it. The results are similar to these from ver. 1.0.12. Please look at image attachment:

please attach the project.

Matek

  • New Member
  • *
  • Posts: 15
Re: Problem with SynTaskDialog
« Reply #4 on: December 31, 2016, 03:55:10 pm »
Upgrade to Lazarus 1.6.2, please. Lazarus 1.0.12 is ancient and unsupported.


I upgraded Lazarus to version 1.6.2 (on my 2nd computer with Windows 10). I created new project, put SynTaskDialog demo code, rebuilt and ran it. The results are similar to these from ver. 1.0.12. Please look at image attachment:

please attach the project.




I attached my project HERE (folder stdlg). If will you run it, click e.g. 5 times on button 'Test' -the captions in dialog will be different.

Lazarus 2.0.8, Windows 10 Pro
Lazarus 2.2.0, Windows 11 Home

ShowMessage('Zażółć gęślą jaźń');

Xor-el

  • Sr. Member
  • ****
  • Posts: 404
Re: Problem with SynTaskDialog
« Reply #5 on: December 31, 2016, 04:37:31 pm »
first of all, I am currently on mobile so I have not tested your code but here are a few suggestions that might work

1. in https://github.com/Matek0611/Do-udostepnienia/blob/master/stdlg/SynTaskDialog.pas#L315  , for anything other than Delphi 2009 and above TTaskDialog is defined as an object other than a record, change the line above to define TTaskDialog a record for FPC and try again.


Matek

  • New Member
  • *
  • Posts: 15
Re: Problem with SynTaskDialog
« Reply #6 on: December 31, 2016, 04:48:54 pm »
1. in https://github.com/Matek0611/Do-udostepnienia/blob/master/stdlg/SynTaskDialog.pas#L315  , for anything other than Delphi 2009 and above TTaskDialog is defined as an object other than a record, change the line above to define TTaskDialog a record for FPC and try again.


I changed this line and results was the same (I've been rebuilding project several times). :(
Lazarus 2.0.8, Windows 10 Pro
Lazarus 2.2.0, Windows 11 Home

ShowMessage('Zażółć gęślą jaźń');

Xor-el

  • Sr. Member
  • ****
  • Posts: 404
Re: Problem with SynTaskDialog
« Reply #7 on: December 31, 2016, 05:04:59 pm »
1. in https://github.com/Matek0611/Do-udostepnienia/blob/master/stdlg/SynTaskDialog.pas#L315  , for anything other than Delphi 2009 and above TTaskDialog is defined as an object other than a record, change the line above to define TTaskDialog a record for FPC and try again.


I changed this line and results was the same (I've been rebuilding project several times). :(

OK, am currently away from my PC.
will test it out when I get home.

Xor-el

  • Sr. Member
  • ****
  • Posts: 404
Re: Problem with SynTaskDialog
« Reply #8 on: December 31, 2016, 08:40:59 pm »
OK,
comment out line 1081 in https://github.com/Matek0611/Do-udostepnienia/blob/master/stdlg/SynTaskDialog.pas

FillChar some how corrupt the record because not all values in it are value types (PWideChar).

Matek

  • New Member
  • *
  • Posts: 15
Re: Problem with SynTaskDialog
« Reply #9 on: December 31, 2016, 10:21:14 pm »
OK,
comment out line 1081 in https://github.com/Matek0611/Do-udostepnienia/blob/master/stdlg/SynTaskDialog.pas

FillChar some how corrupt the record because not all values in it are value types (PWideChar).


Thanks... but now in line 1226 in https://github.com/Matek0611/Do-udostepnienia/blob/master/stdlg/SynTaskDialog.pas#L1226 after running app and pressing button 'Test'  there is an error (please look at attachment):
Lazarus 2.0.8, Windows 10 Pro
Lazarus 2.2.0, Windows 11 Home

ShowMessage('Zażółć gęślą jaźń');

Xor-el

  • Sr. Member
  • ****
  • Posts: 404
Re: Problem with SynTaskDialog
« Reply #10 on: January 01, 2017, 01:15:29 am »
the original demo project you previously uploaded works fine for me after I implemented the change I told you in the previous post.
from what I can see in the image, this error occurs in another project not the one you previously uploaded.

So I have a few questions to ask?

1. does the first project you uploaded work fine after implementing the changes I suggested?

2. which OS are you on?

Matek

  • New Member
  • *
  • Posts: 15
Re: Problem with SynTaskDialog
« Reply #11 on: January 01, 2017, 01:57:46 am »
the original demo project you previously uploaded works fine for me after I implemented the change I told you in the previous post.
from what I can see in the image, this error occurs in another project not the one you previously uploaded.

So I have a few questions to ask?

1. does the first project you uploaded work fine after implementing the changes I suggested?

2. which OS are you on?



I implemented the change to my other and original demo project, there were the same files (moditified) of SynTaskDialog. My first project has been built on Windows 10 (Lazarus 1.6.2) but this other on Windows 7 (Lazarus 1.0.12). There are 2 different errors (or the same?) on these versions. Please look at image attachment.


My answers:
1. It doesn't work, please see the attachment.
2. I use Windows 10 and 7.


ATTACHMENT: http://i.imgur.com/1mJWHuM.png
« Last Edit: January 01, 2017, 02:10:14 am by Matek »
Lazarus 2.0.8, Windows 10 Pro
Lazarus 2.2.0, Windows 11 Home

ShowMessage('Zażółć gęślą jaźń');

Xor-el

  • Sr. Member
  • ****
  • Posts: 404
Re: Problem with SynTaskDialog
« Reply #12 on: January 01, 2017, 07:41:31 am »
unfortunately I am unable to reproduce any of the errors you are getting.
I am using Windows 10 and Lazarus 1.6 with FPC 3.0.
which version of FPC are you using?
Is there any more info you can give that I can use to reproduce the error?
and could you reupload the demo which you have made the corrections I suggested that gives you the error?
« Last Edit: January 01, 2017, 08:24:10 am by Xor-el »

Matek

  • New Member
  • *
  • Posts: 15
Re: Problem with SynTaskDialog
« Reply #13 on: January 01, 2017, 01:07:35 pm »
unfortunately I am unable to reproduce any of the errors you are getting.
I am using Windows 10 and Lazarus 1.6 with FPC 3.0.
which version of FPC are you using?
Is there any more info you can give that I can use to reproduce the error?
and could you reupload the demo which you have made the corrections I suggested that gives you the error?


I'm using Windows 10 and Lazarus 1.6.2 with FPC 3.0.0. I don't know why there is an error  %)  .
Ok, I reupload files. Please look now at the demo (with compiled EXE): https://github.com/Matek0611/Do-udostepnienia/tree/master/stdlg . Initially, please run project1.exe before looking at code. Maybe I made a mistake?


PS. In attachment you can see Windows About Dialog.
Lazarus 2.0.8, Windows 10 Pro
Lazarus 2.2.0, Windows 11 Home

ShowMessage('Zażółć gęślą jaźń');

Xor-el

  • Sr. Member
  • ****
  • Posts: 404
Re: Problem with SynTaskDialog
« Reply #14 on: January 01, 2017, 02:27:37 pm »
OK,
Now something pretty weird is happening.
I downloaded the demo you uploaded and ran your executable,
I didn't get any access violation but the displayed text are incorrect like the picture you showed above.
I now rebuilt your demo project without changing anything and ran the produced executable and everything works properly.

one thing I did notice is that your executable is way bigger than mine (19Mb vs 15Mb).

this is weird.
have you tried disabling your antivirus and rebuilding or restarting your system?

 

TinyPortal © 2005-2018