Author Topic: Auto revert?  (Read 21157 times)

0 Members and 1 Guest are viewing this topic.

Offline dagon

  • Newbie
  • *
  • Posts: 3
  • Activity:
    0%
  • Reputation Power: 0
  • dagon has no influence.
  • Respect: +1
  • Referrals: 0
    • View Profile
Re: Auto revert?
« Reply #15 on: August 30, 2009, 07:30:18 PM »
0
As a new script writer I just downloaded SUO and went at it, I didn't browse the forum for bugs to know what I might have to watch out for. So a couple suggestions:

1) Distribute a summary of known bugs with the program

2) Disable any disabling of the toolbar save button - it gives a false impression that the document has been saved. (When I ran the auto-indent and syntax checker the button greyed, I thought cool! it saved for me!)

3) Enable shortcuts! CTRL+S is save in every program in existence!

4) I did see that when you save a file a backup is also created, ok that's useful I guess, how about expanding that into automatic periodic document saves that save your work no matter what with datestamped filenames.  Either do it automatically and have the end user manage the saved data, or include built in options for management. Number of saves, frequency, etc.

And, more important than the rest

5) A better-than-nothing way of detecting changes in the document, if you can't come up with something more efficient and accurate, is to go along these lines.. ill go with an existing script file as the example

a) existing document is opened and loaded as normal..... but also loaded into and kept in memory in a variable

b) variable is then stripped of all line breaks and space characters

c) in a timer the existing document that is being worked on is run through the same process as the variable holding the original document.. and all line breaks and spaces are removed

d) current document is then compared to original document .. if they match no changes.. no save button, etc. if they dont match then there are changes and activate the save button (and/or autosave to temp file)

it's dirty, but it works. and off the top of my head the only two problems i could see ever arising out of this method is if/when someone actually changes a string from having one space character to two or more space characters.. for display formatting or whatever. since all spaces are removed the function will not know the difference and the save will not be activated for changes to spaces within senteces. and also for the script layout it self, if someone writes an unformatted script then uses the auto indent feature those changes will not be recognized, but thats where manual saving comes in

aside from that line breaks and spaces have no bearing on the actual content of the script, which really is more important than anything else..

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Auto revert?
« Reply #16 on: August 30, 2009, 07:51:24 PM »
0
Well again I can't stress enough about reading the forum regarding known issues.  That's the main reason this forum exists.

Otherwise, you are making lots of assumptions that are just not available in the current context.  If the current problems are that easy to solve, I guarantee you I would have them fixed already.  When you rely on a canned editor to maintain changes, you are also relying on the feedback that editor control gives regarding changes.  Since this editor doesn't give that kind of indication back, I have to override nearly every windows signal to manage every keystroke and determine if the text actually changed.  It's hard to explain the complexity with this control, so you just have to trust me when I say that if it was easy, I would have done it already. 

Actually, what I'll do to is add you to the beta section so you can see the progression as the program has been developed so you can have a taste of what has happened during the development.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline 12TimesOverTopic starter

  • Another Day, Another Vendetta
  • Global Moderator
  • *
  • *
  • Posts: 3694
  • Activity:
    0%
  • Reputation Power: 41
  • 12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.12TimesOver is a force to reckon with.
  • Gender: Male
  • Respect: +321
  • Referrals: 2
    • View Profile
Re: Auto revert?
« Reply #17 on: September 01, 2009, 02:59:13 AM »
0
Yep, you stumbled upon a doosy Dagon and I have been there before. "File" + "Save File" = no more issues since I brought this problem up originally. Some of us have to learn the hard way, sounds like you and I are similar in that regard. I never leave autosave functionality in charge of my work when I use MS Word, why in the world did I assume this would be fine when using ScriptUO? Inevitably learning the hard way was in my future, that's why.

You are free to use whatever scripting program you wish, go code in EasyUO if you like. TM has presented a package "AS IS" and most of us prefer it miles and miles over writing in EasyUO even with it's issues. BTW, we are all aware of these issues simply because we did read the bug forums not because someone handed us a list. We also know that there is nobody forcing us to use this platform, however, we chose to use it anyhow.

There are millions of far worse executables on the Internet than ScriptUO###.exe so comments like "remove ScriptUO from the Internet if you can't maintain it" come across as plain ignorant. I don't believe the connotations of this statement necessarily represent you, maybe you don't realize how arrogantly you are coming across? In either regard, I'll bet you won't have this issue anymore now that you know to hit Save manually now and again.

Looking forward to checking out your first script Dagon! Don't let something like lost work get in your way, some of us have lost hundreds of hours of work due to stupider things than this. We mourn for a bit, maybe decide to quit UO, then we pick back up and trudge forward until the only memory of the event is the lesson learned.

XII
When they come for me I'll be sitting at my desk
     with a gun in my hand wearing a bulletproof vest
My, my, my how the time does fly
     when you know you're gonna die by the end of the night

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13301
  • Activity:
    0%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Auto revert?
« Reply #18 on: September 07, 2009, 02:44:00 AM »
0
Yet another example of a development system eating my work happened today.  I was using SharpDevelop (their new beta 3 version) because it really does do a better job creating executables more optimized.  I was implementing the "Favorites" changes that just went into the 234 beta version.  When all of the sudden, the whole development system locked up and I had to 3-finger salute it.  When I got back, all my work had been reverted to a previous save point.  Thankfully, all the new form files were untouched, but the modifications to the existing files had reverted. 

I got pissed, got up and made a pot of coffee, and sat back down while the changes were still fresh in my head and re-composed all the interface code to enable the new Favorites form.  It took an additional 3 hours, but it got published.  I'm not entirely sure why it reverted like that because when you do a full compile, the development system saves everything for you.  I'm still confused.  However, that's just one example of 100s in my past of having to go back a bit in the development process.  It's a necessary evil, but I'll still use this new tool just because it's so much better than VCS, bugs and all.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline welgill

  • Don't mess with TM!
  • Jr. Member
  • **
  • Posts: 92
  • Activity:
    0%
  • Reputation Power: 0
  • welgill has no influence.
  • Gender: Male
  • Respect: +9
  • Referrals: 1
    • View Profile
Re: Auto revert?
« Reply #19 on: September 07, 2009, 04:38:04 AM »
0
@dagon From the sounds of your um... post I would say your pretty young. And I know that teachers since my old rear was in school using 5 1/4 in floppies on an apple IIe have ALWAYS ppounded into peoples heads save save save data loss is noones fault but your own. Then there is the other old addage about always reading the docs for a new piece of software which in this case is these forums.You yourself pointed out the age of this post so you have had ample time to read it. Sorry you lost data but umm back up your work.

Tags: