Recent

Author Topic: Error from FPSpreadsheet  (Read 7155 times)

wp

  • Hero Member
  • *****
  • Posts: 6466
Re: Error from FPSpreadsheet
« Reply #15 on: June 06, 2018, 02:57:31 pm »
1. Still have the same problem if I open file at designtime :- hourglass (mouse pointer) keep appearinf AND IDE after a while. 
Sorry, no idea what this could mean... "keep appearinf AND IDE"? Please write down every step you do
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

kjteng

  • Full Member
  • ***
  • Posts: 181
Re: Error from FPSpreadsheet
« Reply #16 on: June 06, 2018, 04:58:34 pm »
1. Still have the same problem if I open file at designtime :- hourglass (mouse pointer) keep appearinf AND IDE after a while. 
Sorry, no idea what this could mean... "keep appearinf AND IDE"? Please write down every step you do

Sorry for the typo. it should read keep 'appearing and IDE crash ...'
This is what I did:
1. Drop worksheetGrid and workbooksource onto a new form/new poroject, Set worksheetGrid1.workbooksource to Workbooksource1.
2. Click the WorkbookSource1.Filename in object inspector, select an excel file from harddisk;
3. After the excel files is loaded into the worksheetgrid, try to move around the form (click on components  on the form) eg. click the workbooksource1, then click the worksheetgrid ... after 1 or 2 seconds, the IDE crashed. (see the screen shot in my previous post).

If I press F9 to run the apps after step 2 above, the program will be compiled and saved.  However, the IDE will crash when I close and then open the project again (after I clicked any component on the form).  I am not able to change or delete the filename property of workbooksource1. The filename can only be deleted by editing the .lfm file (in text mode).
« Last Edit: June 06, 2018, 05:00:49 pm by kjteng »

totya

  • Hero Member
  • *****
  • Posts: 577
Re: Error from FPSpreadsheet
« Reply #17 on: June 06, 2018, 06:01:19 pm »
With 6470 revision of fps, I haven't any problem with your steps. I use "old" format excel, so I need  add to uses line: fpsallformats

Possible wp master solved this problem meanwhile, but good idea if you attach the problematic excel file.
« Last Edit: June 06, 2018, 06:09:45 pm by totya »

wp

  • Hero Member
  • *****
  • Posts: 6466
Re: Error from FPSpreadsheet
« Reply #18 on: June 06, 2018, 06:03:40 pm »
No luck. Everything working correctly here. Only when I compile and run I get the error that the reader is not found - but this is clear because I did not add the unit to "uses". After adding xlsBiff8, the program runs correctly.

I assume that you are using fpspreadsheet trunk. After updating from svn did you perform a clean rebuild of the IDE? Normally this is not necessary. But one of the recent revision had a drastic change in the fpspreadsheet packages. So, please, go to "Tools" > "Configure Build Lazarus", in the "Clean-up" box select "Clean all" and "Switch after building to automatically". Then "Build".

Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

kjteng

  • Full Member
  • ***
  • Posts: 181
Re: Error from FPSpreadsheet
« Reply #19 on: June 06, 2018, 07:05:49 pm »
With 6470 revision of fps, I haven't any problem with your steps. I use "old" format excel, so I need  add to uses line: fpsallformats

Possible wp master solved this problem meanwhile, but good idea if you attach the problematic excel file.
I dont think there is any problem with the excel file because I tested it with a blank new worksheet (.xlsx) which you also can create ;-)

kjteng

  • Full Member
  • ***
  • Posts: 181
Re: Error from FPSpreadsheet
« Reply #20 on: June 06, 2018, 07:10:38 pm »
No luck. Everything working correctly here. Only when I compile and run I get the error that the reader is not found - but this is clear because I did not add the unit to "uses". After adding xlsBiff8, the program runs correctly.

I assume that you are using fpspreadsheet trunk. After updating from svn did you perform a clean rebuild of the IDE? Normally this is not necessary. But one of the recent revision had a drastic change in the fpspreadsheet packages. So, please, go to "Tools" > "Configure Build Lazarus", in the "Clean-up" box select "Clean all" and "Switch after building to automatically". Then "Build".
The compiled exe does not has any problem (requires fpsallformat to uses clause in the source). The problem only occurs in designtime and only after I set the filename in the object inspector.
Will try to clean up as per your advice.

kjteng

  • Full Member
  • ***
  • Posts: 181
Re: Error from FPSpreadsheet
« Reply #21 on: June 07, 2018, 06:17:08 am »
Tried clean rebuild but cannot solve the problem.
Uninstalled the existing ver 1.82 and installed ver 1.84 ... Works!!!

However, I have new problem now:- I cannot select filename when I am in in the filename property field of the object inspector. Instead I have to type in the full path name of the file.  I think this has something to do with TFilenamePropertyEditor as I noticed that the same problem applies to the Filename property of other component such as TSaveDialog & TOpenDialog.  How can I solve this problem?

wp

  • Hero Member
  • *****
  • Posts: 6466
Re: Error from FPSpreadsheet
« Reply #22 on: June 07, 2018, 11:18:52 am »
No luck, I checked Lazarus versions back to 1.0, and all work correctly. Maybe you had somehow messed up your 1.8.2 installation.

As for the FileName property editor I wonder why you had it with version 1.8.2, and I even wonder why I have myself it in my standard Laz trunk with fpc 3.0.4 because the TFileName property editor for all properties named "FileName" is installed only in combination with fpc trunk. It could be that some third-party package has installed their own property editor for us.

Anyway, I now added the TFileName property editor to the designtime package of visual components. Therefore, the '...' button should be back for the TsWorkbookSource even for non-fpc-truink installations.
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

kjteng

  • Full Member
  • ***
  • Posts: 181
Re: Error from FPSpreadsheet
« Reply #23 on: June 07, 2018, 02:47:58 pm »
I dont know how my v1.82 is messed up on my notebook AND desktop. May be due to installation/uninstallation of other third party components.

You are right about the TFileNamePropertyEditor as I have found the statement
RegisterPropertyEditor(TypeInfo(TFilename), TComponent, 'FileName',
                                     TFileNamePropertyEditor);
in one of my .pas file which I have uninstalled accidentally.

Thank again for your help and for your effort in developing the fpSpread component. Cheers.
 

PatBayford

  • Full Member
  • ***
  • Posts: 125
Re: Error from FPSpreadsheet
« Reply #24 on: June 10, 2018, 06:35:57 am »
I would also find display a design time useful, but not essential. I will try re-installing the split components - thanks
Lazarus 1.8.0 FPC 3.0.2 SVN 56594 Windows 10 64bit (i386-win32-win32/win64)