TMS diagram에서 GPDrawer.GPCanvas.DrawLine 사용시 access violation이 자꾸떨어져요.. ㅜㅜ
보통 DrawBlock내에서 이 함수를 사용하면 정상으로 그려지는데요
프로퍼티내에서 이 함수를 사용시에 access violation이 자꾸 떨어져서 미칠꺼같습니다. 도와주세요..
TMockupTooltip = class(TMockupControl) private tooltipCanvas: TCanvas; tooltipR: TRect; tooltipT: Integer; public procedure DrawBlock(Canvas: TCanvas; Rect: TRect); override; function GetDirection : TMockupTooltipDirection; procedure SetDirection (Value: TMockupTooltipDirection); published property TextAlignment: TMockupTextAlignment read GetTextAlignment write SetTextAlignment; property Direction: TMockupTooltipDirection read GetDirection write SetDirection;
...... 이런식으로 프로퍼티를 SetDirection으로 선언하고 아래와 같이 ....
procedure TMockupTooltip.SetDirection(Value: TMockupTooltipDirection); // 바뀐 값을 체크하여 반영 begin SiMain.ClearLog; if (tooltipR.Left <> 0) and (tooltipR.Right <> 0) and (tooltipR.Top <> 0) and (tooltipR.Bottom <> 0) then begin if Value = 'LeftTop' then begin GPDrawer.GPCanvas.DrawLine (0,0,1,1); ..... SetDirection에 GPDrawer.GPCanvas.DrawLine (0,0,1,1);을 하면 access violation이 발생합니다. 유독 프로퍼티로 사용할때만 에러가 나느거 같은데 해결방법이 없을까요? 이것때문에 진행이 안되서 죽겠네요 ㅜㅜ |