Rosetta Code/Count examples: Difference between revisions

Content added Content deleted
Line 352: Line 352:
cmcontinue string?;
cmcontinue string?;
title string?;
title string?;
allCategories Category[];
allTasks Task[];
restBindingCategories IHttp? = new HttpRest{
restBindingCategories IHttp? = new HttpRest{
Line 377: Line 377:
function pageDetailCallBack(pageResults string in)
function pageDetailCallBack(pageResults string in)
count int = countSubstring("=={{header", pageResults);
count int = countSubstring("=={{header", pageResults);
allCategories.appendElement(new Category { title = title, count = count });
allTasks.appendElement(new Task { title = title, count = count });
l2.text = l2.text as int + 1;
l2.text = l2.text as int + 1;
l4.text = l4.text as int + count;
l4.text = l4.text as int + count;
Line 385: Line 385:
returning to listTasksCallBack onException exceptionHandler;
returning to listTasksCallBack onException exceptionHandler;
else
else
dg1.data = allCategories as any[];
dg1.data = allTasks as any[];
end
end
end
end
Line 402: Line 402:
end
end


record Category
record Task
title string;
title string;
count int;
count int;