Opened 16 years ago

Last modified 7 years ago

#179 assigned task

No macro playback for modal windows

Reported by: westram Owned by: westram
Priority: minor Milestone:
Component: Library (GUI) Version: SVN
Keywords: macros Cc:

Description (last modified by westram)

Macros do not work with modal dialogs.

Example:

BIO::remote_action($gb_main,'ARB_NT','sai_admin');
BIO::remote_awar($gb_main,'ARB_NT','tmp/focus/sai_name','HELIX');
BIO::remote_action($gb_main,'ARB_NT','INFO_OF_SAI/RENAME');
BIO::remote_awar($gb_main,'ARB_NT','tmp/input/string','HELIXx');
BIO::remote_action($gb_main,'ARB_NT','Rename_SAI/Ok');

Execution hangs in "INFO_OF_SAI/RENAME" and waits for the user to enter a SAI name.

Solutions:

  • dont use modal dialogs (recommended)
    • use AWT_activate_prompt instead of aw_input
      • example changeset: [16491]
      • (related) example for replacing simple prompter-window: [16489]
    • "Increase ali size..?" → checkbox [12583]
    • questions in 'MODIFY DATABASE FIELD of listed' → checkboxes [12791]
  • add "Never ask again" toggles to modal question windows [8359]
    • when selected, store next answer as default answer
    • add "Again ask me everything" to Properties menu
  • enhance way actions are recorded (not sure whether this may work) (too complex)

(see also #63)

Change History (14)

comment:1 Changed 13 years ago by westram

  • Description modified (diff)

comment:2 Changed 13 years ago by westram

  • Component changed from !NoIdea to Library (GUI)
  • Priority changed from normal to minor
  • [8359] implements "Never ask again" toggles, making it possible to work with macros that trigger modal question dialogs
  • other modal dialogs (e.g. those requesting a string/file) are still problematic. They should be replaced with a different way to get the needed input from the user (e.g. ask before starting the action)

comment:3 follow-up: Changed 12 years ago by epruesse

  • Cc epruesse@… added

What's the state here? Especially with respect to the MACRO branches?

I expect to be able to remove most of the AW_modal code in favor of native modal windows as soon as I get around to it.

comment:4 in reply to: ↑ 3 Changed 12 years ago by westram

Replying to epruesse:

What's the state here? Especially with respect to the MACRO branches?

nothing special with macro branch

I expect to be able to remove most of the AW_modal code in favor of native modal windows as soon as I get around to it.

modal windows are interactive and macros non-interactive (by design). I think it will never harmonize, so imo the 1st solution is recommended.

comment:5 follow-up: Changed 12 years ago by epruesse

It should be possible to do for an exact replay.

Still, you are right, once you try to run the macro on different data, it's likely to block on an unexpected question. Basically, we'd have to allow registering a callback that answers the dynamic questions programmatically.

That said, macros are broken in GTK for now anyway. I'm still thinking about the right way to formalize actions. Since changing an awar is an action, too, it might become a base class for awar.

comment:6 in reply to: ↑ 5 Changed 12 years ago by westram

Replying to epruesse:

That said, macros are broken in GTK for now anyway. I'm still thinking about the right way to formalize actions. Since changing an awar is an action, too, it might become a base class for awar.

There are several ways an awar can change:

  1. as direct effect of a user doing sth in the GUI
  2. by writing to the awar (e.g. from a callback, from macro code, or even a plain write to the corresponding DB entry)

Only 1. should be regarded as action and get recorded.

comment:7 Changed 11 years ago by westram

  • Cc epruesse@… removed
  • Description modified (diff)

comment:8 Changed 10 years ago by westram

  • Description modified (diff)
  • Owner changed from devel to westram
  • Status changed from new to _started

comment:9 Changed 10 years ago by westram

  • Description modified (diff)
  • Status changed from _started to assigned

comment:10 Changed 10 years ago by westram

  • Status changed from assigned to _started

comment:11 Changed 10 years ago by westram

  • Description modified (diff)
  • Status changed from _started to assigned

Original example from description

BIO::remote_action($gb_main,"ARB_NT","selection_admin");
BIO::remote_action($gb_main,"ARB_NT","SPECIES_SELECTIONS/STORE"); 
BIO::remote_awar($gb_main,"ARB_NT","tmp/input/string","bla");
BIO::remote_action($gb_main,"ARB_NT","CREATE_CONFIGURATION/OK"); 
BIO::remote_action($gb_main,"ARB_NT","SPECIES_SELECTIONS/CLOSE");

fixed by [12848]

comment:12 Changed 7 years ago by westram

  • Status changed from assigned to _started

comment:13 Changed 7 years ago by westram

  • Description modified (diff)

comment:14 Changed 7 years ago by westram

  • Status changed from _started to assigned
Note: See TracTickets for help on using tickets.