Unreliable IDE?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Unreliable IDE?

Post by phaworth » Mon May 24, 2010 12:05 am

I've been using Revolkution for about a year now and really love using it. BUt, I guess I'm at the stage where more and more I'm noticing issues with the IDE that really make it seem unreliable in some ways. Here's a really simple example.

I open my .rev file then in the Application Browser, I right click on a substack and select the Delete Substack option. The substack still appears in the Application Browser. If I click on it, the it disappears so I guess I can live with that. But then I exit Revolution and get a hint that all is not as it should be because I get no prompt about saving. Next time I open the same .rev file, the substack is still there!

Most of my issues are to do with saving/not saving. Here's another one.

I have been reorganising the icons I use in my app and needed to change all the instances of of a given icon number to a different icon number. I wrote a utility that searches for any controls with a specified icon and changes the icon to a different specified icon. Run it, all seems fine. Search again for the old icon number, doesn't find any. Exit Rev, no save prompt and when I open the .rev file again, the old icon numbers are back! How can the IDE not figure out that I just changed the properties of around 20 buttons and not prompt me to save when I exit?

I guess this is made all the more ironic when I go through the whole rigmarole of being asked to save every card I have opened in the IDE even though I haven't made any changes to it. Plus no undo for actions that change format of a card like adding a new control, deleting a control (those things seem to take effect immediately even though I I specify not to save when I close the card). Add to that the occasional hard lockup requiring a Force Quit resulting in sometime hours of lost work. And yes I do have backups, done every hour with Time Machine - you can get through a lot of changes in an hour that aren't on the last backup!

I've also had instances where changes I make to scripts and compiled do not get saved when I exit.

I love the power of developing with Revolution but the IDE leaves a lot to be desired. Or is it just me? Somehow I just don't trust a program that doesn't at least prompt me to save changes when I exit, yet saves things I haven't asked to be saved.

Are there any alternatives to the Revolution IDE? I've seen mention of something named GLX (I think that's what it was called) from the makers of tRev but it doesn;t seem to be available any more.

Pete

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Unreliable IDE?

Post by Mark » Tue May 25, 2010 12:01 pm

He Pete,

The RunRev engine doesn't detect changes that have been made by script. It sets a flag after particular user actions occur, such as a click in a field. This explains why Rev didn't ask prompt you to save the stack after you changed the icon id numbers. On Mac OS, RunRev almost always asks whether you want to save your stacks, because it emulates a click in a field when a stack closes :-)

The potential of RunRev is absolutely great, but it has still a long way to go before it will be as reliable and stable as... some other development tools.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: Unreliable IDE?

Post by doc » Thu May 27, 2010 5:24 pm

Hey folks,
My comments are purely from personal experience and perspective.... and probably worth just about what it costs me to offer it. ;)
Although I've been using Rev off and on for around 5 years now, I'm not nearly experienced as *many* other RunRev users, but I have never once had a lock up as what has been described. The IDE has always functioned properly for me, never causing a minute of trouble.

As Mark pointed out, since you are effectively bypassing the IDE when making changes by script, perhaps during development, you might try adding a "closeStack" handler to the stack script like this:

Code: Select all

on closeStack
  save this stack
  pass closeStack
end closeStack
Regardless of what you do, it will save the stack even when you exit Rev without saving. Try it your self by starting a new mainstack, saving it so that Rev has a good filename and path available... add a button and then immediately close the IDE without saving. From my end, the button that I did not save is always there when the stack is reopened. Same for changes to icons, text files, etc that I have imported, but did not save.

Lastly, if you already know or suspect that some things aren't being saved that you change by script, why blame the IDE for lost work when a simple solution is always just a couple of menu clicks away?

Menu>File>Save >>>No lost work. ;)

-Doc-

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Re: Unreliable IDE?

Post by phaworth » Thu May 27, 2010 5:57 pm

Glad you're not having issues with the IDE. Writing scripts to work around IDE problems is not what I want to spend my time doing, I'd much rather be concentrating on developing my applications.

