Re: Enhanced IDE
- Posted by Mike777 <anon4321 at ??ail.com> Jan 22, 2008
- 538 views
Judith Evans wrote: > > Mike777 wrote: > > > > This is primarily intended for Judith, but if anybody else has any input, > > that > > would be fine with me. > > > > I seem to have run into a repeatable circumstance where code is obliterated. > > I'm not sure I can create a small repeatable example, but here is the code > > that will do it at my end. Take a normal text box and look at the onKeyUp > > event. > > Code it with: > > > > w32VOID=message_box(sprintf("The value of the key > > is:[%14.6f]",params[1]),"",0) > > > > Then run the program and input something which will cause a crash. On my > > system, > > that is just typing C twice. > > > > When you go back and look at the onKeyUp event in the IDE, it will be gone. > > > > I mention this not because I'm losing one line of test code. I mention this > > because after a crash, the routine that was in the process of executing is > > sometimes > > obliterated. It happened to me a couple of times with a Window/[General] > > code > > block [a BIG one]. When that happened, I was not very happy. But since I > > couldn't reliably replicate it and it happened so infrequently, I just > > implemented > > a "save the project file frequently" habit and went about my way. > > > > Now that I can reliably reproduce a code obliteration, I thought the least I > > could do is to mention it here so that if somebody wants to spend the time > > to > > track down the bug, they can and maybe more importantly, to encourage > > backing > > up the prj file "just in case." > > > > Mike > > I can reproduce the crash. > > However when I return to Code Editor, I still have the statement in the > w32HKeyUp > event. Depending upon your choice from Code Editor Menu Options "When Changing > Control", IDE may have switched you to another event. Please check what event > is showing in the events dropdown combo and if it is the w32HKeyUp and the > body > of the editor shows nothing let me know. > > Are you using IDEv1.0.3a? I'm pretty sure I am. Unfortunately, after I saved the project, exited and came back, I can no longer replicate it. Don't worry, it will come back relatively soon and I'll see what I can report. Best I can tell, the problem comes up when I load a different window. Sometimes (and I haven't identified exactly when) the loading of a different window causes one routine or another to disappear. Once that has happened, if I don't immediately exit I can find the problem like the one I just reported happening. Of course, to make the system run, I have to restore the lost routine. That just leaves me in the inconsistent state that allows the above described error, though. For example, I have three windows (which you know from before). When switching from the main window to my secondary window, it will sometimes come up showing the code for my main window's onOpen routine in the onOpen routine for the secondary window. Complete with the first line (procedure ....) and the last line (set handler). When that happens, I can go into a backup and get the code for the secondary window's onOpen routine and the IDE can create an exw which will run (not necessarily properly, but it will run). I've got enough going on in my project now that for it to run means that almost everything is in the right place. However, when a crash takes place I get strange results, as reported above. Of course, the "solution" is to exit immediately after restoring the obliterated code and come back in, which should at least eliminate the inconsistent state. But I want to keep the inconsistent state around long enough to give you enough information to try and figure out what is going on! A definite catch 22, huh? BTW, I couldn't find "CODE EDITOR MENU OPTIONS". Did you mean "Options Configure IDE"? Thanks Mike