Extension Popup Menus' "Cancel Button"

Status: Accepted

Created by James Kanjo 27 Jul 2011 07:39

rating: +2+x

STE 3.43

When I went to use the SUO extension (not that I need to use it, hehehe), it is really cool how a mini Wizard comes up and prompts me for some essential variables.

However, when launch the extension, and it prompts me for some text, clicking “Cancel” brings up a “syntax error” message.

one.jpg
two.jpg
one.jpg
two.jpg

wdavatar?user=james-kanjo
James Kanjo

27 Jul 2011 07:43. Edited 0 times. (Edit, Permalink)
BTW, I'm liking how the error message has the STE logo on the Stop Sign XD

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

27 Jul 2011 11:04. Edited 0 times. (Edit, Permalink)
I think this was intentional, but it could probably be made more intuitive. Perhaps pressing cancel should act the same way as if you pressed 'OK' without entering anything? Basically, it would set the variable to an empty string ("").

I'm not sure if you are aware of this, but at the moment you can do something like this with your extensions:

  • Get input and store in a variable named "cat"
  • Put some code into the editor like this: [[module NewPage category="{$cat}"]]
  • Delete any occurrence of category=""

This means that if someone presses OK without entering a value, you can tell the extension to delete the whole parameter rather than leaving it there empty. I use this a lot for the ListPages extension. (it works because if the user did enter a value, then the text category="" won't exist at all and won't be deleted)

If Cancel was to act exactly the same way as if you pressed OK with no text entered, then it should probably be renamed to be a "Skip" button or something instead, to better describe it's purpose.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=james-kanjo
James Kanjo

27 Jul 2011 12:25. Edited 0 times. (Edit, Permalink)
Indeed, “Skip” is more appropriate here.

Included page "inc:signature" does not exist (create it now)

Post Reply

Add reply on "Extension Popup Menus' "Cancel Button""

CSS Theme, Images and Code on this website are © Shane Smith 2010-2012. All forum posts by users and documentation licensed under Creative Commons BY-NC-SA 3.0 License.