Sorry,
I meant "closeControl".
Craig

-----Original Message-----
From: Sannyasin Brahmanathaswami via use-livecode 
<use-livecode@lists.runrev.com>
To: How LiveCode <use-livecode@lists.runrev.com>
Cc: Sannyasin Brahmanathaswami <bra...@hindu.org>
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

model_Story.livecodescript         
    # always "on" like a library/backscript, get stuff of disk
behavior_Story.livecodescript     
    # 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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to