Uses 911K of libraries. Click here for Pure Java version (15797L/85K).
!7 cmodule MultiCommClient > DynMultiComm { switchable S password; transient S botID = #1026281; start { considerAllActive = true; dm_reloadOnFieldChange('password); } enhanceFrame { minFrameSize(f, 300, 300); } visualize { if (empty(password) || !testPassword()) { JPasswordField pw = centerTextField(jpassword(password)); ret jfullcenter(withCenteredTitle("Please enter password:", onEnter(pw, r { setField(password := gtt(pw)); }))); } ret awtEveryAndNow(super.visualize(), 10.0, r loadCustomersAndMessages); } bool testPassword() { S result = print(queryBackend("testAuth")); bool ok = startsWith(result, "OK"); if (!ok) infoBox("Password check failed: " + result); ret ok; } S queryBackend(S uri, O... params) { ret postPage(rawBotLink(botID, uri), paramsPlus(params, _pass := password)); } void loadCustomers q { importAllConceptsOfType(Customer, print("customers", unstructureList(queryBackend("activeCustomers"))), debug := true); } void loadCustomersAndMessages q { L l = unstructureList(queryBackend("activeCustomersAndMsgs")); importAllConceptsOfType(Customer, instancesOf Customer(l)); importAllConceptsOfType(Message, map(instancesOf Message(l), msg -> { msg.customer = getConcept(Customer, msg.customer.id); ret msg; })); } }
Began life as a copy of #1026282
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1026286 |
Snippet name: | IPTV Multi-Comm Client v2 [dev.] |
Eternal ID of this version: | #1026286/14 |
Text MD5: | b86315505d386621d227279c46364e88 |
Transpilation MD5: | d4db23e2b57c1030905a8215e6f76184 |
Author: | stefan |
Category: | javax / comm |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-12-12 00:46:54 |
Source code size: | 1465 bytes / 51 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 252 / 538 |
Version history: | 13 change(s) |
Referenced in: | [show references] |