` Printed Icetips Article

Icetips Article



Templates: Bug fix for duplicate embed name in Clarion template
1999-03-15 -- Arnor Baldvinsson
 
Newsgroups: topspeed.products.c5ee.bugs

Hi Adriaan,

On Mon, 15 Mar 1999 09:05:41 GMT, ieperen@nospamcll.nl (A. van
Ieperen) wrote:

>Below I have included an example primefields routine for my file with
>an auto-increment field. I have put a message in the "before adding
>auto-increment" embed (search for AVI1) and it is automatically copied
>to the "prime fields on insert" embed.
>
>I hope this has been clearer than my previous message.

Here is the reason and the fix;)

This is caused by a duplicate embed in the Control.tpw template, lines
585:

  #EMBED(%PrimeFields,'Prime record fields on Insert'),WHERE(%InsertAllowed)

and 663:

  #EMBED(%PrimeFields,'Before Adding Auto-Incremented Record'),WHERE(%InsertAllowed)

I would suggest changing the second embed symbol to something like:

%PrimeFieldsBeforeAddingRecord

As it is, it will cause a duplicate code both before the loop and
inside the loop.

Best regards,


Arnor Baldvinsson



Printed May 3, 2024, 3:38 am
This article has been viewed/printed 35121 times.
Google search has resulted in 23 hits on this article since January 25, 2004.