Changeset 125 for trunk/UTarget.pas
- Timestamp:
- Jan 14, 2022, 3:15:52 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UTarget.pas
r124 r125 173 173 begin 174 174 if Count > 0 then begin 175 TMessage(Last).Text := TMessage(Last).Text + Text;175 Last.Text := Last.Text + Text; 176 176 DoChange; 177 177 end else AddMessage(Text); … … 210 210 begin 211 211 for I := Count - 1 downto 0 do 212 if TBreakPoint(Items[I]).System then Delete(I);212 if Items[I].System then Delete(I); 213 213 end; 214 214 … … 218 218 begin 219 219 I := 0; 220 while (I < Count) and ( TBreakPoint(Items[I]).TargetAddress < Pos) do Inc(I);221 if I < Count then Result := TBreakPoint(Items[I])220 while (I < Count) and (Items[I].TargetAddress < Pos) do Inc(I); 221 if I < Count then Result := Items[I] 222 222 else Result := nil; 223 223 end; … … 231 231 begin 232 232 I := 0; 233 while (I < Count) and ( TDebugStep(Items[I]).SourcePosition < Pos) do Inc(I);234 if I < Count then Result := TDebugStep(Items[I])233 while (I < Count) and (Items[I].SourcePosition < Pos) do Inc(I); 234 if I < Count then Result := Items[I] 235 235 else Result := nil; 236 236 end; … … 241 241 begin 242 242 I := 0; 243 while (I < Count) and ( TDebugStep(Items[I]).ProgramPosition < Pos) do Inc(I);244 if I < Count then Result := TDebugStep(Items[I])243 while (I < Count) and (Items[I].ProgramPosition < Pos) do Inc(I); 244 if I < Count then Result := Items[I] 245 245 else Result := nil; 246 246 end; … … 252 252 begin 253 253 I := 0; 254 while (I < Count) and ( TDebugStep(Items[I]).TargetPosition < Pos) do Inc(I);255 if I < Count then Result := TDebugStep(Items[I])254 while (I < Count) and (Items[I].TargetPosition < Pos) do Inc(I); 255 if I < Count then Result := Items[I] 256 256 else Result := nil; 257 257 end; … … 262 262 begin 263 263 I := 0; 264 while (I < Count) and ( TDebugStep(Items[I]).ProgramPosition < Pos) do Inc(I);264 while (I < Count) and (Items[I].ProgramPosition < Pos) do Inc(I); 265 265 if I < Count then Result := I 266 266 else Result := -1; … … 289 289 Last := SearchIndexByProgramPos(OldProgramTo); 290 290 for I := Last downto First + 1 do Delete(I); 291 TDebugStep(Items[First]).ProgramPosition := NewProgram;292 TDebugStep(Items[First]).TargetPosition := NewTarget;291 Items[First].ProgramPosition := NewProgram; 292 Items[First].TargetPosition := NewTarget; 293 293 end; 294 294 … … 304 304 CurrentContext := Context; 305 305 for I := 0 to Count - 1 do 306 TTarget(Items[I]).LoadFromRegistry(TRegistryContext.Create(Context.RootKey, Context.Key + '\' + TTarget(Items[I]).Name));306 Items[I].LoadFromRegistry(TRegistryContext.Create(Context.RootKey, Context.Key + '\' + TTarget(Items[I]).Name)); 307 307 finally 308 308 Free; … … 318 318 CurrentContext := Context; 319 319 for I := 0 to Count - 1 do 320 with TTarget(Items[I])do321 TTarget(Items[I]).SaveToRegistry(TRegistryContext.Create(Context.RootKey, Context.Key + '\' + TTarget(Items[I]).Name));320 with Items[I] do 321 Items[I].SaveToRegistry(TRegistryContext.Create(Context.RootKey, Context.Key + '\' + TTarget(Items[I]).Name)); 322 322 finally 323 323 Free; … … 330 330 begin 331 331 I := 0; 332 while (I < Count) and ( TTarget(Items[I]).Name <> Name) do Inc(I);333 if I < Count then Result := TTarget(Items[I])332 while (I < Count) and (Items[I].Name <> Name) do Inc(I); 333 if I < Count then Result := Items[I] 334 334 else Result := nil; 335 335 end; … … 345 345 for I := 0 to Count - 1 do begin 346 346 NewMenuItem := TMenuItem.Create(MenuItem); 347 NewMenuItem.Caption := TTarget(Items[I]).Name;347 NewMenuItem.Caption := Items[I].Name; 348 348 NewMenuItem.OnClick := Action; 349 NewMenuItem.ImageIndex := TTarget(Items[I]).ImageIndex;350 if TTarget(Items[I])= CurrentTarget then NewMenuItem.Checked := True;349 NewMenuItem.ImageIndex := Items[I].ImageIndex; 350 if Items[I] = CurrentTarget then NewMenuItem.Checked := True; 351 351 MenuItem.Add(NewMenuItem); 352 352 end; … … 407 407 FreeAndNil(DebugSteps); 408 408 FreeAndNil(BreakPoints); 409 inherited Destroy;409 inherited; 410 410 end; 411 411 … … 505 505 procedure TTarget.Pause; 506 506 begin 507 508 507 end; 509 508 … … 514 513 procedure TTarget.StepOver; 515 514 begin 516 517 515 end; 518 516 519 517 procedure TTarget.StepInto; 520 518 begin 521 522 519 end; 523 520 524 521 procedure TTarget.StepOut; 525 522 begin 526 527 523 end; 528 524 529 525 procedure TTarget.RunToCursor(Pos: Integer); 530 526 begin 531 532 527 end; 533 528
Note:
See TracChangeset
for help on using the changeset viewer.