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

Key: LPP-4315
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: -- --
Assignee: Max Carlson
Reporter: André Bargull
Votes: 0
Watchers: 0
Operations

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

"datalistselector#findIndex(..)" attempts to compare a "LzDataElement" against a "LzView"

Created: 18/Jul/07 03:12 PM   Updated: 19/Aug/07 10:26 AM
Component/s: Components - base
Affects Version/s: 4.0.2
Fix Version/s: 4.0.5WaffleCone

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 6,151
Runtime: N/A
Flags: External
Fix in hand: True


 Description  « Hide
As you see, "target_element" will be of type "LzDataElement", and as you also see it will be compared against a "LzView" ( "immediateparent.subviews[0] == target_element " ):

"datalistselector.lzx":
[code]
<method name="findIndex" args="s"> <![CDATA[
  var target_element;
  if (s instanceof LzView) {
    target_element = s.datapath.p;
  } else {
    target_element = s.p;
  }
  
  if ( ! immediateparent.subviews[0].cloneManager ) {
    return (immediateparent.subviews[0] == target_element ? 0 : -1);
  }
  
  ...
</method>
[/code]

That's like saying "true == false" and asking yourself why this condition will never be true...
Fixed version must be:
[code]
  if ( ! immediateparent.subviews[0].cloneManager ) {
    return (immediateparent.subviews[0] == s ? 0 : -1);
  }
[/code]

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.