FoxInCloud
Error while compiling with FIC 2.20
Gravatar is a globally recognized avatar based on your email address. Error while compiling with FIC 2.20
  Michele
  thn@foxincloud.com
  Aug 26, 2015 @ 11:15pm
I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc

Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  FoxInCloud Support - Thierry N.
  Michele
  Aug 27, 2015 @ 06:16am
Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc



-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  Michele
  Thierry Nivelet (FoxInCloud)
  Aug 31, 2015 @ 03:02am
Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc



Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  FoxInCloud Support - Thierry N.
  Michele
  Aug 31, 2015 @ 04:02am
The mismatch occurs in a JS comment and, surprisingly, this string is not declared as JS.

Could you provide the full call stack?

Thanks,


Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc





-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  Michele
  Thierry Nivelet (FoxInCloud)
  Aug 31, 2015 @ 04:35am


The mismatch occurs in a JS comment and, surprisingly, this string is not declared as JS.

Could you provide the full call stack?

Thanks,


Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc





Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  FoxInCloud Support - Thierry N.
  Michele
  Sep 2, 2015 @ 11:41pm
Ciao Michele,

Looks like this JS handler is build in some .wcHTMLgen() method

Before we can fix this for good, it should work if you just remove the in-line comments (/* ... */) from the generated JavaScript

Thanks



The mismatch occurs in a JS comment and, surprisingly, this string is not declared as JS.

Could you provide the full call stack?

Thanks,


Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc







-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  Michele
  Thierry Nivelet (FoxInCloud)
  Sep 3, 2015 @ 02:22am
Where can i find the generated javascript ?


Ciao Michele,

Looks like this JS handler is build in some .wcHTMLgen() method

Before we can fix this for good, it should work if you just remove the in-line comments (/* ... */) from the generated JavaScript

Thanks



The mismatch occurs in a JS comment and, surprisingly, this string is not declared as JS.

Could you provide the full call stack?

Thanks,


Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc







Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  FoxInCloud Support - Thierry N.
  Michele
  Sep 3, 2015 @ 03:11am
you probably can find it by searching 'event or event source object' in your whole project, or any other string you can find in 'm.origin' below


Where can i find the generated javascript ?


Ciao Michele,

Looks like this JS handler is build in some .wcHTMLgen() method

Before we can fix this for good, it should work if you just remove the in-line comments (/* ... */) from the generated JavaScript

Thanks



The mismatch occurs in a JS comment and, surprisingly, this string is not declared as JS.

Could you provide the full call stack?

Thanks,


Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc








Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  Michele
  Thierry Nivelet (FoxInCloud)
  Sep 3, 2015 @ 06:03am
I found this code into click event of a button in the form i had the error. It was for using the calendar widget

IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)

LOCAL lcID, lcScript

lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')
lcScript = Textmerge(''+;
[ new CalendarDateSelect(]+;
[ $('<<m.lcID>>')]+;
[ , { /* here start the calendar options */]+;
[ hidden:true]+;
[ , popup_by: this]+;
[ , year_range: 10]+;
[ , onchange: function(){FoxInCloud.MethExec(]+;
[ $('<<this.wcID>>') /* {en} event or event source object {fr} événement ou son objet source */]+;
[ , '<<this.wcID>>' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */]+;
[ , 'wFormCallBack' /* {en} method {fr} méthode */]+;
[ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */]+;
[ , false /* {en} Synchronous true or false according to your needs */]+;
[ )]+;
[ }]+;
[ }]+;
[ );];
)
RETURN m.lcScript

ELSE

* You LAN mode code

EndIf


you probably can find it by searching 'event or event source object' in your whole project, or any other string you can find in 'm.origin' below


Where can i find the generated javascript ?


Ciao Michele,

Looks like this JS handler is build in some .wcHTMLgen() method

Before we can fix this for good, it should work if you just remove the in-line comments (/* ... */) from the generated JavaScript

Thanks



The mismatch occurs in a JS comment and, surprisingly, this string is not declared as JS.

Could you provide the full call stack?

Thanks,


Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc









Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  FoxInCloud Support - Thierry N.
  Michele
  Sep 3, 2015 @ 06:13am
OK so you can simply remove the JS comments or turn them into VFP comments like below:

IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)

LOCAL lcID, lcScript

lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')
lcScript = Textmerge(''+;
[ new CalendarDateSelect(]+;
[ $('')]+;
[ , { /* here start the calendar options */]+;
[ hidden:true]+;
[ , popup_by: this]+;
[ , year_range: 10]+;
[ , onchange: function(){FoxInCloud.MethExec(]+;
[ $('')]+; && /* {en} event or event source object {fr} événement ou son objet source */
[ , '']+; && /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */
[ , 'wFormCallBack']+; && /* {en} method {fr} méthode */
[ , this.calendar_date_select.selected_date ]+; &&/* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */
[ , false]+; && /* {en} Synchronous true or false according to your needs */
[ )]+;
[ }]+;
[ }]+;
[ );];
)
RETURN m.lcScript

EndIf


* You LAN/desktop mode code


I found this code into click event of a button in the form i had the error. It was for using the calendar widget

IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)

LOCAL lcID, lcScript

lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')
lcScript = Textmerge(''+;
[ new CalendarDateSelect(]+;
[ $('')]+;
[ , { /* here start the calendar options */]+;
[ hidden:true]+;
[ , popup_by: this]+;
[ , year_range: 10]+;
[ , onchange: function(){FoxInCloud.MethExec(]+;
[ $('') /* {en} event or event source object {fr} événement ou son objet source */]+;
[ , '' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */]+;
[ , 'wFormCallBack' /* {en} method {fr} méthode */]+;
[ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */]+;
[ , false /* {en} Synchronous true or false according to your needs */]+;
[ )]+;
[ }]+;
[ }]+;
[ );];
)
RETURN m.lcScript

ELSE

* You LAN mode code

EndIf


you probably can find it by searching 'event or event source object' in your whole project, or any other string you can find in 'm.origin' below


Where can i find the generated javascript ?


Ciao Michele,

Looks like this JS handler is build in some .wcHTMLgen() method

Before we can fix this for good, it should work if you just remove the in-line comments (/* ... */) from the generated JavaScript

Thanks



The mismatch occurs in a JS comment and, surprisingly, this string is not declared as JS.

Could you provide the full call stack?

Thanks,


Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc










Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  Michele
  Thierry Nivelet (FoxInCloud)
  Sep 3, 2015 @ 09:09pm
Ok. It seems SOLVED ! Thanks


Can we look at the other problem ? The most urgent and that stops my work..because i have to work with an older version of foxincloud...


OK so you can simply remove the JS comments or turn them into VFP comments like below:

IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)

LOCAL lcID, lcScript

lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')
lcScript = Textmerge(''+;
[ new CalendarDateSelect(]+;
[ $('')]+;
[ , { /* here start the calendar options */]+;
[ hidden:true]+;
[ , popup_by: this]+;
[ , year_range: 10]+;
[ , onchange: function(){FoxInCloud.MethExec(]+;
[ $('')]+; && /* {en} event or event source object {fr} événement ou son objet source */
[ , '']+; && /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */
[ , 'wFormCallBack']+; && /* {en} method {fr} méthode */
[ , this.calendar_date_select.selected_date ]+; &&/* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */
[ , false]+; && /* {en} Synchronous true or false according to your needs */
[ )]+;
[ }]+;
[ }]+;
[ );];
)
RETURN m.lcScript

EndIf


* You LAN/desktop mode code


I found this code into click event of a button in the form i had the error. It was for using the calendar widget

IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)

LOCAL lcID, lcScript

lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')
lcScript = Textmerge(''+;
[ new CalendarDateSelect(]+;
[ $('')]+;
[ , { /* here start the calendar options */]+;
[ hidden:true]+;
[ , popup_by: this]+;
[ , year_range: 10]+;
[ , onchange: function(){FoxInCloud.MethExec(]+;
[ $('') /* {en} event or event source object {fr} événement ou son objet source */]+;
[ , '' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */]+;
[ , 'wFormCallBack' /* {en} method {fr} méthode */]+;
[ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */]+;
[ , false /* {en} Synchronous true or false according to your needs */]+;
[ )]+;
[ }]+;
[ }]+;
[ );];
)
RETURN m.lcScript

ELSE

* You LAN mode code

EndIf


you probably can find it by searching 'event or event source object' in your whole project, or any other string you can find in 'm.origin' below


Where can i find the generated javascript ?


Ciao Michele,

