UserCodeRegion with EntityFieldName in name

Posts   
 
    
BertS
User
Posts: 89
Joined: 28-Jul-2005
# Posted on: 27-Aug-2005 16:53:27   

Hi,

I've added this code into a custom template:

<[UserCodeRegion StringValueEquals EntityFieldName "Custom($VALUE)FieldValidation"]>
' __LLBLGENRPO_USER_CODE_REGION_START <[UserCodeRegionName]>
' __LLBLGENPRO_USER_CODE_REGION_END
<[EndUserCodeRegion]>

But this isn't recognized by the generator, as it's translated by:

UserCodeRegionStringValueEquals EntityFieldName "Custom($VALUE)FieldValidation"]>
' __LLBLGENRPO_USER_CODE_REGION_START CustomEntityValidationCode
' __LLBLGENPRO_USER_CODE_REGION_END

Where 'CustomEntityValidationCode' is the name of the previous UserCodeRegion.

What's wrong in the notation I used? As far as I can see, it's following the SDK documentation as in

<[UserCodeRegion StringValueEquals StringValueName Pattern]> comment <[EndUserCodeRegion]>


As UserCodeRegion "name" but now the name of the region is determined from the StringValueName. StringValueName can be one of the following: ... EntityFieldName ... "pattern" is the name pattern to use for the region. The string can be a solid name, or can be a string which can have a macro: ($VALUE). The macro ($VALUE) is replaced with the name value specified using the argument. When using this variant of UserCodeRegion, use UserCodeRegionName in the marker section for proper name emitting.

thank you, Bert

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 27-Aug-2005 18:01:48   

That's an error in the documentation. flushed you should do:


<[UserCodeRegion EntityFieldName "Custom($VALUE)FieldValidation"]>
' __LLBLGENRPO_USER_CODE_REGION_START <[UserCodeRegionName]>
' __LLBLGENPRO_USER_CODE_REGION_END
<[EndUserCodeRegion]>

Frans Bouma | Lead developer LLBLGen Pro
BertS
User
Posts: 89
Joined: 28-Jul-2005
# Posted on: 29-Aug-2005 08:57:06   

Ok, thank you.