I had a minor cut/paste syntax error...
hasOpenTask(p)
... instead of ...
isOpenTask(p)
... but resolved it, and it is working now.It creates the list.
In my case, I put tasks under a parent node, which is usually either myself
or another person.Showing the parents, but only the
On Fri, Feb 26, 2016 at 9:49 AM, Richard Andersen
wrote:
> Thank you very much, Edward.
>
> I have the code working now.It is finding all my nodes, so I'll see if
> I can figure out what further changes will limit the result set to just
> those with open and todo tags.
>
Huh? Didn't this d
On Fri, Feb 26, 2016 at 9:23 AM, 'Terry Brown' via leo-editor <
leo-editor@googlegroups.com> wrote:
Sorry to bring up the "inadmissible" ;-) solutions again, but todo.py
> includes icons, of course, and a "go to next todo node" which seems to
> cover similar ground to the finding nodes which have
Thank you very much, Edward.
I have the code working now.It is finding all my nodes, so I'll see if
I can figure out what further changes will limit the result set to just
those with open and todo tags.
-Richard
On Friday, February 26, 2016 at 6:47:29 AM UTC-8, Edward K. Ream wrote:
>
> On
>
> From: Edward K. Ream
>To: leo-editor
>Sent: Friday, February 26, 2016 8:47 AM
>Subject: Re: Code Academy: find by predicate or attribute
>
>On Friday, February 26, 2016 at 6:42:34 AM UTC-6, Edward K. Ream wrote:
>
>> O
On Friday, February 26, 2016 at 6:42:34 AM UTC-6, Edward K. Ream wrote:
> On Thu, Feb 25, 2016 at 6:42 PM, Richard Andersen
wrote:
>> I'd like...to use the Clone Find All Flattened command to find all my
Nodes which are "open tasks"...Ideally, these would be shown in context
with the parent
On Fri, Feb 26, 2016 at 6:42 AM, Edward K. Ream wrote:
Oops. hasOpenTask misuses the else clause after a for loop. There is no
break statement, so it should be this:
def hasOpenTask(p):
> '''Return True if p is a top-level node containing any open task.'''
> if p.parent():
> re
On Thu, Feb 25, 2016 at 6:42 PM, Richard Andersen
wrote:
>
What I'd like to do next is to use the Clone Find All Flattened command to
find all my Nodes which are "open tasks"
...
Use c.cloneFindByPredicate. Like this (tested code):
tc = c.theTagController
def isOpenTask(p):
tags = tc.
On Thu, Feb 25, 2016 at 6:12 AM, Edward K. Ream wrote:
> Writing the cffm and cfam commands was snap using c.cloneFindByPredicate,
> a powerful new addition to Leo.
>
Recent revs add the following new position methods:
- p.is_at_all(): True if p is an @ node containing an @all directive.
- p.
On Thu, Feb 25, 2016 at 6:12 AM, Edward K. Ream wrote:
> Writing the cffm and cfam commands was snap using c.cloneFindByPredicate,
> a powerful new addition to Leo.
>
c.cloneFindByPredicate now supports an optional failMsg keyword arg. This
is the warning given if no nodes are found.
EKR
--
Edward -- these are really useful improvements!
I have the latest build and am testing out the new commands. Clone Find
All Flattened is really useful.I am using a combination of Tags and
Icons to track open and closed tasks.
Here's an example of one script to mark a node as an open
Writing the cffm and cfam commands was snap using c.cloneFindByPredicate, a
powerful new addition to Leo. Here is the entire code for the new commands:
@cmd('clone-find-all-marked')
@cmd('cfam')
def cloneFindAllMarked(self, event=None):
'''The clone-find-all-marked command.'''
12 matches
Mail list logo