Unfortunately, I haven't been able to come up with an OR solution on FW 1.8,
but, if you use FW 2.0, you should be able to abstract the selection of
topics into a method like this:

:SelectCategoryTopics:{ keyword |
  namespace.Topics.Select{ each |
    each.HasProperty("Category") }.Select{ each |
      each.GetProperty("Category").Contains(keyword) }.Collect{ each | each
}
}

and then call the method multiple times and use the Array.Append method to
combine the results into a single array that contains all of the topics that
contain any of the keywords specified. You'll then need to do a final
Array.Unique to select all the unique elements before sorting and
collecting.

Hope this helps,

Derek
P.S. I tidied up the WikiTalk on the Sandbox topic to use a method to format
each entry :o)


On 9/10/07, Derek Lakin <[EMAIL PROTECTED]> wrote:
>
> Correct; that is to be expected. Here's what the WikiTalk does line by
> line:
>
> -- Select all of the topics in the current namespace
>  namespace.Topics.Select{ each |
> -- Refine the current selection with only those topics that have the
> "Category" property
>   each.HasProperty("Category") }.Select{ each |
> -- Refine the current selection with only those topics for which the
> "Category" property has the value "Toucan"
>    each.GetProperty("Category").Contains("Toucan")
> -- Refine the current selection with only those topics for which the
> "Category" property has the value "World"
>   }.Select{ each |
>    each.GetProperty("Category").Contains("World")
> -- Sort the current selection in date order
>   }.SortBy { each |
>    DateTime.Now.SpanBetween(each.LastModified)
> -- Now process the final collection
>   }.Collect{ each |
>    [
>     "||{+}\"", String.MaxLengthString(each.Name, 20, "..."), "\":",
> each.Name,
>     "||{+}", each.LastModified.ToLongDateString(), " ",
> each.LastModified.ToLongTimeString(),
>     "||{+}", each.LastModifiedBy,
>     "||{^}", each.HasProperty("RequiredBuild").IfTrueIfFalse(
>       { each.GetProperty("RequiredBuild") },
>       { "N/A" } ),
>     "||", each.Summary,
>     "||", Newline,
>    ]
>  }
> ]
>
> So you see, each successive Select statement further refines the
> collection so that the WikiTalk basically says collect all of the topics for
> which the "Category" property has the values "Toucan" AND "World".
>
> Presumably, you're raising the question because you want the keywords to
> be combined using an OR operator instead, i.e. all of the topics for which
> the "Category" property has the values "Toucan" OR "World"?
>
> Give me time to think about it and I'll see if I can come up with a
> solution for that scenario.
>
> Derek.
>
>  On 9/10/07, Astralis Lux <[EMAIL PROTECTED]> wrote:
>
> >  Derek,
> >
> > First, thanks for checking this out!
> >
> > Now go into that example and replace the word "world" in the WikiTalk
> > with something random (or even a different keyword) and you will notice the
> > problem: it won't select anything.
> >
> > http://www.flexwiki.com/default.aspx/FlexWiki/Sandbox.html
> >
> >
> > ------------------------------
> > Can you find the hidden words?  Take a break and play Seekadoo! Play
> > now! <http://club.live.com/seekadoo.aspx?icid=seek_wlmailtextlink>
> >
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2005.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Flexwiki-users mailing list
> > Flexwiki-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/flexwiki-users
> >
> >
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Flexwiki-users mailing list
Flexwiki-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flexwiki-users

Reply via email to