Ik krijg een Priviledged instruction foutmelding als ik Apply aanroep in TLowercase Processor. Om precies te zijn: het gaat fout als Process aanroepen wordt in Apply.
Als je dan LowerCaseProcces.Apply aanroept gaat het mis... Weet iemand wat ik moet doen om dit te voorkomen (Priviledged instruction foutmelding)?
Delphi:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
| constructor TOperationProcessor.Create(ItemList: TStringList); var Token: string; begin fStringList := ItemList; end function TOperationProcessor.Process(const S: string): string; // VIRTUAL begin // Put something here end; procedure TOperationProcessor.Apply; var I: Integer; S: string; begin for I := 0 to fStringList.Count - 1 do begin S := fStringList[I]; fStringList.Delete(I); fStringList.Insert(I,Process(S)); end; end; // DEZE OVERRIDE HEM function TLowerCaseProcessor.Process(const S: string): string; // OVERRIDE begin Result := LowerCase(S); end; |
Als je dan LowerCaseProcces.Apply aanroept gaat het mis... Weet iemand wat ik moet doen om dit te voorkomen (Priviledged instruction foutmelding)?