FoxInCloud
Error alis m.toForm is unknowed
Hi Thierry
When i used a spinner in a form and if the refresh_() enable / disable the spinner readonly propertie i have an error
here is the FIC code:
PROTECTED PROCEDURE PropChangedHTML_Enabled_ && {fr} .Enabled ou .ReadOnly a changé, ajouter les ordres complémentaires (propriétés liées)
LPARAMETERS ;
toControl AS awTxt OF aw.vcx;
, tlReadOnly as Boolean; && {en} .ReadOnly change
&& 2016-11-07 thn -- {FiC V 2.23.0-beta.2} {en} to be replaced by a class
LOCAL lReadOnly, llEnabled, lnEnabledColor
with m.toControl AS awCbo OF aw.vcx
lReadOnly = lProperty(m.toControl, 'ReadOnly') and .ReadOnly
llEnabled = .Enabled and !m.lReadOnly
#IFDEF PREVIOUS_FIC_VERSION
&& PICTURE
* {fr} Si le contrôle a un propriété 'DisabledPicture' non vide
IF !m.tlReadOnly;
and PemStatus(m.toControl, 'DisabledPicture', 5);
AND NOT m.BC == 'Image'; && {fr} les images gèrent DisabledPicture elles-mêmes
AND File(.DisabledPicture);
AND File(.Picture);
and !Lower(JustFname(.DisabledPicture)) == Lower(JustFname(.Picture))
* {fr} Ajouter un enregistrement pour l'image
this.PropChangedHTML_Add('style.backgroundImage', 'S', cEscaped_XML(Textmerge([url(<<cLitteralJS(m.this.cImageURL(Iif(m.llEnabled, .Picture, .DisabledPicture)))>>)]))) && 2015-08-13 thn - http://support.west-wind.com/Message4F51ASD0V.wwt
ENDIF
&& FORECOLOR
* {fr} Si le contrôle a un propriété 'DisabledForeColor'
IF PemStatus(m.toControl, 'DisabledForeColor', 5) && {fr} dans ce cas il a aussi .DisabledBackColor
lnEnabledColor = Iif(PemStatus(m.toControl, 'ForeColor', 5), .ForeColor, 0) && {fr} Noir
IF NOT .DisabledForeColor = m.lnEnabledColor
* {fr} Ajouter un ordre qui change la couleur d'avant plan
this.PropChangedHTML_Add('style.color', 'S', HTMLColor(Iif(m.llEnabled, m.lnEnabledColor, .DisabledForeColor)))
ENDIF
&& BACKCOLOR
* {fr} Si le contrôle est opaque
IF NOT m.this.lControlTransp && see this.PropChangedHTML_Std()
lnEnabledColor = Iif(PemStatus(m.toControl, 'BackColor', 5), .BackColor, Rgb(255,255,255)) && {fr} Blanc
IF NOT .DisabledBackColor = m.lnEnabledColor
* {fr} Ajouter un ordre qui change la couleur d'arrière plan
this.PropChangedHTML_Add('style.backgroundColor', 'S', HTMLColor(Iif(m.llEnabled, m.lnEnabledColor, .DisabledBackColor)))
ENDIF
ENDIF
ENDIF
#ELSE
if m.tlReadOnly
this.cScriptJSadd(Textmerge([jQuery('#<<.wcID>>').<<Iif(m.lReadOnly, 'attr', 'removeAttr')>>('readonly', '').<<Iif(m.lReadOnly, 'add', 'remove')>>Class('readonly');]))
endif
#ENDIF
&& 2016-11-22 thn -- {FiC V 2.23.0-beta.5}
&& {en} https://www.w3.org/TR/2012/WD-html5-20121025/common-input-element-attributes.html#attr-input-readonly
&& {en} The difference between disabled and readonly is that read-only controls are still focusable,
&& {en} so the user can still select the text and interact with it, whereas disabled controls are entirely non-interactive.
&& {en} For this reason, only text controls can be made read-only: it wouldn't make sense for checkboxes or buttons, for instances.
&& HTML: .Readonly applies To: EditBox | TextBox
&& VFP : .Readonly applies To: EditBox | TextBox | CheckBox | ComboBox | Spinner ... | Grid | Column | File Object | Cursor
do case
case !(m.tlReadOnly and .Enabled)
case m.BC = 'Checkbox' and .Style = 1
this.cScriptJSadd_([jQuery('#] + m.OA + [').checkboxradio('] + Iif(.ReadOnly, 'disable', 'enable') + [');])
case m.BC = 'Combobox' and .Style = 0 && see awProps.dbf
this.cScriptJSadd_(Textmerge([jQuery('#<<wcID(m.toControl, 'lst')>>').attr('disabled', <<cLitteralJS(.ReadOnly)>>);]))
case m.BC = 'Spinner' and !m.toForm.wBSlHTMLgen &&&ERROR toForm
this.cScriptJSadd(Textmerge([$('<<.wcID>>').readOnlySet(<<cLitteralJS(!.ReadOnly)>>);])) && modify file FoxInCloud.js > spnMake()
endcase
endwith
endproc
Amicalement Gilles
Hi Gilles,
2.24.0-beta.7?
yes,
in beta 6 also!