Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by Czar

  1. I am trying to figure out how to screen a user's typed responses and ignore characters that I don't want them to input. For example in Delphi I might do something like... Procedure TNWEditPowerField.KeyPress(key : Char); const Numeric = ['1','2','3','4','5','6','7','8','9','0']; begin if (ord(key) < 32) or (ord(key) > 127) then exit; if not (key in Numeric) and (key <> '-') and (key <> '.') then exit; ... But I cannot see how I would do something similar in SMS - the key strokes are all constants - any suggestions?
  2. I want an editbox that only allows entering of numbers. To do this I set inputtype to itNumber. This works but I get annoying spinners added to teh editbox so I put the following into the CSS input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; } All good so far expect that MaxLength is now completely ignored. No matter I thought I would set MaxValue instead. e.g., set it 9999 However, both MaxLength and MaxValue are ignored and the user can type in whatever ever number with as
  3. I have just run it using the latest version without any issues.
  4. Cheers, I have updated successfully and confirmed the issue is fixed
  5. Czar

    Grid - spreadsheet

    That sounds very promising
  6. There is only a single demo using SmartCL.Grid The demo is rather nice looking but it seems you cannot edit the cells. Are there any plans for making a grid or a demo that behaves more like excel? i.e, you can select rows, cells, edit the contents etc I know that grid components are a massive undertaking but they are quite essential to many business applications.
  7. @jarto The new smartcl.effects files cause the IDE to crash on startup. I restored off the MASTER channel now on IDE startup I get this If I replace SmartCL.Effects.pas with a previous versious version the problem goes away.
  8. I can only access beta channel edit: Changed settings.ini [Settings] Channel=MASTER RelativePaths=1
  9. Czar

    Freeing objects?

    Obviously in Delphi when you create objects you need to free them. e.g., var ButtonInstance := tNWButton.create(50, 50, 'test'); FButtons.add(ButtonInstance); In Delphi I would free the objects in the form.onclose; while FButtons.Count>0 do begin FButtons[0].free; FButtons.Delete(0); end; My question, is that a requirement in SMS? What are the consequences of not freeing objects in the case of a webpage?
  10. Cheers. I can wait for a for a solid fix. I agree it does seem like a padding issue. @jarto any ideas?
  11. This bug is still present and a bit irritating. Here is the code var FeedbackInst:= tw3image.create(self); FeedbackInst.loadfromurl('res/ballGreen.png'); FeedbackInst.setbounds(10,15,30,30); FeedbackInst.fxMoveBy(30,0, 0.5); I have tried it with PNGs and JPGs. Also if you leave out SetBound it will continue to do it. Much older version of SMS did not have this bug but I first noticed in I am hoping the devs can take a look. BallsMovement.rar
  12. Thanks @lynkfs, I have it working - this is the current code that I am using and it works. There might be some redundant code in there. In Main Form Main Form procedure TForm1.InitializeForm; begin inherited; // Set teh iframe to the html page you want to communicate with w3IframeInfoBar.src := ''; end; Send a message procedure TForm1.SendWelldone; begin if assigned(w3IframeInfoBar.MessagePort) then begin writeln('Sent welldone to infobar'); w3IframeInfoBar.handle.contentWindow.postMessage('welldone','*'); end
  13. ok, I am feeling a bit dumb. But the sender program has the iframe and it loads the infobar html page into it. The actual infobar code doesn't know it is in an iframe. So I am confused because it feels like the event listener is not inside the actual infobar code. Sorry if I come across a bit slow
  14. I am trying to understand how this works. Is this code only placed in the mainform? How does the form in the iframe listen? In the mainform I do the following w3IframeInfoBar.src := 'http://numberworks.com/cloud/infobarnew/index.html'; and when I send a message I assume it is w3IframeInfoBar.handle.contentWindow.postMessage('welldone','*'); But I am confused what how I set up a listener in the other html file (the one in the iframe)
  15. In our maths tuition software we have a mainform that includes an iframe. The maths main form exercise that messages the infobar about the students actions. The infobar along the bottom is in an iframe that is separate from the exercise. The huge benefit is that we can have hundreds of exercises and only one infobar to change. The two parts talk using messaging. Get an answer right mainform sends the infobar a "welldone" message and a green ball appears. The latest update has changed the message system and while the code compiles it no longer works. I have tried to get a
  16. Czar

    loading images

    You sir are a life saver. I have tested my initial projects and they now work again as expected. Can I assume that "SetCrossOrigin('Anonymous');" won't make a return in later versions TestImage.rar
  17. Czar

    loading images

    www.numberworks.com/downloads/ImageProblem.rar Open SimpleBrowser.exe and insert these into address (change to suit location ) c:\ImageProblem\wwwCURRENT\index.html c:\ImageProblem\wwwWORKS\index.html If you go to wwwCurrent you will see image location - but no image. If you try wwwWORKS then you will see a green screen. Only difference between these two is which version of SMS was used.
  18. Czar

    loading images

    Would it help if I sent you simplebrowser app and two versions of the HTML file - one old one new? Easy to demonstrate
  19. Czar

    loading images

    1. deleting manifest has no effect. 2. Putting in cross origin no effect. If I compile again with older SMS then it works correctly. Compile with current and it doesn't.
  20. Czar

    loading images

    Can you think of a reason why it only came into effect with the latest update? I would love to roll back to previous behaviour
  21. Czar

    loading images

    I have since updated my CEF4 code with the latest version. No change. I have made a very simply VCL sms program with an image loading a png. And it fails when opening via CEF4 browser. If I copy the index.html into a webserver then the browser will show images but not when it is a local file. I have been using this browser for a number of years to display SMS index.html files so I would keen to have it resolved the change is the new SMS version.
  22. Czar

    loading images

    The behaviour for this BackImg.LoadFromURL('res/back1366.png'); has changed since the last update. It works fine in browsers (internal and external) but it no longer works in my app that uses chromium (CEF4). At the moment if I compile in older version - all good - recompile in newer version and the images don't load if I use my delphi based chromium browser. Any suggestions about where to start looking for a solution? I am using the browser app for all of my SMS based software so this represents a significant problem for me.
  23. Czar

    Scroll bar bug

    yup, confirmed - now to fix for version
  24. Czar

    Scroll bar bug

    I use win 10 at home and I can't reproduce - I will see about making a video with Paulo next week if it helps.
  25. Tried a different port? Never come across this issue sorry. Mine works whatever I try so I think something else is getting in the way. http://localhost:8090/index.html
  • Create New...