NetTalk Central

Author Topic: Expression cannot be Picture error message  (Read 2741 times)

Alan Cochran

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Expression cannot be Picture error message
« 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

Alan Cochran

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: Expression cannot be Picture error message
« Reply #1 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: Expression cannot be Picture error message
« Reply #2 on: May 23, 2014, 07:47:13 AM »
I'm looking into it Alan.

ralonso2001

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
    • Qúbigo ERP
    • Email
Re: Expression cannot be Picture error message
« Reply #3 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...
Regards,
Rodrigo Alonso
Mendoza - Argentina

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11186
    • View Profile
Re: Expression cannot be Picture error message
« Reply #4 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 & '''','')

Alan Cochran

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: Expression cannot be Picture error message
« Reply #5 on: May 27, 2014, 09:54:51 AM »
Thanks Bruce...