Ticket #1301 (closed defect: fixed)

Opened 2 years ago

Last modified 1 day ago

[PATCH] Improved reloading mechanism in TurboKid

Reported by: chrisz Assigned to: faide
Priority: high Milestone: 1.0.2
Component: Kid Version: 1.0
Severity: major Keywords:
Cc:

Description

The reloading mechanism in TurboKid? did not work properly when you have two templates that are dependent on the same base template. When you update the bas template and load the first template, the template and its base template is reloaded. But when you load the second template, it is not reloaded though its base templated has changed. This leads to an incompatibility of the template and its base template, resulting in the notorious "Initialize / NoneType? not callable bug".

The attached patch improves the reload logic. We do not store the mtime for the template files, but the maximum of the mtime of the template and all its base templates. If a base template has been touched, the template will also be reloaded.

Attachments

turbokid_reload.patch (7.5 kB) - added by chrisz on 02/12/07 00:17:13.
TurboKid? patch for reload mechanism
turbokid_reload_and_filter.patch (7.9 kB) - added by chrisz on 02/12/07 09:16:30.
TurboKid? patch for reload mechanism and i18n filter

Change History

02/11/07 17:53:45 changed by jorge.vargas

  • owner set to jorge.vargas.
  • component changed from unassigned to Kid.

please check out your editor's config it has some mix of CRLF and LF, also there are some lines with 5 spaces. I'm not sure if that's from the original code.

I'll add this to my TODO list.

02/12/07 00:17:13 changed by chrisz

  • attachment turbokid_reload.patch added.

TurboKid? patch for reload mechanism

02/12/07 00:30:29 changed by chrisz

I have created the patch with TSVN which used CRLF instead of LF for the control lines though the file uses LFs only. I don't think that should cause any problems, but I have uploaded again with CRLFs converted to LFs. The 5 spaces are an artifact of the patch program which adds the first column, the actual code uses only 4 spaces. If you click on the patch link above, you will see that trac can apply the patch, so it should be ok.

02/12/07 09:15:47 changed by chrisz

I have attached an expanded patch that solves another problem with TurboKid? if you are using i18n, reported here on the Kid trac.

02/12/07 09:16:30 changed by chrisz

  • attachment turbokid_reload_and_filter.patch added.

TurboKid? patch for reload mechanism and i18n filter

03/29/07 13:50:04 changed by faide

  • owner changed from jorge.vargas to faide.
  • status changed from new to assigned.

Applied to TurboKid? trunk yesterday. Thanks!

03/29/07 13:50:16 changed by faide

  • status changed from assigned to closed.
  • resolution set to fixed.