Forum > Packages and Libraries

Compiling fshComp error

(1/1)

eldonfsr:
I tried to compile fshcomp but sent me this error

   sreditcur.pas(294,19) Error: Call by var for arg no. 1 has to match exactly: Got "TSrEditCur" expected "TCustomEdit"

some help great

thanks

dbannon:
Hmm, fshcomp appears to have been untouched for a very long time. 2009 ?

Its likely you will need to update something in it if it no one else has for twelve years.

So, look in sreditcur.pas, line 294, column 19, Lazarus will have highlighted that for you already. That line calls     RightLean(Self);, 'Self is, at this stage,  TSrEditCur but the declaration at line 41 expects a TCustomEdit -


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure RightLean(var xe: TCustomEdit);
I have no idea whats going on here and it seems unlikely the original author is still active so it looks like you have a bit of debugging to do !  As a start, I cast 'Selt' to a TCustomEdit and it compiled. 


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---    RightLean(TCustomEdit(Self));
But as I am not going to add the unit to my install, I am creating the component "on the fly" and did not see any component popping up. Setting sensible positions and visibility did not help so, I am afraid, its up to you.  If you do get it going as expected, please remember to put a patch into Mantis so it gets fixed.   If you cannot make any progress, you could put just a bug report into Mantis ?

Good luck !
Davo

dbannon:
Sorry, I was being silly, yes, with that (possibly very wrong) fix, I was able to display the currency edit component on a form.  Up to you to test it I am afraid.
If you have not added that package to the ide, do something like -

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.FormCreate(Sender: TObject);begin      CEdit := TSrEditCur.create(Form1);      CEdit.Top := 10;      CEdit.Left := 10;      CEdit.Parent := self;end;  
Davo

eldonfsr:
Ok Friend let me tried and get some experience with hat thanks....

Navigation

[0] Message Index

Go to full version