Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Show message

Show message 9 years 11 months ago #6317

  • beloni
  • beloni's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Karma: 0
It is very useful to present a popup message to the user so I decided to add show message command in the format:

show message/text="God save the Queen"/title="England"
Attachments:
Last Edit: 9 years 11 months ago by beloni.
The administrator has disabled public write access.

Show message 9 years 11 months ago #6322

  • beloni
  • beloni's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Karma: 0
We also need to check the user access level and present a question dialogue to get the users' reply. Something like
If userAccessLevel > 10 and DEMO == 1
    MessageBox("Application in DEMO mode. No operation permitted.", "DEMO Mode!")
Else
    If EMERGENCY == 0
        x = QuestionBox("Do you want to turn off all the motors?", "Emergency")
        If  x == 6
            EMERGENCY = 1
        Else
            EMERGENCY = 0
        Endif
    Else
        EMERGENCY = 0
    Endif
Endif
Last Edit: 9 years 11 months ago by beloni.
The administrator has disabled public write access.

Show message 9 years 11 months ago #6325

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3170
  • Thank you received: 497
  • Karma: 133
Can't you use a push button with confirm action ?

/Claes
The administrator has disabled public write access.

Show message 9 years 11 months ago #6327

  • beloni
  • beloni's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Karma: 0
We need the user reply in a variable
r = QuestionBox("Do you want to do something?", "Question");

What do you think of this patch?
Attachments:
Last Edit: 9 years 11 months ago by beloni.
The administrator has disabled public write access.

Show message 9 years 11 months ago #6329

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3170
  • Thank you received: 497
  • Karma: 133
There is a similar function in the configurator script named ConfirmDialog (in wb/lib/wb/src/wb_wnav_command.cpp) that also has an option whether to display a cancel button or not. I would prefer to have the same name in xtt.

Isn't the fact that it is modal going to block updating of alarm lists and graphs? I don't think that is acceptable.

/Claes
The administrator has disabled public write access.

Show message 9 years 11 months ago #6338

  • beloni
  • beloni's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Karma: 0
Hello Claes,

This one is similar to the wb script as you requested. What do you think?
Attachments:
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 7.447 seconds