Looks like this JS handler is build in some .wcHTMLgen() method

Before we can fix this for good, it should work if you just remove the in-line comments (/* ... */) from the generated JavaScript

Thanks



The mismatch occurs in a JS comment and, surprisingly, this string is not declared as JS.

Could you provide the full call stack?

Thanks,


Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc











Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  FoxInCloud Support - Thierry N.
  Michele
  Sep 3, 2015 @ 11:28pm
OK thanks for the feedback

Could you provide a test URL by PM so that we can see the XML response causing the menu to get disabled?
We can look at that next week
Thanks


Ok. It seems SOLVED ! Thanks

Can we look at the other problem ? The most urgent and that stops my work..because i have to work with an older version of foxincloud...


OK so you can simply remove the JS comments or turn them into VFP comments like below:

IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)

LOCAL lcID, lcScript

lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')
lcScript = Textmerge(''+;
[ new CalendarDateSelect(]+;
[ $('')]+;
[ , { /* here start the calendar options */]+;
[ hidden:true]+;
[ , popup_by: this]+;
[ , year_range: 10]+;
[ , onchange: function(){FoxInCloud.MethExec(]+;
[ $('')]+; && /* {en} event or event source object {fr} événement ou son objet source */
[ , '']+; && /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */
[ , 'wFormCallBack']+; && /* {en} method {fr} méthode */
[ , this.calendar_date_select.selected_date ]+; &&/* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */
[ , false]+; && /* {en} Synchronous true or false according to your needs */
[ )]+;
[ }]+;
[ }]+;
[ );];
)
RETURN m.lcScript

EndIf


* You LAN/desktop mode code


I found this code into click event of a button in the form i had the error. It was for using the calendar widget

IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)

LOCAL lcID, lcScript

lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')
lcScript = Textmerge(''+;
[ new CalendarDateSelect(]+;
[ $('')]+;
[ , { /* here start the calendar options */]+;
[ hidden:true]+;
[ , popup_by: this]+;
[ , year_range: 10]+;
[ , onchange: function(){FoxInCloud.MethExec(]+;
[ $('') /* {en} event or event source object {fr} événement ou son objet source */]+;
[ , '' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */]+;
[ , 'wFormCallBack' /* {en} method {fr} méthode */]+;
[ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */]+;
[ , false /* {en} Synchronous true or false according to your needs */]+;
[ )]+;
[ }]+;
[ }]+;
[ );];
)
RETURN m.lcScript

ELSE

* You LAN mode code

EndIf


you probably can find it by searching 'event or event source object' in your whole project, or any other string you can find in 'm.origin' below


Where can i find the generated javascript ?


Ciao Michele,

Looks like this JS handler is build in some .wcHTMLgen() method

Before we can fix this for good, it should work if you just remove the in-line comments (/* ... */) from the generated JavaScript

Thanks



The mismatch occurs in a JS comment and, surprisingly, this string is not declared as JS.

Could you provide the full call stack?

Thanks,


Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc













-- thn (FoxInCloud)

Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  Michele
  Thierry Nivelet (FoxInCloud)
  Sep 8, 2015 @ 11:18pm
Tomorrow i'll send you the address to access the app.....so you can check the problem....


OK thanks for the feedback

Could you provide a test URL by PM so that we can see the XML response causing the menu to get disabled?
We can look at that next week
Thanks


Ok. It seems SOLVED ! Thanks

Can we look at the other problem ? The most urgent and that stops my work..because i have to work with an older version of foxincloud...


OK so you can simply remove the JS comments or turn them into VFP comments like below:

IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)

LOCAL lcID, lcScript

lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')
lcScript = Textmerge(''+;
[ new CalendarDateSelect(]+;
[ $('')]+;
[ , { /* here start the calendar options */]+;
[ hidden:true]+;
[ , popup_by: this]+;
[ , year_range: 10]+;
[ , onchange: function(){FoxInCloud.MethExec(]+;
[ $('')]+; && /* {en} event or event source object {fr} événement ou son objet source */
[ , '']+; && /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */
[ , 'wFormCallBack']+; && /* {en} method {fr} méthode */
[ , this.calendar_date_select.selected_date ]+; &&/* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */
[ , false]+; && /* {en} Synchronous true or false according to your needs */
[ )]+;
[ }]+;
[ }]+;
[ );];
)
RETURN m.lcScript

