Jump to content

error setting JSConfig('baseCls', [FClass]);


RobYost

Recommended Posts

At the beginning of the program, I set font color etc.

 

If I want to change the font color later in the program

I call the same function:

  FClass := '';
  if (ctos(FFont.Color) <> 'nil') then
    FClass := FClass + ' ' + ctos(FFont.Color);

  FClass := FClass + ' fontsize' + IntToStr(FFont.Size);

  if (fsBold in FFont.Style) then
    FClass := FClass + ' bold';
  if (fsItalic in FFont.Style) then
    FClass := FClass + ' italic';

  if (FBorderWidth > 0) then
    FClass := FClass + ' bordercolor' + IntToStr(FBorderWidth) + FBorderColor;

  FClass := FClass + ' ' + FFont.Name;

  FClass := TrimLeft(FClass);
  if (length(FClass) > 0) then
  begin
    JSConfig('baseCls', [FClass]);
    JSConfig('cls', ['_x-field']);
  end;

and I get:

---------------------------
Debugger Exception Notification
---------------------------
Project SimpleLandlord.exe raised exception class Exception with message
'Config Option: O16A->baseCls:"clRed fontsize8 Tahoma"<br/>is referring a previous request,<br/>
it's not allowed in AJAX request or JS handler.<br/>Use equivalent Public Property or Method instead.'.
---------------------------
Break   Continue   Help   
---------------------------
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...