Author Topic: migrating our macros to 2012 version  (Read 7661 times)

boaz

  • Community Member
  • Posts: 43
  • Hero Points: 0
migrating our macros to 2012 version
« on: June 13, 2012, 06:58:26 AM »
Hi all,

I was trying to see if my macros are compatible to the new 2012 version,
and all I get is "incorrect version"
While I respect API changes, is there any document specifying - "what's new on slick-C for 2012 version?"

thanks
Boaz

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: migrating our macros to 2012 version
« Reply #1 on: June 13, 2012, 07:16:29 AM »
How are you trying to see if they're compatible?

The "incorrect version" error sounds like you're trying to load the .ex compiled files.  The .ex files won't be directly compatible, those always have to be recompiled with new editor versions.

But if you open the .e files and recompile them (Macro|Load Module), most will probably recompile without modification.  I use 29 third party macros, and the only change I had to make for v17 was in a few of them I had to rename "split_filename" to "_split_filename".

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: migrating our macros to 2012 version
« Reply #2 on: June 13, 2012, 07:31:30 AM »
I had this problem
http://community.slickedit.com/index.php/topic,8116.msg34555.html#msg34555

TREENODE_SELECTED was one of the problems.  In the code below, the four commented lines are what I used to have  - now replaced by one call to _TreeSelectLine


Code: [Select]
static void select_tree_item(int idx, int form_id = p_active_form)
{
   int state,bm1,bm2,flags;

   // Deselect all the items in the tree
   //form_id.FileListTree._TreeSetAllFlags(0,TREENODE_SELECTED);
   //
   //form_id.FileListTree._TreeGetInfo(idx,state,bm1,bm2,flags);
   //form_id.FileListTree._TreeSetInfo(idx,state,bm1,bm2,flags|TREENODE_SELECTED);
   //form_id.FileListTree._TreeSetCurIndex(idx);

   form_id.FileListTree._TreeSelectLine(idx);
}

boaz

  • Community Member
  • Posts: 43
  • Hero Points: 0
Re: migrating our macros to 2012 version
« Reply #3 on: June 13, 2012, 11:11:15 AM »
OK - so after deleting the .ex I get the "human readable errors" on the slickedit status bar.
My problem was:
_tbAddForm with the old BBSIDE_BOTTOM (changed to DOCKINGAREA_BOTTOM)

now, I want to maintain 1 code for slickedit 17 and 16. is there a DEFINE I can use to determine the slickedit version?

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: migrating our macros to 2012 version
« Reply #4 on: June 13, 2012, 04:42:43 PM »
Yes.  An example:
Code: [Select]
#if __VERSION__ < 16
    // before v16
#elif __VERSION__ < 17
    // before v17
#else
    // v17 and higher
#endif

Graeme

  • Senior Community Member
  • Posts: 2796
  • Hero Points: 347
Re: migrating our macros to 2012 version
« Reply #5 on: June 13, 2012, 11:25:54 PM »
I wonder how come I got the "incorrect version" error than.  Slick should have re-compiled my macro files and given me human readable errors when it migrated my V16 config to V17.  I'll have to try it again sometime.

sgartner

  • Community Member
  • Posts: 14
  • Hero Points: 2
Re: migrating our macros to 2012 version
« Reply #6 on: November 21, 2016, 07:36:48 PM »
I know this is an old topic, but I thought I'd add here that I had this exact same problem and the issue was that SlickEdit did not have write permission to the directory where the *.e script files were stored, so it couldn't write the compiled script file (the previous build probably had the same problem, but since the scripts had been, at some point, written by the SlickEdit compiler, it didn't complain until I upgraded).  The error of showing "out of date" isn't very helpful in this situation.