EndIf


* You LAN/desktop mode code


I found this code into click event of a button in the form i had the error. It was for using the calendar widget

IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)

LOCAL lcID, lcScript

lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')
lcScript = Textmerge(''+;
[ new CalendarDateSelect(]+;
[ $('')]+;
[ , { /* here start the calendar options */]+;
[ hidden:true]+;
[ , popup_by: this]+;
[ , year_range: 10]+;
[ , onchange: function(){FoxInCloud.MethExec(]+;
[ $('') /* {en} event or event source object {fr} événement ou son objet source */]+;
[ , '' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */]+;
[ , 'wFormCallBack' /* {en} method {fr} méthode */]+;
[ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */]+;
[ , false /* {en} Synchronous true or false according to your needs */]+;
[ )]+;
[ }]+;
[ }]+;
[ );];
)
RETURN m.lcScript

ELSE

* You LAN mode code

EndIf


you probably can find it by searching 'event or event source object' in your whole project, or any other string you can find in 'm.origin' below


Where can i find the generated javascript ?


Ciao Michele,

Looks like this JS handler is build in some .wcHTMLgen() method

Before we can fix this for good, it should work if you just remove the in-line comments (/* ... */) from the generated JavaScript

Thanks



The mismatch occurs in a JS comment and, surprisingly, this string is not declared as JS.

Could you provide the full call stack?

Thanks,


Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc













Gravatar is a globally recognized avatar based on your email address. Re: Error while compiling with FIC 2.20
  FoxInCloud Support - Thierry N.
  Michele
  Sep 10, 2015 @ 11:59pm
Ciao Michele,

Did not receive the URL yet ...


Tomorrow i'll send you the address to access the app.....so you can check the problem....


OK thanks for the feedback

Could you provide a test URL by PM so that we can see the XML response causing the menu to get disabled?
We can look at that next week
Thanks


Ok. It seems SOLVED ! Thanks

Can we look at the other problem ? The most urgent and that stops my work..because i have to work with an older version of foxincloud...


OK so you can simply remove the JS comments or turn them into VFP comments like below:

IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)

LOCAL lcID, lcScript

lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')
lcScript = Textmerge(''+;
[ new CalendarDateSelect(]+;
[ $('')]+;
[ , { /* here start the calendar options */]+;
[ hidden:true]+;
[ , popup_by: this]+;
[ , year_range: 10]+;
[ , onchange: function(){FoxInCloud.MethExec(]+;
[ $('')]+; && /* {en} event or event source object {fr} événement ou son objet source */
[ , '']+; && /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */
[ , 'wFormCallBack']+; && /* {en} method {fr} méthode */
[ , this.calendar_date_select.selected_date ]+; &&/* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */
[ , false]+; && /* {en} Synchronous true or false according to your needs */
[ )]+;
[ }]+;
[ }]+;
[ );];
)
RETURN m.lcScript

EndIf


* You LAN/desktop mode code


I found this code into click event of a button in the form i had the error. It was for using the calendar widget

IF (Type('m.thisForm.wlHTMLgen') == 'L' AND m.thisForm.wlHTMLgen)

LOCAL lcID, lcScript

lcID = m.this.woHTMLgen.cObjAddrGet(m.this, 'hidden')
lcScript = Textmerge(''+;
[ new CalendarDateSelect(]+;
[ $('')]+;
[ , { /* here start the calendar options */]+;
[ hidden:true]+;
[ , popup_by: this]+;
[ , year_range: 10]+;
[ , onchange: function(){FoxInCloud.MethExec(]+;
[ $('') /* {en} event or event source object {fr} événement ou son objet source */]+;
[ , '' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */]+;
[ , 'wFormCallBack' /* {en} method {fr} méthode */]+;
[ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */]+;
[ , false /* {en} Synchronous true or false according to your needs */]+;
[ )]+;
[ }]+;
[ }]+;
[ );];
)
RETURN m.lcScript

ELSE

* You LAN mode code

EndIf


you probably can find it by searching 'event or event source object' in your whole project, or any other string you can find in 'm.origin' below


Where can i find the generated javascript ?


Ciao Michele,

Looks like this JS handler is build in some .wcHTMLgen() method