In answer to your question, I did NOT know that changes made by script weren't saved until the kind folks on this forum let me know about it. Hard to work around a problem you don't know about but now I can deal with it.

I'm not sure I understand your example of code. If I create a new mainstack and put a button it, then quit, I get a Save dialog prompt. My issue is to do with situations when changes are made and no Save dialog is shown when I quit.

The other problems in my email are still valid and have nothing to do with changing things in a script. The IDE will happily exit with no save dialog if I delete a substack in the Application Browser then quit without making any other changes. And the reverse situation where controls placed or deleted from a card are saved when I close the card even if I specify "Don't Save" in the Save dialog! Try it in your example of creating a new mainstack and putting a button on it. Close the stack, specify don't save, then open the stack again - the button will be there. The reverse is also true and more disconcerting. Delete the button from the card, close it without saving, then open it again - the button is gone!

Maybe I used the wrong word in unreliable, perhaps inconsistent or unpredictable would be closer to the mark. Like I said I love the power that Revolution gives for developing applications but I really hope some attention is given to the IDE in future releases as well as continuing to provide great functional additions.

Pete

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Unreliable IDE?

Post by Mark » Thu May 27, 2010 6:06 pm

Hi Doc,

I know there are people who don't use RunRev that often and they don't experience the same problems as Pete and I do. That doesn't make our problems less persistent or severe.

Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: Unreliable IDE?

Post by doc » Thu May 27, 2010 6:32 pm

Hey guys,
I realize that maybe I've just been fortunate and didn't intend to imply that you folks are incorrect. Just another view, that's all. ;)
I'm not sure I understand your example of code. If I create a new mainstack and put a button it, then quit, I get a Save dialog prompt. My issue is to do with situations when changes are made and no Save dialog is shown when I quit.
Just add the code I posted to the stack script to your sample mainstack... make any changes to the stack you want and exit without saving it. (That would basically match your situation by ignoring the save dialog.)

It should always save the stack when it is closed, except for maybe in the case of a lockup as you have described. (I cannot say).
It's a one time process and can be removed or commented out at any time you wish.

-Doc-

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Unreliable IDE?

Post by Mark » Thu May 27, 2010 6:49 pm

Doc,

Be careful. As long as you don't use the save dialog to save your stack, RunRev will think that you haven't saved it. This may cause very awkward situations, leaving you completely clueless about whether you really want to save your stack (again) or not. There are also situations in which you wil want to close your stack without saving.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: Unreliable IDE?

Post by doc » Thu May 27, 2010 7:23 pm

There are also situations in which you wil want to close your stack without saving.
And of course you are correct... and it's been quite a long while since I personally felt the need to use it. I only posted it as an example of what -can- be done if the normal IDE features are being by passed with script --and-- using the built in save menu seems to be too much of a problem. :?:

It's not likely that any IDE will ever properly anticipate and cover every wish, need, preference and work-flow situation for every developer, so I offered a simple work around for the issue and circumstances as they were presented.

-Doc-

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Unreliable IDE?

Post by Mark » Thu May 27, 2010 7:40 pm

Hi Doc,

I don't need to have my every wish granted. All I would like to see is a reliable IDE :-)

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

phaworth
Posts: 592
Joined: Thu Jun 11, 2009 9:51 pm

Re: Unreliable IDE?

Post by phaworth » Thu May 27, 2010 7:55 pm

Seconded. I just want the IDE (or any program I use for that matter) to protect me from myself and not happily throw away changes I make without warning me or worse yet, save changes that I explicitly asked not to be saved. Once again, Rev is a great tool but every program has areas where there's room for improvement and my personal opinion is that the IDE fits that bill.

I have started using the tRev script editor instead of Rev's script editor and I see that the developers of that tool did offer a replacement IDE at one point but I've been unable to find it for sale anywhere now. Any input on that situation?

Pete

paul_gr
Posts: 319
Joined: Fri Dec 08, 2006 7:38 pm

Re: Unreliable IDE?

Post by paul_gr » Thu May 27, 2010 9:14 pm

