Author Topic: Non-functional toolbar buttons  (Read 3582 times)

yakir

  • Community Member
  • Posts: 50
  • Hero Points: 2
Non-functional toolbar buttons
« on: December 09, 2009, 07:43:11 am »
I have custom toolbar buttons, carried over from previous versions.
They respond to mouse-over, I can get & change their properties, but:
- they do nothing when pressed
- they cannot be removed on customize
I Created a new button, which works fine.

Extract from: userToolbars.xml:
         <Modification Command="workspace-organize" Caption="[WSP]" Action="0" Message="Workspaces" Prev="FIRST_ITEM" Next="workspace-organize" Type="3" />
         <Modification Command="workspace-organize" Caption="WSP" Action="0" Message="Workspaces" Prev="workspace-organize" Next="toggle_search" Type="3" />
         <Modification Command="toggle_search" Caption="[Srch]" Action="0" Message="Toggle Search window" Prev="workspace-organize" Next="new" Type="3" />
The second (new) one works fine, 1st & 3rd (older) don't.
Where else is data for these hiding?

Graeme

  • Senior Community Member
  • Posts: 2321
  • Hero Points: 305
Re: Non-functional toolbar buttons
« Reply #1 on: December 09, 2009, 09:56:15 am »
Quote
Where else is data for these hiding?

In the properties dialog, if you click the auto-enable button, when you change the auto-enable properties, the source file associated with the button is sometimes modified and re-compiled.  The change to the source file is to change the name attributes of the command associated with the button.

Maybe you could try creating yet another new button and see which files get changed.  Especially check vusrdefs.e and vusrobjs.e.

You could also try backing up your configuration folder then executing the command tbresetall on the slick command line.

Graeme

yakir

  • Community Member
  • Posts: 50
  • Hero Points: 2
Re: Non-functional toolbar buttons
« Reply #2 on: December 22, 2009, 05:57:53 am »
Still no solution for this problem.

Sandra

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 754
  • Hero Points: 35
Re: Non-functional toolbar buttons
« Reply #3 on: December 22, 2009, 03:17:30 pm »
I have been able to reproduce this problem.  I'll work on it for a while and see if I can a.) prevent it from happening again, and b.) get you a workaround.

Sandra

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 754
  • Hero Points: 35
Re: Non-functional toolbar buttons
« Reply #4 on: December 22, 2009, 04:13:10 pm »
Here's how to fix your current situation. 

Go to your configuration directory and open up vusrobjs.e (or vunxobjs.e for *NIX).  You should be able to find your modified toolbar in that file.  Within the toolbar, you'll find your buttons.  Each one will look something like this:
Code: [Select]
   _image  {
      p_auto_size=true;
      p_backcolor=0x80000005;
      p_border_style=BDS_NONE;
      p_caption='[WSP]';
      p_command='workspace-organize';
      p_forecolor=0x80000008;
      p_height=315;
      p_max_click=MC_SINGLE;
      p_message='Workspaces';
      p_Nofstates=1;
      p_picture='';
      p_stretch=false;
      p_style=PSPIC_HIGHLIGHTED_BUTTON;
      p_tab_index=1;
      p_value=0;
      p_width=690;
      p_x=210;
      p_y=45;
   }

You can either delete the offending buttons completely, or you can add a couple of lines to make the buttons work properly.  Add the following lines to the button (after the last line, p_y=45; in my example, is fine).
Code: [Select]

p_eventtab=_toolbars_prop_form.ctlpicture;
p_eventtab2=_ul2_picture;

Finally, save and close that file, and run the command "vusrobjs" (vunxobjs for *NIX) on the SlickEdit command line.  Close and reopen the toolbar with the non-working buttons.  If you deleted them, they'll be gone.  If you added the eventtab lines, then they should work properly.

I'll also check in a fix for this in v15, so no one has to go through this rigamarole.  Please let me know if this doesn't work for you or if my instructions are not clear enough.

yakir

  • Community Member
  • Posts: 50
  • Hero Points: 2
Re: Non-functional toolbar buttons
« Reply #5 on: December 23, 2009, 05:19:12 am »
Removal worked!

Thanks
-- Yakir