Before we can fix this for good, it should work if you just remove the in-line comments (/* ... */) from the generated JavaScript

Thanks



The mismatch occurs in a JS comment and, surprisingly, this string is not declared as JS.

Could you provide the full call stack?

Thanks,


Excuse me. The error is not while compiling. I have it when running xxx.css.........

masked = "new CalendarDateSelect( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $(~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~) /* {en} event or event source object {fr} événement ou son objet source */ , ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /* {en} id of HTML object {fr} id HTML de l~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

origin = " new CalendarDateSelect( $('_form_agenda-_commandbutton4_hidden') , { /* here start the calendar options */ hidden:true , popup_by: this , year_range: 10 , onchange: function(){FoxInCloud.MethExec( $('_form_agenda-_commandbutton4') /* {en} event or event source object {fr} événement ou son objet source */ , '_form_agenda-_commandbutton4' /* {en} id of HTML object {fr} id HTML de l'objet détenant la méthode */ , 'wFormCallBack' /* {en} method {fr} méthode */ , this.calendar_date_select.selected_date /* {en} Value to be passed as method parameter {fr} Valeur à passer en paramètre à la méthode */ , false /* {en} Synchronous true or false according to your needs */ ) } } );"

JSstring = .F.

The function that calls maskstrings() is this:

function cStringsMasked && {} Chaîne où les litteraux caractères sont masqués par _ga_StringParseBits_Class_.maskStrings()
lparameters tcChain, result && in: .T. for JavaScript string, @out: .T. if success, else ga_StringParse_Object() instantiation result

local loParser, cResult

return Iif(.T.;
and ga_Type_IsChar(m.tcChain, .T.);
and (.F.;
or ga_StringParse_Object(@m.loParser); && modify command abGA
or cResultAdd(@m.result, GA_STRINGPARSE_CLASS + [ class instantiation failed!]);
);
and (!lTrue(m.result) or varSet(@m.tcChain, Strtran(Strtran(m.tcChain, '\"'), "\'")));
and varSet(@m.result, m.loParser.maskStrings(@m.cResult, m.tcChain)); && modify command abGA
and m.result;
, m.cResult;
, m.tcChain;
)
endfunc


Ciao Michele,

1/ this is a simple Assert; not exactly an error, probably an incorrect parameter

2/ When the error occurs, what do you have in each of the 3 parameters?

Thanks,


I have an error while compiling my app with 2.20
Before i never saw this error.

The error message is: "String delimiter mismatch"

And the code where i have the error is:


function MaskStrings(masked, origin, JSstring)

local success;
, RegexStringStart;
, matchesObj, matchObj, v, c, s, o, n

success = true
RegexStringStart = m.this.RegexStringStart

do case

case !ga_Type_IsChar(@m.origin)
assert false
success = false
GA_ERROR_FUNCTION_ARGUMENT_INCORRECT

otherwise

JSstring = ga_Type_IsLogical(m.JSstring) and m.JSstring
masked = m.origin

do while m.success ;
and m.RegexStringStart.GetMatches(@m.matchesObj, m.masked) ;
and m.matchesObj.Count > 0 && 0 ou 1 car le pattern est !global

*!* if m.matchesObj.Count <> 1 && thn 2014-09-02 - cas impossible
*!* assert false
*!* success = false
*!* exit
*!* endif


matchObj = m.matchesObj.Item(0)
v = m.matchObj.Value
c = iif(m.v == '[', ']', m.v)
s = substrc(m.masked, m.matchObj.FirstIndex+2) && FirstIndex is 0-based
o = 1
do while .T.
n = at_c(m.c, m.s, m.o)
if .F.;
or m.n <= 1;
or !(m.JSstring and Substrc(m.s, m.n-1, 1) == '\') && Substrc('toto', 0, 1) fonctionne
exit
else
o = m.o + 1
endif
enddo

if Empty(m.n)
assert false message [String delimiter mismatch]
->->-> success = false && THIS IS THE LINE WHERE DEBUG IS POSITIONED
exit

else
n = 1 + m.n && include start delimiter
masked = stuffc( ;
m.masked, ;
m.matchObj.FirstIndex+1, ; && FirstIndex is 0-based
m.n, ;
replicate('~', m.n) ;
)

endif
enddo
endcase

return m.success
endfunc















-- thn (FoxInCloud)

© 1996-2024