Closed Bug 435319 Opened 16 years ago Closed 16 years ago

Add tracking support to FormEngine

Categories

(Cloud Services :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: anant, Assigned: anant)

References

Details

Attachments

(1 file, 1 obsolete file)

FormEngine needs tracking support.
Blocks: 434816
Comments on the chosen strategy are inline with the code.
Attachment #322194 - Flags: review?(thunder)
Comment on attachment 322194 [details] [diff] [review]
Adds tracking support for FormsEngine

Why not keep track of the number of rows on init/reset, and then the score becomes (cur_rows - saved_rows) * some_multiplier ?
That's what we're doing now, aren't we?

_init: ... {
   ...
   this._rowCount = stmnt.getInt32(0);
   ...
}

get score() {
  ...
  var count = stmnt.getInt32(0);
  ...
  this._score = abs(this._rowCount - count) * 2;
  this._rowCount = count;
  ...
}
Ah, but you reset the row count inside get score().  Instead, only set it in _init() and reset().  That way it'll keep growing on each call.
Indeed. Updated patch attached.
Attachment #322194 - Attachment is obsolete: true
Attachment #322212 - Flags: review?(thunder)
Attachment #322194 - Flags: review?(thunder)
Comment on attachment 322212 [details] [diff] [review]
Add tracking support to FormsEngine v2

Nice, looks good!
Attachment #322212 - Flags: review?(thunder) → review+
Checked-in revision 367
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Component: Weave → General
Product: Mozilla Labs → Weave
QA Contact: weave → general
Severity: blocker → normal
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: