Delete protection and Multisurface Undo

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

Delete protection and Multisurface Undo

Post by seaniepie » Mon Jan 02, 2012 2:30 pm

Hi,
Couple of requests only as a result of complete frustration. I cannot stress the number of times that, when trying to rename an object, that it will delete said object and then start renaming the Stack instead. This bothers me. Especially if the object had a massive script in it that I now have to rewrite!! Major pain.

So as a solution we need undos on multiple surfaces, i.e., the inspector has a series of undos and the workspace/stack needs undos (multiples according to user prefs). Then too we need some sort of 'Are you sure' dialogue over any buttons, images or other objects, especially if they contain a script! Many hours wasted as a result of a lack in this feature.

Cheers
Pi Digital

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Delete protection and Multisurface Undo

Post by Klaus » Mon Jan 02, 2012 3:26 pm

seaniepie wrote:...I cannot stress the number of times that, when trying to rename an object, that it will delete said object and then start renaming the Stack instead.
I really dislike the LiveCode IDE and do most of my work in MetaCard, but I NEVER experienced what you are talking about!?
How did you make this? In the inspector? Or via script?

This is not "normal" behavior, so we need more info to clear this!

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Delete protection and Multisurface Undo

Post by jacque » Mon Jan 02, 2012 5:27 pm

I have also never seen this behavior and I've been working in the LiveCode IDE for over 10 years. Can you tell us the steps you are taking when it happens? What's the recipe?

One way I could imagine this happening is that you have the object selected rather than the field text in the inspector. If that's true then yes, the object will delete. Choosing undo immediately will restore it. Do you specifically click the text of the inspector name field before hitting delete?
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Delete protection and Multisurface Undo

Post by dunbarx » Tue Jan 03, 2012 12:01 am

Is this possibly related to a recent thread about naming objects in the inspector, where, if one is not careful with the live selection, another object, usually the stack, is renamed instead? I think that discussion went along the lines of locking the inspector or opening multiple dedicated ones, or, again, being careful about what is currently blinking and where.

Nothing wrong with multiple undo, though.

Craig

seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

Re: Delete protection and Multisurface Undo

Post by seaniepie » Tue Jan 03, 2012 12:49 am

Hi Klaus and Jacque and Craig,

Klaus, what do you mean by working in MetaCard? Is that not a defunct product now that I would not be able to purchase or use (so the fact that it is apparently (according to you) a much better system to work on is merely frustrating to me :? ).

It seems to happen more so on Labels but has also happened on some Buttons too. Usually (when it behaves like this) it will jump to the stack and start renaming that (despite having clicked in the text box for the name entry of the selected object). If, however, I just want to delete the last character (I sometimes use an underscore at the end of labels to distinguish objects before defining the name later) then the deleteKey will, for no clear reason, delete that object even though I am absolutely sure that the text has been clicked on and the cursor is sitting ready (supposedly).

As to the undo, I've just tried this and duplicated it without fail. Start a new stack, add a new text field (Text Entry, ScrollingText or label), maybe several of them too, delete one then try undo. It never comes back. I've tried them with text entered and renamed and locked but still they never come back with an undo. However, If I group them, delete the group and then undo they come back as part of the group! I have had this with MobGUI items too but I have now stopped using mobGUI as it has proved very buggy and not a performance tool just yet (maybe once it comes out of alpha/beta it will be! Hopefully runrev will add truly native controllers though and avoid the need for MobGUI)

As to multiple undo's, again, create an empty stack, add about 3 buttons, now select then delete each one in turn. Now repeat the undo. For me it just undeletes then deletes the last one over and over. That's not multiple undo's. That's just one! Sure, I have multiples in the scripting editor but only one on the stack. Even if I just move an object I still only get one undo.

Hopefully this clarifies what I mean now. :)

Thanks
Pi

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Delete protection and Multisurface Undo

Post by jacque » Tue Jan 03, 2012 3:45 am

MetaCard is an alternate, and much older, IDE that you can use with the LiveCode engine. It is bare bones and is used mostly by those who are familiar with the engine and don't need as many interface hooks as LiveCode's native IDE provides. You'll do more with the command line than you do in LiveCode, not all properties are available in the inspector, most of the menu-related behaviors in the LiveCode IDE are largely missing, and so forth. It's a very good IDE for testing raw engine behavior and bugs because there's almost nothing in between you and the engine. It is free to download at the MC IDE group on Yahoo http://tech.groups.yahoo.com/group/MC_IDE/files/, and there is an installer that will put your current copy of the engine into the MC IDE. It's on the same page, called "MC_Setup".

If you are not completely familiar with what the engine can do and all the available commands and properties, you may find MC to be less intuitive. On the other hand, it's a good way to see how the engine works when you are completely in control. I think of MC a little like Linux -- there is much less hand-holding and you have to have a good mental map, which is either good or bad depending on your expectations.

But what you describe has never happened to me in either IDE. When the cursor is in the inspector fields, it stays there. Deletions are to the text, not to the object. I've never heard of anyone seeing the behavior you describe, which makes me wonder if you have any custom plugins or other add-ons in use. Something is refocusing the selection, which isn't native IDE behavior. Have you inserted any front or back scripts? Have you restarted LiveCode and tried to reproduce the problem with a new, blank mainstack (and nothing else open in the IDE)? Do you have any plugins open when it happens? Is your stack a toplevel stack?

I wish I could see a video of what's happening, but I suppose that would be hard to capture.

You're correct that there is only one level of undo when working with objects. Only the script editor has multiple undo. But a deleted object should come back if you undo immdiately before doing anything else. I just tested to make sure, and it works here. But you need to undo right away; the undo is lost as soon as you perform any other action.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

Re: Delete protection and Multisurface Undo

Post by seaniepie » Tue Jan 03, 2012 11:39 am

Hi again

No other Plugins (we only had MobGUI but have now got rid of it completely). Working on a blank stack. Behaviour seen again and again. Maybe no one else has commented on it because, like me, we've just put up with it. What I will do is screen capture all of my sessions with LC till it happens again. May be a couple of weeks or a couple of hours.

The issue with the undo is still happening to me. I immediately try the undo after deletion of a text field and it WILL NOT come back! I can do a screen grab of this if it will make you feel happier as I know you guys can't cope without seeing it and working on trust of a mans word ;)

Pi

seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

Re: Delete protection and Multisurface Undo

Post by seaniepie » Tue Jan 03, 2012 12:51 pm

As promised, here's a screen grab of my lack of undo feature attached:

https://www.yousendit.com/download/T2dl ... TGhBSXNUQw

Thanks
Pi

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Delete protection and Multisurface Undo

Post by Klaus » Tue Jan 03, 2012 1:40 pm

This looks like a bug to me, UNDO will work with buttons but not with fields.
Tested in MetaCard so this is obviously an engine issue, will bug report this now.

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Delete protection and Multisurface Undo

Post by Klaus » Tue Jan 03, 2012 1:47 pm


seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

Re: Delete protection and Multisurface Undo

Post by seaniepie » Tue Jan 03, 2012 2:25 pm

Thanks Klaus,

We could still do with multiple undos on the stack though.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Delete protection and Multisurface Undo

Post by jacque » Tue Jan 03, 2012 5:54 pm

Wow. Thanks for the video, I think you nailed it. I agree with Klaus it's an engine bug because I can reproduce it in the MetaCard IDE. When I did my test I was using a button. I wonder how long has this been going on. I'm sure it will be fixed in the next release.

Good work. I like your desktop pattern, btw. :)
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Delete protection and Multisurface Undo

Post by Klaus » Tue Jan 03, 2012 10:28 pm

jacque wrote:... I like your desktop pattern, btw. :)
Looks like a VOX AC 30, my first guitar amp more than 35 years ago (DAMN, I'm old!)!
Weight: at least a TON but excellent ROCK-sound :D

seaniepie
Posts: 154
Joined: Wed Sep 07, 2011 10:56 am

OT:Re: Delete protection and Multisurface Undo

Post by seaniepie » Tue Jan 03, 2012 11:06 pm

:wink: I worked on a tv show about them for the BBC a few weeks back and had to make a texture for some 3d graphics, so made this and made it fit my desktop :) We had Brian May playing the bohemian rhapsody solo for us on his for it. A-maz-ing! :mrgreen:

stam
Posts: 3061
Joined: Sun Jun 04, 2006 9:39 pm

Re: Delete protection and Multisurface Undo

Post by stam » Sun Jan 15, 2012 8:47 pm

seaniepie wrote:when trying to rename an object, that it will delete said object and then start renaming the Stack instead.
Yep same here. New to Livecode and it was bewildering. Now i save manually every time i attempt to edit button names...

Post Reply