Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2020-05

Code tools and changing include file text

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Ryan Joseph

When a file changes I get the full source text and update the version in code tools by doing this:

Code := CodeToolBoss.FindFile(Path);
Code.Source := text;

This works but I'm having problems with include files now because I'm updating the code buffer for the include file but the main code doesn't seem to get updated. Do I need to notify the main code of changes or inject the include code into the main code buffer?

Regards,
Ryan Joseph

Mattias Gaertner
to Ryan Joseph
Show quoted text 10 lines
When a file changes I get the full source text and update the version in code tools by doing this: Code := CodeToolBoss.FindFile(Path); Code.Source := text; This works but I'm having problems with include files now because I'm updating the code buffer for the include file but the main code doesn't seem to get updated. Do I need to notify the main code of changes or inject the include code into the main code buffer?

No.

If Path a real filename (absolute, have a full path) you should do Code.LockAutoDiskRevert, so codetools do no automatically load the file, when it has changed.

Otherwise:
Can you create an example?

Mattias