Author Topic: Created a form, closed, but no vusrobjs.e file? (SE2007 Trial)  (Read 4690 times)

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
I created a form, and it was just a test form that I'm done with now, and I'd like to delete it (it's taking up space in the forms list and has a silly name).

My ultimate goal is to delete this junky test form that I created, but as I've been researching how to do that I ran across numerous posts saying that forms like this automatically get saved to both the .sta file and also to vusrobjs.e, and that I can delete the .sta file, delete the form from the vusrobjs.e file, and reload, which will rebuild the .sta file without the form, thus effectively deleting the form.

The problem I've run into with that is that I cannot find the vusrobjs.e file anywhere.

Where does vusrobjs.e get created?  I ran a recursive where under the "c:\Program Files\SlickEdit 2007 Trial" folder, but there is no such file.  I even got a recursive directory listing and sorted by date/time but only 3 files have modtimes later than August 2007:  rescue.sta, vslick.sta, and vstrial.dat.  I can't find the vusrobjs.e file anywhere -- is creating a form still enough to cause it to get created?

I'm also a little confused about why modified forms always go into the state file, even if the form was opened from a macro file.  My natural thinking would be that even if I am customizing the editor for my own use and don't intend to publish my macros, it would still be helpful to keep my forms in source code form (if you'll pardon the two bit pun) by default so that they naturally survive corruption of the state file or upgrades or etc.  Is this one of those "yeah it's been beaten to death and someday will get better" types of things (I can live with that, I'm just curious is all :)), or is there a reason I'm missing that explains why it's usually advantageous for them to get saved in the state file instead?

I am a source-control-aholic and plan to keep all of my SlickEdit macros under source control, with revision history.  I want to be able to reliably recreate my editor configuration whenever I want to, from sources.

Graeme

  • Senior Community Member
  • Posts: 2450
  • Hero Points: 323
Re: Created a form, closed, but no vusrobjs.e file? (SE2007 Trial)
« Reply #1 on: March 11, 2008, 11:06:20 am »
Hi

vusrobjs.e should be created in your configuration folder when you run slick for the first time or when you create a new configuration folder.  You can see the location of your config folder in the help -> about dialog.  Every time you save a form in the form designer, vusrobjs.e will be immediately updated.  (On linux the name of the file is vunxobjs.e but you seem to be using Windows).

I don't know of an easy way of deleting a form.  Deleting vslick.sta (with slick closed) etc will work but it's not very elegant and it's possible you will have a few minor "hassles" when you next run slick.  Slick lets you have multiple configuration folders (see the -sc invocation option) so maybe you could do all your experimenting in a separate config folder.

I believe the reason forms go into the state file is to allow slick to start up quickly.  vusrobjs.e gets updated with all your own forms in source form.  If you want to save the source for a particular form separately from vusrobjs.e, you can copy it from vusrobjs.e or you can use the insert form or menu source command on the macro menu  - I wouldn't recommend putting this in a file that also contains source code unless you're willing to update it every time the form changes.  You could probably write a macro to copy the relevant form data from vusrobjs.e and automate it if you're really keen.

Graeme




Lee

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 1299
  • Hero Points: 130
Re: Created a form, closed, but no vusrobjs.e file? (SE2007 Trial)
« Reply #2 on: March 11, 2008, 12:55:57 pm »
Using Macro > Insert Form or Menu source (or just insert-object on the command line) is certainly handy for keeping track of your own forms in your own source files.  One thing to watch out for there is that if you reload the macro file with that in it, that replaces any changes you may have made, so you have to careful when making modifications with the form property editor.  Any time you save with the form editor, it gets saved to state file, but not directly to your source file.

If you really want to delete a form from the state file, you can do it with this little snippet:
Code: [Select]
int index=find_index(name,oi2type(OI_FORM));
delete_name(index);


chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: Created a form, closed, but no vusrobjs.e file? (SE2007 Trial)
« Reply #3 on: March 11, 2008, 06:22:17 pm »
Thanks very much, I found the config folder now.  Next I'll look for how to override where it goes (I want to install Slick to c:\SE and have the config folder be rooted under there).

From your replies I take it that I should make my form names as unique as possible, else if I load a macro from someone else their macro might overwrite one of my forms in the state file.  Is that right?

hs2

  • Senior Community Member
  • Posts: 2747
  • Hero Points: 288
Re: Created a form, closed, but no vusrobjs.e file? (SE2007 Trial)
« Reply #4 on: March 11, 2008, 11:21:24 pm »
Yes. Make your forms and/or macro modules and the contained macro commands (_command) as unique as possible. Within your e.g. 'chrisant.e' module make the contained funtions / variables as 'static' as possible.
Good luck, HS2