Author Topic: ToDo List Toolbar (Updated for SE2022)  (Read 81849 times)

MartyL

  • Senior Community Member
  • Posts: 166
  • Hero Points: 29
  • Synergex
Re: ToDo List Toolbar
« Reply #30 on: September 23, 2016, 05:19:36 PM »
It's been a while, but I just gave Sandra's most recent version a try in SE18 and the descriptions were working okay as long as I followed this format:
Code: [Select]
// TODO description: more info
I can't imagine that the regex broke in a new SE version, but the tree view could have changed.

LBCEi

  • Senior Community Member
  • Posts: 261
  • Hero Points: 21
Re: ToDo List Toolbar
« Reply #31 on: September 23, 2016, 05:25:58 PM »
I have been using the "Alternate TDML" form.  For example:
Code: [Select]
//TODO: (LB) DMAenabled = TRUE;
Perhaps the regex for this got broken?

MartyL

  • Senior Community Member
  • Posts: 166
  • Hero Points: 29
  • Synergex
Re: ToDo List Toolbar
« Reply #32 on: September 23, 2016, 05:28:11 PM »
The regex certainly doesn't seem to handle the parenthesis, that's for sure. Should be an easy enough fix.

LBCEi

  • Senior Community Member
  • Posts: 261
  • Hero Points: 21
Re: ToDo List Toolbar
« Reply #33 on: September 23, 2016, 05:32:48 PM »
I don't always use the parentheses but I do almost always start the comment like this:

Code: [Select]
//TODO:

MartyL

  • Senior Community Member
  • Posts: 166
  • Hero Points: 29
  • Synergex
Re: ToDo List Toolbar
« Reply #34 on: September 23, 2016, 05:35:50 PM »
Give this one a try and let me know if it works better.
« Last Edit: September 24, 2016, 05:50:27 AM by MartyL »

LBCEi

  • Senior Community Member
  • Posts: 261
  • Hero Points: 21
Re: ToDo List Toolbar
« Reply #35 on: September 23, 2016, 05:54:52 PM »
When I try to load this in SE2015 or SE2016b5 I get this message in the status bar:

Expecting procedure name - identifier not found - import may be required

I didn't try it in SE2014.  It seems to be related to the _tbIsVisible call in this section of code

Code: [Select]
defload()
{
    if (_tbIsVisible(_TBTODO))
    {
tbHide(_TBTODO);
    }


MartyL

  • Senior Community Member
  • Posts: 166
  • Hero Points: 29
  • Synergex
Re: ToDo List Toolbar
« Reply #36 on: September 23, 2016, 05:58:36 PM »
Downloading 2016 RC3 to take a look at it.

LBCEi

  • Senior Community Member
  • Posts: 261
  • Hero Points: 21
Re: ToDo List Toolbar
« Reply #37 on: September 23, 2016, 05:59:51 PM »
It does the same thing in 2015 (20.0.3)

MartyL

  • Senior Community Member
  • Posts: 166
  • Hero Points: 29
  • Synergex
Re: ToDo List Toolbar
« Reply #38 on: September 23, 2016, 08:21:17 PM »
It looks like somewhere between 18 and 21 (guessing 20), SlickEdit moved away from the toolbar type that this originally relied on. There's a whole new infrastructure for tool windows, instead.

Shouldn't be too bad to fix it but it isn't going to be backward compatible anymore.

MartyL

  • Senior Community Member
  • Posts: 166
  • Hero Points: 29
  • Synergex
Re: ToDo List Toolbar
« Reply #39 on: September 23, 2016, 08:49:30 PM »
Spoke too soon. Wasn't difficult to #ifdef between the versions. The new file should continue working on old editors.

Any chance you could try it on SE2015, LBCEi?
« Last Edit: September 24, 2016, 05:50:15 AM by MartyL »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: ToDo List Toolbar
« Reply #40 on: September 23, 2016, 08:51:50 PM »
Here's one that works for the newer APIs. I didn't try to make it work with older versions of SlickEdit.
« Last Edit: September 24, 2016, 01:00:16 PM by Clark »

LBCEi

  • Senior Community Member
  • Posts: 261
  • Hero Points: 21
Re: ToDo List Toolbar
« Reply #41 on: September 23, 2016, 10:14:15 PM »
@MartyL

Your revised version loads successfully in SE15 and SE16b5 but it still does not populate the description fields in the ToDo toolwindow or the Message List.

I'm going to try Clark's version next and I'll report back.

Thanks,
Les

LBCEi

  • Senior Community Member
  • Posts: 261
  • Hero Points: 21
Re: ToDo List Toolbar
« Reply #42 on: September 23, 2016, 10:39:14 PM »
Clark's version loads as well but also does not show the descriptions.

It looks like Marty put quite a bit of work into backward compatibility so, if we can fix the regex, I would vote for his version.  Personally, once SE16 is released, I doubt I'll use the older versions anymore but there are a lot of folks who are still using older versions (of course the number that use this macro with the Alternate TDML may be quite small).

There are some differences between Clark's version and the #if __VERSION__ >= 20 sections of Marty's version and I don't know which approach is best for these sections of the code.  There is a lot of commonality between the two sets of changes as well. 

Thank you both for looking into this
Les

MartyL

  • Senior Community Member
  • Posts: 166
  • Hero Points: 29
  • Synergex
Re: ToDo List Toolbar
« Reply #43 on: September 23, 2016, 11:20:14 PM »
Hopefully Clark drops back in here. It looks like someone broke SlickEdit Regular Expressions in 20/21. It looks like the actual bug is that a :b following a tagged expression breaks the tagged expression.

Consider the following test case:
Code: [Select]
// TODO: Simple test
The following two regexes produce different results:
Code: [Select]
{#0TODO}:b*
{#0TODO}[ \t]*

I'm modifying the file on the main post to work around this problem.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6826
  • Hero Points: 526
Re: ToDo List Toolbar
« Reply #44 on: September 24, 2016, 01:10:58 AM »
I fixed the regex. I have to admit that I don't know exactly what this code is supposed to do. I would have thought that the regex was supposed to pick up the todo message to the right of the colon but it definitely doesn't.