Great, I like that! On Tue, Jan 11, 2011 at 6:08 PM, Max Carlson <[email protected]> wrote:
> http://jira.openlaszlo.org/jira/browse/LPP-9643 is the umbrella issue > > > On 1/5/11 9:34 AM, P T Withington wrote: > >> Hey Max, will you add Jira tasks for these issues, so they don't get lost? >> >> On 2011-01-05, at 11:47, P T Withington wrote: >> >> On 2011-01-05, at 11:34, Max Carlson wrote: >>> >>> It's time to add a runtime for mobile devices. Since Webkit is the >>>> defacto mobile browser, it seems like we could benefit by stripping all the >>>> non-Webkit specific code out of the LFC. I wanted to send out a proposal >>>> for how we plan to do this to see if anyone has suggestions! >>>> >>>> First, Tucker will add a separate 'mobile' LFC build. This will use the >>>> existing DHTML LFC build, but will also set a new compile time constant >>>> ($mobile) to true. >>>> >>>> Next, I'll take the existing DHTML LFC and add if (! $mobile) {...} >>>> blocks around the bits of the kernel that don't apply to Webkit browsers. >>>> This will take advantage of André's recent (awesome) work to improve the >>>> compile-time constant evaluator. Ideally, I wouldn't have to do this - the >>>> compiler would be able to take a table of 'quirks' set for Webkit and >>>> automatically drop out the if (quirks.foo) { ... } blocks. >>>> >>> >>> I wonder how hard it would be to add something like this to the compiler: >>> >>> #evalwhen (compile, load) { >>> quirks = []; >>> } >>> if ($mobile) { >>> #evalwhen (compile, load) { >>> quirks.foo = true; >>> quirks.bar = false; >>> ... >>> } >>> } >>> >>> And have the compile-time constant evaluator understand: >>> >>> if (quirks.foo) ... >>> >>> ? >>> >>> [see: http://bit.ly/hcunZK] >>> >>> Finally, Henry will remove the 'swf8' radio button on the developer's >>>> console in favor of a new 'mobile' one. >>>> >>> >>> >>> >> >
