Text after revision is:
[ExposedMethod(ExposedMethodFlags.NeedContext, "Evaluate the block
for each item in the array; answer a new Array that includes on those
objects for which the block evaluated to true.")]
public BELArray Select(ExecutionContext ctx, Block block)
{
BELArray answer = new BELArray();
foreach (IBELObject each in Array)
{
ArrayList parms = new ArrayList();
try
{
parms.Add(each);
IBELObject objValue = block.Value(ctx, parms);
BELBoolean test = objValue as BELBoolean;
if (test == null)
throw new ExecutionException(ctx.CurrentLocation,
"Select block must evaluate to a boolean. Got " + BELType.BELTypeForType(
objValue.GetType()).ExternalTypeName + " instead.");
if (test.Value)
answer.Add(each);
}
catch(FlexWikiAuthorizationException ex)
{
//do nothing - error is inside WikiTalk and may be
safely ignored
if (ex != null)
ex = null;
}
}
return answer;
}
The error is always showing when I use a Select{ } in WikiTalk. As I never
get the value in the array I do not get the problem of a second iteration.
However, there may be other cases where this is a problem. I am
investigating for cases other than Select{ }.
John Davidson
On 9/28/07, David Ornstein <[EMAIL PROTECTED]> wrote:
>
> Could you send the full text of the updated version of BELArray:Select?
>
>
>
>
>
-------------------------------------------------------------------------
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