FoxInCloud
setting picture property at runtime
Gravatar is a globally recognized avatar based on your email address. setting picture property at runtime
  Bennet Eze
  All
  Mar 7, 2017 @ 11:50pm

Good day Thierry,

If I set the picture property of an image control at run time, It does not work in web mode. If I set it at design time, the picture shows on the browser. Do I need to set an additional property?

Thanks

Gravatar is a globally recognized avatar based on your email address. re: setting picture property at runtime
  FoxInCloud Support - Thierry N.
  Bennet Eze
  Mar 8, 2017 @ 12:59am

Hi Bennet,

You can either:

  • add 'picture' to .wcPropSave at design time
  • in .Init():
wcPropSaveEdit(this, 'Picture')
return dodefault()
Gravatar is a globally recognized avatar based on your email address. re: setting picture property at runtime
  Bennet Eze
  FoxInCloud Support - Thierry N.
  Mar 8, 2017 @ 04:45am

Thanks for your help. It still refused to work after applying your suggestion. On critical observation, I discovered that the path being returned by getfile() or wgetfile() is always transformed in web mode. Any \n in the path is replaced with CR + LF. For example 'c:\Test\users\BENNET\newhpfiles\triai2\images\second.png' was replaced with 'C:\Test\Users\BENNETewhpfiles\trial2\Images\second.png'. When I hard coded the path, It worked. How can I stop the transformation?

Thanks

Gravatar is a globally recognized avatar based on your email address. re: setting picture property at runtime
  FoxInCloud Support - Thierry N.
  Bennet Eze
  Mar 8, 2017 @ 05:38am

OK there's probably an issue here.

\n means 'new line' in JavaScript

please post all additional detail possible such as code where .picture is assigned and the values before and after.

© 1996-2024