GEN: Unknown Variable '%Family' On App Gen and Build

Hi All

i get the following error when i do a generate and build on some of my apps.
GEN: Unknown Variable ‘%Family’

If i go into a procedure and recompile it seems to go away but then will come back after i go add some code or edit a window etc.

I cant seem to find a common thread between the apps that have the issue , does anyone have any ideas?

Did you every figure out what it was?

Hey Paul
As of yet , i have still not found a common thread. I will admit it does not seem to happen as often as it used to but i suspect that’s more a symptom of the unconscious mind running the process in a way that tends to avoid it , much like the way we learn to not click to fast or enter embeds from the windows previewer , it can work , but its mostly likely going to cause a crash.

Wish i could give a solution here.

What template family are you using?

It ties into Family

#TEMPLATE( name, description ) [, PRIVATE ] [, FAMILY( sets ) ]

Usually ABC or Clarion, in the shipping templates, some variable’s contain the family set CW20.

ADOLOG.tpw and others use %AppTemplateFamily and cwado.tpl & cwHH.tpw & other’s use CW20.

ICONNECT.TPL will show Family being used like this ,FAMILY('ABC'),FAMILY('CW20') but another way to write family sets is
#Template(TemplateBuilderV5,'Template Builder v5'),Family('TB2','TB3','TB4','TB5').

You can use anything in the Family.
#Template( ClassWriter2, 'Class Writing Template for Clarion OOP' ), Family( 'Class' )
or you can simply leave it blank.

I would search for %Family where all your templates exist and see what comes up.

NotePad++ search in Files would be #Template.+%Family search mode regular expression.

Edit.

The Clarion Wizards template uses %UtilityTemplateSet and either ABC_Wizards or Clarion_Wizards.

I get no hits with %Family in the C6 shipping templates, so its likely to be a 3rd party template thats behind this error message.

Hello,

I traced similar problem few weeks back and it looks like the “GEN: Unknown Variable ‘%Family’” error comes from CapeSoft templates. %Family is declared in group at cape02.tpw which most of CS templates call before using %Family, but some of them do not.

For me it seems that the mechanism for the error appearing is that the templates are same priority and are not always processed in the same order so the error appears when template that does not call declaring group in cape02.tpw gets processed before a template that calls it does.

For now it looks like I got this fixed with a small extension template that does the call before CS templates get processed:

#EXTENSION(FixMissingFamily,'Fix "Missing %Family" template error'),APPLICATION,PRIORITY(4000)
  #Include('cape02.tpw')
#ATStart
#INSERT(%SetFamily)
#ENDAT

I found this thread.

Look at what gets exported

[APPLICATION]
VERSION 28
TODO Clarion ToDo
DICTIONARY 'TrigExam.dct'
PROCEDURE Main
[COMMON]
FROM Clarion
MODIFIED '2005/04/27' '18:23:37'
[PROMPTS]
[APPLICATION]
VERSION 28
TODO ABC ToDo
DICTIONARY 'TrigExam.dct'
PROCEDURE Main
[COMMON]
FROM ABC
MODIFIED '2005/04/27' '18:20:19'
[PROMPTS]

Maybe export to TXA, read the 3rd line into a %symbol and do a StrPos on it, something like #IF( StrPos( %Line, 'ABC', %TRUE) )

Or look for a %proceduretemplate that exists in the ABC family but not the CW family.