closeControl -- "switchable" ?

dunbarx at dunbarx at
Tue Jan 21 09:35:14 EST 2020

I meant "closeControl".

-----Original Message-----
From: Sannyasin Brahmanathaswami via use-livecode <use-livecode at>
To: How LiveCode <use-livecode at>
Cc: Sannyasin Brahmanathaswami <brahma at>
Sent: Tue, Jan 21, 2020 9:12 am
Subject: closeControl -- "switchable" ?

Using text only script behavior files has advantages and disadvantages. One "con" is the possibility of "rapid profileration" of text scripts (behavior, model, libraries etc.) 

 Your app could easily become like some horrendous-humongous PHP or JS framework with 100's of "dependencies."

I am trying control this by working with my "stories" module/stack, by just using two script

    # always "on" like a library/backscript, get stuff of disk
    # which is assigned to the stack, handled the UI/UX for stack

This approach requires a lot "Switch cases" as you may be targeting the UI/UX of many different groups  on the card or different cards. 

So far I am happy that I am having to  debug  just two scripts to manage "everything" 

But I have question on "closeControl" for which there may be many groups on a single card

is it "Switchable?"  and can we use it in a single behavior that "looks at"  many groups on one card?

on closeControl pControl
    switch pControl
        case "homeStory"
            setPref "preferences/modules/portal/story/storyTitle", pStoryTitle
            setPref "preferences/modules/portal/story/storyScene/", sLastScene
        case "storyMenu"
            put empty into fld "storyMenuFld"
        end switch
end closeControl

Of I can hack around and find out if it works. But I am thinking over otherd have 
"been here, done that". an have some advice...

We might as well use "on closeCard" 

any thoughts?

use-livecode mailing list
use-livecode at
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the use-livecode mailing list