Red vid fancy window opens more than one window

View [
    Size 400x400
    button "click" [
        view/flags [
            Size 300x100
            text "modal window"
        ]['modal 'pop-up]
   ]
]

      

The problem is, if I click the button 4 times, it will create 4 modals. But I don't want another modal if 1 modal is already open. How can i do this

+3


source to share


1 answer


You have several typos in your code to make it not work as expected:

  • should be popup

    instead pop-up

    . Flags
  • there should be words in the block, not lit words, so it should be [modal popup]

    .

After these fixes, your code works as expected.



Note. I think the argument block /flags

needs to be improved to accept lit words.

EDIT: /flags

now accepts lit.

+3


source







All Articles