robinhodemorais Posted February 4, 2020 Share Posted February 4, 2020 I'm creating an image in progress and I would like to add a css that I created in it too, but there is an error when adding the css dsName: = UniServerModule.FilesFolderPath + '/ odontogram /' + txCamImagem.Text; dsNameComp: = StringReplace (StringReplace (txCamImagem.Text, '. png', '', [rfReplaceAll]), '_', '', [rfReplaceAll]); with TUniImage.Create (Self) as TUniImage start if txX.Text <> '' then Left: = StrToInt (txX.Text) left most: = 26; if txY.Text <> '' then Top: = StrToInt (txY.Text) else Top: = 60; Father: = pnOdontogram; Transparent: = true; Name: = dsNameComp; Draggable.Enabled: = True; Cursor: = crDrag; OnEndDrag: = AnyComponentsEndDrag; Picture.LoadFromFile (dsName); end; // the error occurs here UniSession.AddJS ('$ (' '#' + TUniImage (FindComponent ('dsNameComp')). JSId + '' '). AddClass (' 'notStarted' ')'); css .naoInitiado { filter: brightness (0.5) sepia (1) saturate (5) hue-rotate (160deg); } error First chance exception at $007AF8C0. Exception class $C0000005 with message 'access violation at 0x007af8c0: read of address 0x00000444'. Link to comment Share on other sites More sharing options...
Sherzod Posted February 4, 2020 Share Posted February 4, 2020 2 hours ago, robinhodemorais said: // the error occurs here UniSession.AddJS ('$ (' '#' + TUniImage (FindComponent ('dsNameComp')). JSId + '' '). AddClass (' 'notStarted' ')'); 1. FindComponent ('dsNameComp') - you use a string instead of a variable. Correct: FindComponent (dsNameComp) 2. AddClass - JS case sensitive. Correct: addClass 1 Link to comment Share on other sites More sharing options...
robinhodemorais Posted February 4, 2020 Author Share Posted February 4, 2020 I have an error here attached, a test demo uniguiImage.rar Link to comment Share on other sites More sharing options...
Sherzod Posted February 4, 2020 Share Posted February 4, 2020 37 minutes ago, robinhodemorais said: I have an error here 8 hours ago, Sherzod said: 2. AddClass - JS case sensitive. Correct: addClass 1 Link to comment Share on other sites More sharing options...
robinhodemorais Posted February 4, 2020 Author Share Posted February 4, 2020 ball show, it worked, thank you very much 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now