Re: compiler not catching bad exit within routine
Another thing to try that helped me more than once is to copy/paste the script (the ENTIRE script not just the handlers) into a text file formatted for Text Only then copy/paste it back into your script replacing what is there. I think it has something to do with the unicode text thingummy. Bob S On Dec 6, 2016, at 16:12 , Dr. Hawkins> wrote: On Tue, Dec 6, 2016 at 2:52 PM, Dave Kilroy > wrote: You define a handler "mkNwDnaRec" but your exit statement refers to "makeNewDnaRec" ... Correct. That should throw any error on script save--but it doesn't. The rest of the script compiles, but this routine quietly doesn't. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
RE: compiler not catching bad exit within routine
I just had a problem like this minutes ago. I had fat fingers and must have hit some bizarre ctrl key combo and LC(8.1.1) instantly quit with no messages. I restarted LC When I opened the script LC was OK but when I clicked the left bar to select the handler I was working on... BOOM LC quit again. I restarted LC again, opened the script and selected the entire script (15,000 lines) and copied it to the clipboard, then deleted the entire script, I clicked Apply and then pasted the 15,00 lines back in, clicked Apply again. I was now able to click on the handler I was working on and go on my merry way(but not before I did a "ctrl S"). Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Dr. Hawkins Sent: Wednesday, December 07, 2016 11:13 AM To: How to use LiveCode Subject: Re: compiler not catching bad exit within routine On Wed, Dec 7, 2016 at 3:21 AM, Dave Kilroy <d...@applicationinsight.com> wrote: > Have you tried checking your script for invisible characters? Try > copying the entire script to something like BBedit, selecting and > copying it afresh there, deleting everything in the LiveCode script, > saving it to ensure it's clean, pasting in the (hopefully cleaned) > script from Bbedit and finally saving... > I didn't even have to go that far. Pasting it into another script whole was enough for that; it gets found there, and actually compiles & runs. And to get it going, I added a new handler above it, and pasted a third of it at a time, including spacing. But that's the small stuff. The real problem here is that the compiler is quietly failing. the rest of the script gets compiled, no error is thrown, and the problem can't be found until another routine attempts to call this routine and it can't be found. There *should* be an error whenever the compile fails to compile . . . FWIW, this was the las hanger in that script, so I don't know what would have happened to subsequent handlers. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: compiler not catching bad exit within routine
On Wed, Dec 7, 2016 at 3:21 AM, Dave Kilroywrote: > Have you tried checking your script for invisible characters? Try copying > the entire script to something like BBedit, selecting and copying it afresh > there, deleting everything in the LiveCode script, saving it to ensure it's > clean, pasting in the (hopefully cleaned) script from Bbedit and finally > saving... > I didn't even have to go that far. Pasting it into another script whole was enough for that; it gets found there, and actually compiles & runs. And to get it going, I added a new handler above it, and pasted a third of it at a time, including spacing. But that's the small stuff. The real problem here is that the compiler is quietly failing. the rest of the script gets compiled, no error is thrown, and the problem can't be found until another routine attempts to call this routine and it can't be found. There *should* be an error whenever the compile fails to compile . . . FWIW, this was the las hanger in that script, so I don't know what would have happened to subsequent handlers. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: compiler not catching bad exit within routine
Or try this if the script is not supposed to have any non-ascii characters: local tLineCount, tCPCount repeat for each line tLine in
Re: compiler not catching bad exit within routine
Ah right I get it now Have you tried checking your script for invisible characters? Try copying the entire script to something like BBedit, selecting and copying it afresh there, deleting everything in the LiveCode script, saving it to ensure it's clean, pasting in the (hopefully cleaned) script from Bbedit and finally saving... - "The first 90% of the task takes 90% of the time, and the last 10% takes the other 90% of the time." Peter M. Brigham -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/compiler-not-catching-bad-exit-within-routine-tp4710898p4710907.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: compiler not catching bad exit within routine
On Tue, Dec 6, 2016 at 4:01 PM, mwiederwrote: > My guess is that there's a "makeNewDnaRec" variable somewhere in the > original script. > just checked; and no. And strict compilation is on (although it seems to keep getting turned off). -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: compiler not catching bad exit within routine
Yeah, I think that's the point of the original post. My guess is that there's a "makeNewDnaRec" variable somewhere in the original script. - -- Mark Wieder ahsoftw...@gmail.com -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/compiler-not-catching-bad-exit-within-routine-tp4710898p4710905.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: compiler not catching bad exit within routine
On Tue, Dec 6, 2016 at 3:03 PM, Ali Lloydwrote: > I've no idea what the problem could be, but when things like this happen to > me I copy the routine and continually delete lines until either I discover > what I did wrong, or have a very minimal test case. > That's my usual approach, but it failed here. And cut & paste into another stack worked. I then came up with a completely new name, and copied a few lines at a time into the new handler, and it worked. Something's rotten . . . -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: compiler not catching bad exit within routine
On Tue, Dec 6, 2016 at 2:52 PM, Dave Kilroywrote: > You define a handler "mkNwDnaRec" but your exit statement refers to > "makeNewDnaRec" ... > > Correct. That should throw any error on script save--but it doesn't. The rest of the script compiles, but this routine quietly doesn't. -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: compiler not catching bad exit within routine
You define a handler "mkNwDnaRec" but your exit statement refers to "makeNewDnaRec" ... - "The first 90% of the task takes 90% of the time, and the last 10% takes the other 90% of the time." Peter M. Brigham -- View this message in context: http://runtime-revolution.278305.n4.nabble.com/compiler-not-catching-bad-exit-within-routine-tp4710898p4710901.html Sent from the Revolution - User mailing list archive at Nabble.com. ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: compiler not catching bad exit within routine
I've no idea what the problem could be, but when things like this happen to me I copy the routine and continually delete lines until either I discover what I did wrong, or have a very minimal test case. On Tue, Dec 6, 2016 at 9:30 PM Dr. Hawkinswrote: > I have a (much longer) routine to the nature of > > on mkNwDnaRec > > > if something then > > exit makeNewDnaRec > > end if > > end mkNwDnaRec > > > > The compiler doesn't choke when saving the editor window. > > It does, though, file to go to mkNwDnaRec stating that it can't find it. > > I then paste the routine into another script, and it catches the error. > > Paste it back, and it still isn't caught. > > ??? > -- > Dr. Richard E. Hawkins, Esq. > (702) 508-8462 > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
compiler not catching bad exit within routine
I have a (much longer) routine to the nature of on mkNwDnaRec if something then exit makeNewDnaRec end if end mkNwDnaRec The compiler doesn't choke when saving the editor window. It does, though, file to go to mkNwDnaRec stating that it can't find it. I then paste the routine into another script, and it catches the error. Paste it back, and it still isn't caught. ??? -- Dr. Richard E. Hawkins, Esq. (702) 508-8462 ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode