Author Topic: migrating our macros to 2012 version  (Read 773 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

  • Community Member
  • Posts: 1265
  • Hero Points: 119
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

  • Community Member
  • Posts: 1338
  • Hero Points: 154
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

  • Community Member
  • Posts: 1265
  • Hero Points: 119
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

  • Community Member
  • Posts: 1338
  • Hero Points: 154
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.