History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-2539
Type: Bug Bug
Status: Verified Verified
Resolution: Fixed
Priority: P0 P0
Assignee: Frisco Del Rosario
Reporter: Benjamin Shine
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Implement $style constraints in the compiler

Created: 22/Aug/06 09:24 PM   Updated: 15/Sep/06 11:43 AM
Component/s: Compiler
Affects Version/s: 3.4
Fix Version/s: 3.4

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 1,666
Runtime: N/A
Fix in hand: False


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Benjamin Shine - 22/Aug/06 09:25 PM
PTW already implemented this, and I have the changeset for review.

P T Withington - 25/Aug/06 05:07 PM
Is there some reason to wait on checking this change in? It should be innocuous, since it just adds a $style method to nodes with $style constraints. Until the runtime actually invokes that method, nothing will happen.

P T Withington - 29/Aug/06 02:08 PM
r1666 | ptw | 2006-08-25 19:03:35 -0400 (Fri, 25 Aug 2006) | 33 lines
Changed paths:
   M /openlaszlo/branches/coal/WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java

Change change.7sdt5h8wX.txt by ptw@tin-woodsman.local /Users/ptw/pending-changes/ on 2006-08-22 14:50:20 EDT

Summary: Parse $style constraints

New Features:

    <view height="$style{'height'}" width="$style{widthStyle}">
      <attribute name="widthStyle" value="'width'" />
    </view>

will be parsed and generate an internal method `$style` with the
following definition:

    function () { with (this) return {height: 'height', width: widthStyle}}

which can be invoked by CSSApplyStyle to build the style map. Note
that style constraints are expressions that will be evaluated in the
instance's context, cf., the definition of width above.

Bugs Fixed:
LPP-2539 Implement $style constraints in the compiler

Technical Reviewer: hminsky (Message-ID: <8c61fad60608240847m2d8efef7vf0433088dfa16a04@mail.gmail.com>)
QA Reviewer: ben (Message-Id: <3069D4BB-44D3-4A4F-A1CF-0FA812497CB6@laszlosystems.com>)
Doc Reviewer: adam (pending)

Details:
    Add a new 'when' case `style`. Accumulate them in a map.
    Convert that map to a function that will return a Javascript hash
    representation of the map.

Tests:
    Visually inspected the output of lzx --script

Benjamin Shine - 15/Sep/06 11:18 AM
This has been fixed for a while. Please verify and close.