common code patterns

Terry Judd terry.judd at unimelb.edu.au
Fri Aug 11 02:15:58 EDT 2017


Even better - the mobile commands could an error rather than spitting the dummy when called from a non-mobile environment.  I usually add my own mobile get and set handlers/functions that do the environment test and then pass the necessary parameter to either mobileControlGet or mobileControlSet to minimize the number of times I need to write this sort of code.

Terry...

On 11/08/2017 2:54 pm, "use-livecode on behalf of Scott Morrow via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:

    What about the use of mobile-only commands… needing to always wrap them in something to keep the IDE from touching.
    
    if "mobile" is in the environment then
      mobileControlSet tObject, tProp, tValue
    end if	
    
    
    > On Aug 10, 2017, at 6:50 PM, Monte Goulding via use-livecode <use-livecode at lists.runrev.com> wrote:
    > 
    > 
    >> On 11 Aug 2017, at 11:45 am, Mark Wieder via use-livecode <use-livecode at lists.runrev.com> wrote:
    >> 
    >> You know, if you'd post what you're trying to do it might be more possible to stay on target here. For instance, I regularly have to fill an array with constants in an initialization routine or use a custom property array filled with constants. Is that any help? Or are you looking to make a macro processor? Or a library of common <things>? Or something else?
    > 
    > A library of common <things> is probably the best description at the moment but the use case is not reusable handlers as we have other means for that.
    > 
    > Basically anything where you follow a common pattern to do a thing but you can’t abstract away so you don’t have to write the pattern any more.
    > 
    > Cheers
    > 
    > Monte
    > _______________________________________________
    > use-livecode mailing list
    > use-livecode at 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 at lists.runrev.com
    Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
    http://lists.runrev.com/mailman/listinfo/use-livecode
    



More information about the use-livecode mailing list