Author Topic: Procedure tab-refresh not found  (Read 4416 times)

kjfb

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Procedure tab-refresh not found
« on: October 15, 2012, 12:27:18 PM »
how to call tab_refresh() (in bufftabs.e) from another, own developed .e?

Code: [Select]
project_file_quit(module_id)
{
   // Bug: Project file stays in toolbar "buffer list"

 //messageNwait( 'Before activate_view project_id' )
   activate_view project_id

 //messageNwait( 'Before _delete_buffer' )
   _delete_buffer

 //messageNwait( 'Before _quit_view' )
   _quit_view

 //messageNwait( 'Before activate_view module_id' )
   activate_view module_id

 //messageNwait( 'Before tab refresh' )
   tab_refresh()
}

i get an error, that the procedure cannot be found ...


the problem here is, that a project file .pro get's opened and some text is copied out (pre defined header definitions for new inserted code).
when this is finished the project file has a tab in the buffer list toolbar, but it should be closed.

when tryiing to save then, i get an error from void _update_mod_file_status() in bufftabs.e.

i did modify this function (void _update_mod_file_status() ) to do a tab_refresh(); first and this leads to no error, but the slick buffer list toolbar behaves strange then :-)

so... how to call this tab_refresh outside bufftabs.e ???

-------------------------------
i'm using Visual SlickEdit Version 9.0


greetings

MindprisM

  • Senior Community Member
  • Posts: 127
  • Hero Points: 8
Re: Procedure tab-refresh not found
« Reply #1 on: October 15, 2012, 02:21:52 PM »
tab_refresh is static - you cannot call it from outside the module, so make a non-static proc within the module that calls it, then call that proc.

bufftabs.e:
Code: [Select]
void tab_refresh_caller(int start_buf_id=-1){
   tab_refresh(start_buf_id);
}

kjfb

  • Junior Community Member
  • Posts: 4
  • Hero Points: 0
Re: Procedure tab-refresh not found
« Reply #2 on: October 16, 2012, 08:27:51 AM »
hey, thank you! this is working for me.

i had hope to get solution without editing bufftabs.e but this is ok, i can live with that ...

JakeMontgomery

  • Community Member
  • Posts: 79
  • Hero Points: 8
Re: Procedure tab-refresh not found
« Reply #3 on: November 18, 2012, 03:42:17 PM »
Not sure what you are trying to do, but would refresh_file_tabs() in bufftabs.e (17.0.2) work?