Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

13
LINES

< > BotCompany Repo | #1015872 // disableButtonWhileCalcing2 - for button actions

JavaX fragment (include)

// if f returns true, form is hidden
static void disableButtonWhileCalcing2(final O /*F0<Bool>*/ f) {
  final JButton button = heldInstance(JButton);
  disableButton(button);
  thread {
    try {
      bool ok = isTrue(callF(f));
      if (ok) disposePossiblyInternalFrame(button);
    } finally {
      enableButton(button);
    }
  }
}

Author comment

Began life as a copy of #1015736

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1015872
Snippet name: disableButtonWhileCalcing2 - for button actions
Eternal ID of this version: #1015872/4
Text MD5: c6a7b6d7f4d43e0a3e928cc9b04f92b3
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-06-18 13:25:51
Source code size: 349 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 368 / 421
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1016419 - disableAndRenameButtonWhileCalcing2
#1033901 - buttonActionWithPreAndPost