NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alan Cochran on May 23, 2014, 05:52:50 AM

Title: Expression cannot be Picture error message
Post by: Alan Cochran on May 23, 2014, 05:52:50 AM
After installing NT8.12, I am now getting "Expression cannot be Picture" error message when compiling.  The field that it is complaining on has a "Must be in Numeric Range" in the dictionary. This has a Data Type of "LONG", Screen Picture of "@n04", Initial Value of "RANDOM(1002,9997).

The generated code:

  ! Automatic Dictionary Validation
    If InRange(OWN:PINNumber,1002,9997) = false
      loc:Invalid = 'OWN:PINNumber'
      if not loc:alert then loc:Alert = p_web.translate('OWN:PINNumber') & ' ' & clip(p_web.site.MoreThanText) & ' ' & clip(p_web.mformat('1002',@S250)) & ', ' & clip(p_web.site.LessThanText) & ' ' & clip(p_web.mformat('9997',@S250)).
    End

It complains on clip(p_web.mformat('1002',@S250)) and clip(p_web.mformat('9997',@S250)).

This was working fine with version 8.11.

Alan
Title: Re: Expression cannot be Picture error message
Post by: Alan Cochran on May 23, 2014, 07:33:57 AM
Just an update:  In version 8.11, the generated code is

      if not loc:alert then loc:Alert = p_web.translate('OWN:PINNumber') & ' ' & clip(p_web.site.MoreThanText) & ' ' & clip(format('1002',@S250))  & ', ' & clip(p_web.site.LessThanText) & ' ' & clip(format('9997',@S250)) .

where in 8.12, it generates:

      if not loc:alert then loc:Alert = p_web.translate('OWN:PINNumber') & ' ' & clip(p_web.site.MoreThanText) & ' ' & clip(p_web.mformat('1002',@S250))  & ', ' & clip(p_web.site.LessThanText) & ' ' & clip(p_web.mformat('9997',@S250)) .

So it appears there is a bug in version 8.12
Title: Re: Expression cannot be Picture error message
Post by: Bruce on May 23, 2014, 07:47:13 AM
I'm looking into it Alan.
Title: Re: Expression cannot be Picture error message
Post by: ralonso2001 on May 24, 2014, 07:47:29 AM
I have the same problem with a field thats defined like "Must be in numeric range" in the DCT...
Title: Re: Expression cannot be Picture error message
Post by: Bruce on May 26, 2014, 01:01:29 AM
edit \clarion\accessory\template\netweb.tpw
line circa 7593
currently is
#Insert(%ValidateField,%Flist,'@S250','''' & %Field & '''','')
should be
#Insert(%ValidateField,%Flist,'''@S250''','''' & %Field & '''','')
Title: Re: Expression cannot be Picture error message
Post by: Alan Cochran on May 27, 2014, 09:54:51 AM
Thanks Bruce...