Rosetta Code/Count examples: Difference between revisions

Line 327:
{{works with|EDT}}
[[File:Catcount.PNG|thumb|right|EGL: Graphical client implementation]]
A graphical implementation with a grid showing the number of implementations for each categoryRosetta Code task as well as total categorytask and implementation counts. Uses MediaWiki API service call to fetch tasks/categories in a JSON format and meets API data limit and continuation requirements to consume 100% of the items.
 
User Interface: RosettaCodeHandler.egl
Line 334:
import org.eclipse.edt.rui.widgets.*;
 
handler RosettaCodeHandler type RUIhandler{initialUI =[ui], title = "Rosetta Code CategoriesTasks and Counts"}
 
ui GridLayout{columns = 3, rows = 4, cellPadding = 4, children = [ b1, dg1, l1, l2, l3, l4 ]};
Line 354:
allTasks Task[];
restBindingCategoriesrestBindingTasks IHttp? = new HttpRest{
restType = eglx.rest.ServiceType.TrueRest,
request.uri = "http://rosettacode.org/mw/api.php?action=query&list=categorymembers&cmtitle=Category:Programming_Tasks&cmlimit=1&format=json"};
Line 363:
function b1_onClick(event Event in)
call ProxyFunctions.listTasks("") using restBindingCategoriesrestBindingTasks
returning to listTasksCallBack onException exceptionHandler;
end
Line 382:
if(cmcontinue != null)
call ProxyFunctions.listTasks(cmcontinue) using restBindingCategoriesrestBindingTasks
returning to listTasksCallBack onException exceptionHandler;
else
Anonymous user