IgorSavkic 93 Report post Posted January 10 This is same problem from 2.x version, but it's worse now, then it was possible to fix it with editing .sfm file, now only solution is to delete form and start again Anyway, just add one form to project (main), then go to File/New/New form, when prompted name it SecondForm, form is created. Save project, go to SecondForm, in ObjectInspector change Name to frmSecond, save and project becomes uncompilable. Share this post Link to post Share on other sites
jarto 428 Report post Posted January 10 @IgorSavkic Which version of SMS are you using? I'm asking because a bug like this was fixed in December. Share this post Link to post Share on other sites
IgorSavkic 93 Report post Posted January 10 Latest, 3.0.2.20 Share this post Link to post Share on other sites
jarto 428 Report post Posted January 10 4 hours ago, IgorSavkic said: Latest, 3.0.2.20 Does this happen with a certain project or are you able to reproduce this from scratch with a new project? I have problems reproducing this from a new project. If it's only in a certain project, can you send the zip to jt at smartmobilestudio.com? Share this post Link to post Share on other sites
IElite 263 Report post Posted January 10 Your steps worked for me, without error. Both forms are there and both work just fine Share this post Link to post Share on other sites
IgorSavkic 93 Report post Posted January 11 For me it happens always, here are two files. First is before renaming which works fine (compiles) and second is after renaming through ObjectInspector that fails. BeforeRename.7z AfterRename.7z Share this post Link to post Share on other sites
jarto 428 Report post Posted January 12 Hmm, no problem with renaming using the version in the development-channel. I have to still test the real installer but that will be a bit later. Share this post Link to post Share on other sites
IgorSavkic 93 Report post Posted January 12 I'm using version 3.02.20, for me SMSUpdate says there's no development channel available so cannot try anything newer. Anyway, try AfterRename, that is the state of the project when error starts to happen. Share this post Link to post Share on other sites
jarto 428 Report post Posted January 12 1 hour ago, IgorSavkic said: I'm using version 3.02.20, for me SMSUpdate says there's no development channel available so cannot try anything newer. Anyway, try AfterRename, that is the state of the project when error starts to happen. I couldn't reproduce this with 3.0.2.20 either. What I need are clear steps to reproduce this with the BeforeRename-project. When I can do that, then I can run the IDE in Delphi to find out what goes wrong. So, something like this: Extract BeforeRename to a new folder Start SMS ide Open BeforeRename-project ??? ??? ??? Press enter -> Boom. Share this post Link to post Share on other sites
IgorSavkic 93 Report post Posted January 12 It doesn't happen every time, sometimes it raises AV (I'm attaching callstack for it), most times it just corrupts files without exception and sometimes it works. Here is a video of steps taken. SMS.mp4 CallStack.txt Share this post Link to post Share on other sites
jarto 428 Report post Posted January 13 Thanks. Now I can try to reproduce this problem. Share this post Link to post Share on other sites
jarto 428 Report post Posted January 15 Ahh, now I get it. You're renaming from the Property Inspector and not from the Project Manager. I can reproduce this reliably now. Next step is to fix it. Share this post Link to post Share on other sites
jarto 428 Report post Posted January 15 I'm starting to get an idea of where the problem is. But before I can fix this, I'd like to ask you guys for your opinion on what the expected behavior should be. Because currently the renaming happens differently in the Property Inspector and Project Manager: Through Project manager: Form class is changed Unit name is changed File name is changed Through Property Inspector: Form class is changed Unit name is NOT changed File name is NOT changed Should I make both behave the same way or do you guys see an advantage in these behaving differently? Please let me know. Share this post Link to post Share on other sites
lynkfs 419 Report post Posted January 15 This behaviour is not limited to Forms but to other classes as well For example: Looking at the 'unit structure' tab with the SmartCL.Borders unit open, I can rename the TW3Border class to something else For Forms I don't see any advantage of changing a form class and not change the unit and filename, but for other object classes changing the class name only is somewhat handy (although a search and replace old/new classname will have the same effect) 1 jarto reacted to this Share this post Link to post Share on other sites
IgorSavkic 93 Report post Posted January 15 > Through Project manager: Through Property Inspector I think SMS in this should behave as Delphi. Project manager operates on units, so it will display unit name (for example MainForm.pas) and renaming there, renames unit. Object/Property inspector operates on components, so changing form name just does that, changes form name and class, unit is unaffected. For forms units I do like to have a different unit name and a different form name, for example I prefix all controls with it's type abbreviation, something like: Unit: SettingsForm.pas FormControl: frmSettings Panel: pnlMain ListBox: lbItems Panel: pnlRight ListBox: lbCategories Panel: pnlBottom Button: btnOK Button: btnCancel 2 IElite and jarto reacted to this Share this post Link to post Share on other sites
lynkfs 419 Report post Posted January 15 Looking at @IgorSavkic's argument to be able to have different form class names and unit names, I agree with him. We all have different styles and the IDE should accommodate that (so only the project manager should change unit/file names) 1 IElite reacted to this Share this post Link to post Share on other sites
jarto 428 Report post Posted January 16 Thank you for your comments. @IgorSavkic's suggestion makes perfect sense. To sum this up: Rename from Project Manager: Change unit name Change file name NO changes to form class name Rename from Property Inspector: Change form class name NO changes to unit name NO changes to file name 1 IElite reacted to this Share this post Link to post Share on other sites