Al T 12 Posted November 19, 2022 (edited) procedure TFormAthenaVST.UpdateEditorParameter(index:integer;value: double); VAR isb:integer; sNum:single; begin WriteLog('TFormAthenaVST.UpdateEditorParameter(index:' + index.ToString + ' value:' + value.ToString); for isb:=0 to 2 do if index = ID_CUTOFF+isb then begin WriteLog('FScrollBars[' + isb.ToString + '].Value:=round(100*value)'); sNum := round(100*value); WriteLog('sNum = ' + sNum.ToString); FScrollBars[isb].Value:=sNum; WriteLog('AFTER FScrollBars[isb].Value:=sNum;'); end; WriteLog('TFormAthenaVST.UpdateEditorParameter END'); end; https://github.com/War3Evo/RMSVST3/blob/Delphi-11.0/FMX_AthenaVST3/UAthenaVSTForm.pas#L149-L164 You can find all the source code here: https://github.com/War3Evo/RMSVST3/tree/Delphi-11.0/FMX_AthenaVST3 WriteLog uses CodeSite Express... CakeWalk by BandLabs crashes on FScrollBars[isb].Value:=sNum; The VCL version does not crash but also uses FScrollBars[isb].Position:=round(100*value); Your help is much appreciated! Edited November 19, 2022 by Al T CodeSite Express Share this post Link to post
Al T 12 Posted November 19, 2022 (edited) I'm starting to guess I need to convert Int64 to Single... opps Is there a directive I need to enable for Delphi to catch that before I compile it?? --okay that isn't what I thought it was... still stumped. I'm now thinking procedure TFormAthenaVST.UpdateEditorParameter(index:integer;value: double); the value needs a rename?? Edited November 19, 2022 by Al T Share this post Link to post
Al T 12 Posted November 19, 2022 okay.. it isn't the value or sNum... It's FScrollBars[isb] something about FScrollBars[isb] crashes it... cause I called: procedure TFormAthenaVST.UpdateEditorParameter(index:integer; dvalue: double); VAR isb:integer; sNum:single; begin WriteLog('TFormAthenaVST.UpdateEditorParameter(index:' + index.ToString + ' dvalue:' + dvalue.ToString); for isb:=0 to 2 do if index = ID_CUTOFF+isb then begin WriteLog('FScrollBars[' + isb.ToString + '].Value:=(100*value)'); //sNum := round(100*dvalue); sNum := 100*dvalue; WriteLog('FScrollBars[isb].BeginUpdate'); FScrollBars[isb].BeginUpdate; WriteLog('sNum = ' + sNum.ToString); FScrollBars[isb].Value:=sNum; WriteLog('FScrollBars[isb].EndUpdate'); FScrollBars[isb].EndUpdate; WriteLog('AFTER FScrollBars[isb].Value:=sNum;'); end; WriteLog('TFormAthenaVST.UpdateEditorParameter END'); end; It crashes right after WriteLog('FScrollBars[isb].BeginUpdate'); Share this post Link to post
Al T 12 Posted November 19, 2022 Solved: procedure FormCreate(Sender: TObject); IS in the source code... but on the form component it is not assigned to the procedure! Share this post Link to post