Author Topic: File Extension Setup no longer works  (Read 5542 times)

thefrogger

  • Community Member
  • Posts: 38
  • Hero Points: 2
File Extension Setup no longer works
« on: November 13, 2007, 07:03:58 pm »
I was attempting to create a toolbar icon in order to get quick access to toggling the "Enable line comment wrap" setting. Not knowing the command for doing this, I tried to record a macro, change the setting, and then see what command got saved into the macro. While this procedure did record and identify the _setext() command, it apparently broke the menu function for "File Extension Setup". Selecting that menu item now does nothing -- the menu disappears, and "Tools" on the menubar remains highlighted.

I can still get into the same dialog via "Document -> Comment setup", but if someone can help restore the functionality for the File Extension Setup menu option, that would be great.

Someone on the SlickEdit team might also want to verify and fix the anomaly, so here are the steps that caused the problem.

Macro -> Record Macro
Tools -> Options -> File Extension Setup
Turn on the "Enable line comment wrap" checkbox, and OK
Macro -> Stop Recording, and give it a name.

At this point, I suspect the File Extension Setup menu option is corrupted. I believe I looked at the recorded macro first to see what the commands were before noticing that the menu item no longer worked, but I'm pretty sure I never ran the macro, so this step probably isn't required.

If you have trouble recreating this problem, I can try again here once I find out how to restore the proper menu operation.

Thanks,

--
John



David_O

  • Senior Community Member
  • Posts: 152
  • Hero Points: 8
Re: File Extension Setup no longer works
« Reply #1 on: November 13, 2007, 07:57:12 pm »
I was about to put together some commands for you that would directly toggle these options, but I remembered that someone else submitted a module last year that already does what you need.  See the thread...

http://community.slickedit.com/index.php?topic=452.0


ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: File Extension Setup no longer works
« Reply #2 on: November 13, 2007, 08:14:15 pm »
Hi John,

We tried but we can't reproduce this problem. Nor does the recorded macro change the value of the setting.

To reset the menus, you need to reload sysobjs.e. WARNING: This will undo any menu customizations you might have done. To do this, on windows type the following into the SlickEdit command line:
     c:\SE2007\macros\sysobjs.e   

Use the correct path to the macros subdirectory on your machine. For Linux/UNIX type
   xcom /.../macros/sysobjs.e

Again, substitute the correct path to the macros directory.


As another route, you can inspect the function being called by the menu. Select Macro > Menus, then select _mdi_menu, and click Open.  Expand &Tools and &Options and select "File E&xtension Setup..."  It should look like this:




thefrogger

  • Community Member
  • Posts: 38
  • Hero Points: 2
Re: File Extension Setup no longer works
« Reply #3 on: November 13, 2007, 10:44:29 pm »
To reset the menus, you need to reload sysobjs.e.

This did not fix it. However your screen shot explained both what caused the original problem, as well as why the fix didn't work. I just happened to name my test macro "setupext", which must have overwritten the original function. I've since removed the macro, but is there an easy way to restore the setupext function without a reinstall?


hs2

  • Senior Community Member
  • Posts: 2728
  • Hero Points: 282
Re: File Extension Setup no longer works
« Reply #4 on: November 13, 2007, 10:53:10 pm »
Reloading 'setupext.e' (Macros->Load Module...) should do - HS2

hs2

  • Senior Community Member
  • Posts: 2728
  • Hero Points: 282
Re: File Extension Setup no longer works
« Reply #5 on: November 13, 2007, 10:59:30 pm »
BTW: You can add some user defined buttons to a toolbar in 'View>Toolbars>Customize>Categories tab.
After adding one or more (by dragging'em to a toolbar of you choice) you can r-click a button and setup it 'Properties' adding e.g. the 'toggle-line-comment-wrap' or 'tlcw' command contained in 'comment_wrap_quick.e'.
Good luck,
HS2
« Last Edit: November 13, 2007, 11:03:54 pm by hs2 »

thefrogger

  • Community Member
  • Posts: 38
  • Hero Points: 2
Re: File Extension Setup no longer works
« Reply #6 on: November 13, 2007, 11:40:19 pm »
Cool, everything is back to normal. I was worried that I had overwritten the file itself, but it was safe in the program's directory. Thanks HS2.

Thanks also to David for pointing out the existing macro with the functionality I was looking for. Works perfect.


hs2

  • Senior Community Member
  • Posts: 2728
  • Hero Points: 282
Re: File Extension Setup no longer works
« Reply #7 on: November 14, 2007, 12:09:17 am »
Thanks ;) - HS2