I've been using Rev since 2006 when I decided to try a development environment that was not Windows based; Rev is brilliant for smaller projects but every time I try to expand them past a certain point I have enough stability problems to make me give up.
Not saving changes has been a major problem; using the AltArchive plugin can be a godsend...

The most annoying thing is that Rev offers so much... I just want things to be a bit more predictable.

IMO RunRev has too many projects under development at the moment and resources are spread out a little too much...


Paul
Last edited by paul_gr on Thu May 27, 2010 11:55 pm, edited 1 time in total.

Curry
Posts: 111
Joined: Mon Oct 15, 2007 11:34 pm
Contact:

Re: Unreliable IDE?

Post by Curry » Thu May 27, 2010 11:48 pm

Folks, it's a okay idea to request more accurate "dirty" awareness and save requesting, but in the end it boils down to fundamentals: do you trust your own judgment or the IDE?

In my view save requesting should be to avoid losing work through accidentally clicking the close box. For this purpose, the old-fashioned "Are you sure you want to quit?" kind of prompt might work just as well.

It's hard to protect people from themselves, and that can also be dangerous unless it's done just right. Auto-save in word processors is great, but it is possible to delete a section without realizing it, and if you then close--voila, it's gone! Sometimes in Rev you want to do something to a stack without saving changes. Since there are so many ways to make changes, and it's such a dynamic environment, sometimes scripts are creating and deleting temporary objects or setting other scripts, I think it might be almost impossible to always outguess the developer in determining what's a real change and what's not. Under the surface Rev is incredibly different from Visual Basic or C or what have you.

Here's what works for me, and I think it's a habit that could work for anyone:

Every time I edit a script, I'm in the habit of hitting Enter-Enter to compile and then Control-S to save. Always. (Unless it's a very small edit where I want to see what effect it has before committing it.) And at least once per session, but usually every 30 minutes or so if I'm adding a lot of code, I go to the desktop and duplicate the stack to make a backup. If I accidentally or misguidedly destroy good code, I can dig it out again. And once a day I copy important files I've worked on to a storage area off my computer.

I like it this way. I'm in control. The IDE is not trying to outguess me on whether to save or not; it's my decision, just as it should be in my view. When I close a stack, I've always saved it already (and usually duplicated), so when it prompts, I may give it the okay to save again, but it doesn't really matter.

My habits make it irrelevant except if I physically misclick and accidentally close a window, and my habits usually prevent mayhem in that scenario too. If I lose some work, it makes me more careful about following those habits.

I don't want the IDE to hold my hand, and if it did, would that always be a good thing? Revolution is a different animal than many IDE's because the environment is always live and much more dynamic than your typical language. But I follow these same habits also with other IDE's, because my work is too valuable to trust to any automatic management system. It's just too much responsibility to hand over to any IDE, or OS, or whatever. I decide what gets saved, what is backed up, when, and how. I wouldn't feel comfortable any other way. I don't want to be outguessed, limited, or have something "all taken care of" to lull me into a false sense of security preceding a major mixup.

Plus, even the best dirty awareness can't protect you from sudden crashes, computer failure and so on. I really suggest taking responsibility in your own hands for the best results in any IDE or any software at all for that matter. It's best to manually save and back up right away after making important changes, and keep duplicating any important work files.

To change the subject to Paul's comment on stability: I find that Rev 4.0 for Mac is not as stable as its Windows counterpart. If that affects a project, look out for the next version, use an earlier version in the meantime, or try it on Windows for a wonderful experience right now! :-)
Best wishes,

Curry Kenworthy

LiveCode Development, Training & Consulting
http://livecodeconsulting.com/

WordLib: Conquer MS Word & OpenOffice
SpreadLib: "Excel-lent" spreadsheet import/export
http://livecodeaddons.com/

doc
Posts: 148
Joined: Fri Jun 09, 2006 4:30 pm

Re: Unreliable IDE?

Post by doc » Fri May 28, 2010 12:38 am

I really suggest taking responsibility in your own hands for the best results in any IDE or any software at all for that matter. It's best to manually save and back up right away after making important changes, and keep duplicating any important work files.
Well said.
-Doc-

Post Reply