FoxInCloud
Textbox Format Issue
Gravatar is a globally recognized avatar based on your email address. Textbox Format Issue
  n/a
  All
  May 26, 2015 @ 02:45am
I have been searching for a similar problem here and I found that Michele had the same issue but I did not find a resolution. World's simplest problem, I can't seem to get a textbox to respect the "!" format setting. Works in LAN, displays uppercase in WEB, but saves in lowercase unless caps or caps lock is used. Set a breakpoint and in debug confirmed a lowercase entry before any processing. I can code around this in the base class, but this is basic stuff so I am sure I am missing something obvious! Any ideas?

- James

Gravatar is a globally recognized avatar based on your email address. Re: Textbox Format Issue
  FoxInCloud Support - Thierry N.
  James Patterson
  May 26, 2015 @ 03:35am
Hi James,

So far, '!' $ this.format only makes .Value appear in upper case, but has no effect on saving the value.

I suggest you try this code:

modify class awtxt OF aw.vcx method wuValue

lparameters tuValue

* S'assurer que this.Value reflète bien this.ControlSource
local llPR as Boolean
llPR = m.thisForm.wlPropsRestore
thisForm.wlPropsRestore = .T.
this.Refresh
thisForm.wlPropsRestore = m.llPR

tuValue = this.wuValueField(Iif(Vartype(m.tuValue) == 'C';
, uValue(m.tuValue, Vartype(m.this.Value, .T.));
, m.tuValue);
)

tuValue = Iif(Vartype(m.tuValue) == 'C' and '!' $ this.Format;
, Upper(m.tuValue);
, m.tuValue;
)

return m.tuValue

Thanks!


I have been searching for a similar problem here and I found that Michele had the same issue but I did not find a resolution. World's simplest problem, I can't seem to get a textbox to respect the "!" format setting. Works in LAN, displays uppercase in WEB, but saves in lowercase unless caps or caps lock is used. Set a breakpoint and in debug confirmed a lowercase entry before any processing. I can code around this in the base class, but this is basic stuff so I am sure I am missing something obvious! Any ideas?

- James


-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Textbox Format Issue
  n/a
  Thierry Nivelet (FoxInCloud)
  May 26, 2015 @ 04:47am
OK, so is it safe to say this is the case for all Format statements?

If I change this is in awtxt, changes to aw.vcx in newer versions will overwrite these changes - correct? Shouldn't I make my changes is a subclass of aw.vcx like xxx.vcx? Just want to make sure I don't make a problem that is difficult to find after a version change.

- James


Hi James,

So far, '!' $ this.format only makes .Value appear in upper case, but has no effect on saving the value.

I suggest you try this code:

modify class awtxt OF aw.vcx method wuValue

lparameters tuValue

* S'assurer que this.Value reflète bien this.ControlSource
local llPR as Boolean
llPR = m.thisForm.wlPropsRestore
thisForm.wlPropsRestore = .T.
this.Refresh
thisForm.wlPropsRestore = m.llPR

tuValue = this.wuValueField(Iif(Vartype(m.tuValue) == 'C';
, uValue(m.tuValue, Vartype(m.this.Value, .T.));
, m.tuValue);
)

tuValue = Iif(Vartype(m.tuValue) == 'C' and '!' $ this.Format;
, Upper(m.tuValue);
, m.tuValue;
)

return m.tuValue

Thanks!


I have been searching for a similar problem here and I found that Michele had the same issue but I did not find a resolution. World's simplest problem, I can't seem to get a textbox to respect the "!" format setting. Works in LAN, displays uppercase in WEB, but saves in lowercase unless caps or caps lock is used. Set a breakpoint and in debug confirmed a lowercase entry before any processing. I can code around this in the base class, but this is basic stuff so I am sure I am missing something obvious! Any ideas?

- James



Gravatar is a globally recognized avatar based on your email address. Re: Textbox Format Issue
  FoxInCloud Support - Thierry N.
  James Patterson
  May 26, 2015 @ 04:50am
OK, so is it safe to say this is the case for all Format statements?

not sure what you mean ...
the code I proposed replaces Internet Value by Upper(Internet Value) only if '!'$.Format

If I change this is in awtxt, changes to aw.vcx in newer versions will overwrite these changes - correct? Shouldn't I make my changes is a subclass of aw.vcx like xxx.vcx? Just want to make sure I don't make a problem that is difficult to find after a version change.

This change being a fix, next versions of aw.vcx will have the same code

-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Textbox Format Issue
  n/a
  Thierry Nivelet (FoxInCloud)
  May 26, 2015 @ 05:15am
Sorry, a bit loose with my english... Being from the southern region of the US, most other regions of the US will insist that WE don't speak English! Ever try to explain "sava" or "what's up" with a literal translation? Let me reset...

There are several Format codes, such as ! $ A D and so on. Is it safe to say, or perhaps can we say as a rule, that all Format statements DISPLAY correctly in Web but do NOT affect the actual value?

Great, just didn't realize this was a fix. When you ask someone in the forum to replace code is it always a fix? I have overwritten my code in the past, so I am a bit paranoid.

Thanks - James


OK, so is it safe to say this is the case for all Format statements?

not sure what you mean ...
the code I proposed replaces Internet Value by Upper(Internet Value) only if '!'$.Format

If I change this is in awtxt, changes to aw.vcx in newer versions will overwrite these changes - correct? Shouldn't I make my changes is a subclass of aw.vcx like xxx.vcx? Just want to make sure I don't make a problem that is difficult to find after a version change.

This change being a fix, next versions of aw.vcx will have the same code


Gravatar is a globally recognized avatar based on your email address. Re: Textbox Format Issue
  FoxInCloud Support - Thierry N.
  James Patterson
  May 26, 2015 @ 05:28am
Sorry, a bit loose with my english... Being from the southern region of the US, most other regions of the US will insist that WE don't speak English! Ever try to explain "sava" or "what's up" with a literal translation? Let me reset...
There are several Format codes, such as ! $ A D and so on. Is it safe to say, or perhaps can we say as a rule, that all Format statements DISPLAY correctly in Web but do NOT affect the actual value?

With FoxInCloud, web and desktop applications should behave the same;
if in desktop mode '!' $ .Format not only changes the display but also the .Value to upper case (which we ignored in fact), then the behavior should be the same in web mode.

Great, just didn't realize this was a fix. When you ask someone in the forum to replace code is it always a fix? I have overwritten my code in the past, so I am a bit paranoid.

Yes, we find it easier to provide instant code fix that you can test and feedback rather than wait for the next release.
Of course we make sure that the fix has no side effect. In case we can suspect a potential side effect, we test the fix on our side first.

Ah, important, make sure to run FoxInCloud Web App Studio as an administrator before altering any FoxInCloud source code!


-- thn (FoxInCloud)

© 1996-2024