开发者

Delphi 2010 - Source files randomly become read-only in editor?

开发者 https://www.devze.com 2022-12-29 20:00 出处:网络
Does anyone else have this problem or is my Delphi cursed somehow? I\'ll have a bunch of forms and files open in tabs in the editor and I\'ll be typing away and then suddenly everything stops - my .p

Does anyone else have this problem or is my Delphi cursed somehow?

I'll have a bunch of forms and files open in tabs in the editor and I'll be typing away and then suddenly everything stops - my .pas file has, seemingly at random, become read-only.

Sometimes I can just right-click the tab at the top and uncheck "Read-Only" and continue, but sometimes this option is checked and greyed-out (disabled), meaning I can't uncheck it and I can't make any further edits to the file. This too seems to be random.

In the latter case, the only solution is to save the file in question, which works, despite Delphi's assertion that the file is read-only, close its tab in the editor, and re-open it. 开发者_如何学运维Not catastrophic, really, but it's starting to become annoying.

Could it be that I am hitting a keyboard command combination accidentally to do this or is this a bug in Delphi?

I'm in Delphi 2010, Windows 7. Doubt it's anything to do with installed packages, but if anyone wants the list I'll generate it and attach it here.


Skip to last paragraph for quick Solution :)

Yes! this just happened to me. I was typing a line of code... a line in Intraweb's ServerController.... OnBeforeDisbatch.. anyways. I was typing..

If

and then I typed a Space... so If <---- then space... and then the IDE autofilled in

If True then

after the above line was in the system all hell broke loose.... hell being that the file would stay in a read-only mode....

I edited the file manually and removed the line

if True then

and all is good.

just to update: I do believe it is file size... 125K and then bang. at least on the server controller... IW10/Delphi 2010

update again... 8 hours later...

I reduced my source file (iwservercontroller) from 125k to well under 80k and all was good. then now right when I first press the control key to paste over a value the file goes read-only!! like wow....

going to reduce file again..

Minutes later...

after shutting down d2010 and reloading project... I have narrowed down the problem to using the "paste" command.... the second I tried to paste a clipboard value read-only occurred... but a harddrive hit occurred for a instant before the read-only activated!

Final solution!!! I got it! I couldn't believe there is a "Read Only" option in the Right Click Menu.... Click on the left side Pane where the check box is when the Read-Only appears! no more need to restart IDE and reload everything etc etc...

All fixed... whoo hoo

Nope... not all fixed... 3 hours later... I reactivate IDE and I am just about to paste in some data and then the file goes in read only (not explorer's file attributes) and the Pop up menu value is now grayed out!! like wtf!!

Full day later.. trying everything.. I have a solution!! first time I got it to go off read-only without using the PUM/insert Key

simply just access the unit in question that is causing read-only and do a single character change with a outside app. (ultraedit) and save. upon saving d2010 will detect outside changes and go switch back to insert-mode even with the pop up menu is disabled.... whoo hoo...

* Final Solution * Things are all good now and not a single read-only but the solution is not too elegant in terms of keeping my text edit habits in check.. but if you open settings and change the editor to keep insert mode on you will be laughing to the bank... at least things are all good for me now.

Delphi2010-->Options-->Editor Options-->["Insert Mode"] check that option.

Seems since i have had the above checkbox clicked not a single Read-only.... good luck.


This happened once to me. I think it's a bug, I can't find an existing report for it and when you find repeatable steps the please create QC report for it.


This happens to us all the time - once a file gets over a certain size/complexity Delphi starts randomly going read only - sometimes accompanied by freezing for several seconds.

We think it's something to do with the syntax highlighter failing on certain constructs - certainly it comes and goes in waves, and I've had times where I've been reduced to editing a file in notepad just to get some work done.

It happens on units with no related DFM, so it's not a component doing it, and it's not storage related (Delphi isn't writing to the disk when it fails).


Yes, this just started happening to me after I installed Model Maker 11. I think the Model Maker plug-in might be monkeying around with the read only setting of a source file. (I've been using Delphi 2010 for a year now without this issue ever happening, all of a sudden it started right around the time I got MM11.) I haven't tried uninstalling MM11 yet though. So --- do you have ModelMaker 11?


I've seen it many, many times in Delphi 7 which rules out some of the explanations others have suggested.

I haven't seen it on 2010 but I haven't done all that much with 2010.


I also see a switch to "readonly" for pas files in the D2010 editor. None of the above suggestions have always worked for me. I am transferring a large project from D6 to D2010 and am making many necessary changes. On way to overcome the problem for a file that has been marked "readonly" and where (right-click in the editor "[ ] Read Only") has been greyed out, is to close the file and reopen it.

0

精彩评论

暂无评论...
验证码 换一张
取 消