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

10
LINES

< > BotCompany Repo | #1030759 // dm_floatFieldSetterDialog

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (11453L/74K).

svoid mapMethodLike dm_floatFieldSetterDialog(S field, O... _) {
  DynModule m = dm_current_mandatory();
  S humanized = humanizeFormLabel(field);
  JTextField tf = jtextfield(get(m, field));
  showFormTitled(or2(stringOptPar(_, 'formTitle), "Set " + humanized),
    humanized + ":", tf, r {
      m.setField(field, parseFloat(gtt(tf)));
      callF(optPar(_, 'onSet));
    });
}

Author comment

Began life as a copy of #1027015

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030759
Snippet name: dm_floatFieldSetterDialog
Eternal ID of this version: #1030759/1
Text MD5: d9c41df347e7a9a2d07ee1bdf8a5b8ac
Transpilation MD5: 73e70a8d411d473d4c37e573d55f2cc2
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-03-19 14:42:01
Source code size: 388 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 94 / 152
Referenced in: [show references]