valueDiff for arrays?

Mark Waddingham mark at livecode.com
Sat Aug 4 12:36:23 EDT 2018


On 2018-08-04 18:25, Mark Wieder via use-livecode wrote:
> On 08/04/2018 08:57 AM, Mark Waddingham via use-livecode wrote:
> 
>> On a related note, I get the feeling I might have irked Mr Wieder the 
>> other day with regards the android permission thing - that wasn't my
> 
> No, not irked, and sorry if I gave that impression.
> My point was simply that the way I would approach this is (pseudocode 
> follows)
> 
> function mobilePermissions
>   switch platform
>     case "iOS"
>       return iosPermissions
>       break
>     case "Android"
>       return androidPermissions
>       break
>   end switch
> end mobilePermissions
> 
> private function iosPermissions
>   return_the_array_of_ios_permissions
> end iosPermissions
> 
> private function androidPermissions
>   throw "not yet implemented"
> end androidPermissions
> 
> ...document the fact that mobilePermissions is available *only* on iOS
> for now, and then flesh out the Android function later on. My thinking
> being that developers could use the mobileXXX functions when
> developing for iOS and then not have to change their code for Android
> down the line.

Heh - well your pseudo-code just essentially made my point for me - why 
does any of that need to be in the engine, if the engine provides the 
underlying wrappers around the OS functionality (as it is on the 
specific OS) to be able to write them? :)

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list