Jump to content

Tim Koscielski

Members
  • Content Count

    28
  • Joined

  • Last visited

  • Days Won

    1

Tim Koscielski last won the day on February 5

Tim Koscielski had the most liked content!

About Tim Koscielski

  • Rank

Smart Mobile Studio

  • Edition
    Professional
  1. I use TW3StringGrid in a project and I just noticed that when the grid has more rows than space to display them, the scrollbar shows, but the grid won't show the scrolled data in Firefox. This works fine in Chrome and Edge. I tested this in the DEV channel and I am using version 3.1.0.91. I also tried the two sample apps, "StringGrid Demo" and "GridProject" and they both have the same issue only in Firefox. Any ideas on what I am missing? Firefox was version 70.0 64 bit. tim
  2. Tim Koscielski

    Firefox Form Transition Issues with 3.1.0.90 - MultipleForms Demo

    Jarto, Does this mean I can pull the dev update down for refresh with your changes? Thank you for the quick response. tim UPDATE1: I did see the new update out there. I have pulled it down and will test a little later. Thank you. UPDATE2: All worked as expected. Thanks.
  3. I have upgraded to the latest DEVELOPMENT channel version 3.1.0.90. After I upgraded SMS, the form transitions stopped working and I could not get the app to move smoothly to another form. For fun, I tested the MultipleForms demo and got almost the same results. When clicking Button2 to transition to a form created by the application, nothing happens. When you click on the second button that creates a form on the fly and then transitions to it does work, but then you can't transition back to the first form. In the demo app, this is the line of code that is not working for the auto created secondary form. Application.GotoForm('Form2', feFromRight); In the Firefox console, the following message is displayed for the MultipleForms demo. Will-change memory consumption is too high. Budget limit is the document surface area multiplied by 3 (535500 px). Occurrences of will-change over the budget will be ignored. Can anyone shed any light and what can be done to fix this? I have some changes I need to make to the project, but this is the only item that is holding that up. Are there any other options to transition to a different form that works in Firefox. Of course all of this works in Chrome and Explorer without any issues. Thanks for the help. tim
  4. Tim Koscielski

    Issue with DEVELOPMENT-branch (was BETA) building APP

    Ok, I think I need to go back on all of that above, it was NOT A PROBLEM with the Grid. I think it was a problem with object initialization. In this project, I was using FontAwesome and I had the following for a form in the InitializeObject procedure. I initialized the Grid and added the InnerHTML to a button. procedure TForm_ProjectMasterListN.InitializeObject; begin inherited; {$I 'Form_ProjectMasterListN:impl'} writeln('InitializeObject'); InitGrid; W3Button1.InnerHTML:=#'<i class="fa fa-refresh fa-2x"></i>'; end; As I worked through this I discovered the when I removed InitGrid and the InnerHTML items from InitializeObject, the error went away. I then added these to InitializeForm and it then worked correctly. I am assuming that with some of the new features in this BETA, this is something changed, but also I assume that I had been doing this the wrong way anyway. Now when I run my code in InitializeForm, it all works. If anyone has any additional insight, please let me know. Thank you for the help.
  5. Tim Koscielski

    Issue with DEVELOPMENT-branch (was BETA) building APP

    Thanks. I appreciate you trying it out. Still trying to track down exactly what is the issue with my project.
  6. Tim Koscielski

    Issue with DEVELOPMENT-branch (was BETA) building APP

    OK, now I have some more info. The issue I'm having is specifically with TW3Grid. My code was initially based on the demo provided and does approximately the exact same process. The demo grid project still works exactly as it is, but now I am comparing the two and at the moment everything seems to be reasonably the same In ObjectInitialize in my project, I am creating the columns in the grid with the following code. The very first TW3TextColumn.Create I call is generating the error. I am digging into this later today and I'll continue to update what I find. If anyone has any ideas, please let me know. procedure TForm.InitGrid; var Col_ProjectId: TW3TextColumn; begin Col_ProjectId := nil; Col_ProjectId := TW3TextColumn.Create(W3Grid1 as IW3ColumnsControl); Col_ProjectId.Header.Caption := '#'; Col_ProjectId.Header.Alignment := taCenter; Col_ProjectId.Alignment := taCenter; Col_ProjectId.Width := 100; W3Grid1.Columns.Add(Col_ProjectId); end;
  7. In the previous BETA channel, I had an app that was working just fine. Now in version 3.1.0.88, the app build creates an error when run. "TypeError, Cannot read property 'FHandle$4' of null" I know this is a BETA, but since it was working in the previous versions and then broke it this one, I'm wondering how I can go about figuring out what might have happened. Just looking for any suggestions to investigate further. Thanks.
  8. Tim Koscielski

    Development updates

    Jarto, I think in the Update list, the date for this update readme lists 2018 and not 2019. You just might want to check. tim
  9. Tim Koscielski

    TW3StringGrid is available

    I have just done a light review of this StringGrid demo and was wondering if TW3Button is an option. What the real question is how to get the unique ID of selected row and then take the user to either a new form or view based on the selected item. At this time, I have used the TW3Grid, but was interested in perhaps switching over to this one.
  10. Tim Koscielski

    Mixing Javascript and SMS

    Thank you for the quick overview. I had seen notes about the handle, but was hoping someone could summarize it here for me. This helps to clarify and gives me a start. I will always try to figure out how to keep things organized in SMS, but for the short term, ASM may be the crutch I need to get things going.
  11. Tim Koscielski

    Mixing Javascript and SMS

    I have been using ASM blocks in my project and find that I want to mix javascript and SMS. Below are two use cases. In an ASM block I would like to set a SMS attribute on a SMS object like a button doing something like TW3Button.Visible := True In an ASM blick I would like to call a SMS procedure or function to complete some common actions Below is my psuedo code which I am hoping someone can correct and give some guidance on. I'm just looking for enough to be dangerous..... EXAMPLE 1: Set attribute on button. asm // Unsure how to do this here to call back to a button in SMS @W3Button1.Visible = True end; Example 2: Call SMS function from a javascript block procedure TForm.DoSomething; begin ShowMessage('Doing something'); end; procedure TForm.OnButtonClick(Sender: TObject); begin asm @DoSomething; end; end; For me this is the simplest I can make it which will help better understand the javascript-SMS links. I am hopeful that you understand, for these examples, it is not exactly how I'm using them, but for understanding I thouhgt this was the easiest examples I could do. Thanks. tim
  12. Tim Koscielski

    Uploading a file that has been selected using INPUT box type=itFile

    Ok, this first follow up is what I did to get it working based on some of the links for handling forms in javascript. Fortunately because I could mix and match SMS Pascal and Javascript, I get the best of both worlds. On my Smart Form, I have a TW3Button and a TW3EditBox with a type of ltFile. Then with the following javascript, I can get the form posted correctly to a backend which is able to capture the file and other variables of the form. Note that the other elements are created dynamically based on an example I was using. The ShowMessage and Alert items were just feedback mechanisms for me to see this part working. Both my DMVC server and a PHP script were able to process this. I am sure that there is a more friendly SMS way of writing this, but for now it got my form working and I was able to continue to plow forward with this upload piece being reasonably well contained. My key take way was getting the file upload field and the code below did the trick. This may not be the best way, but at least it was a starting point. myFile = document.getElementById('id', 'fupload1'); The InitializeObject was important to label the TW3EditBox element correctly. Below that is the code that I stuck in the OnClick event for the button. I saw many other ways to deal with this, but I just wanted to keep it straight forward for the UI. procedure TForm_ImportFile.InitializeObject; begin inherited; {$I 'Form_ImportFile:impl'} W3ButtonBack.InnerHTML := '<i class="fa fa-arrow-left fa-2x"></i>'; // this is a good place to initialize components W3EditBox1.handle.setAttribute('name','fupload'); W3EditBox1.handle.setAttribute('id', 'fupload1'); // Initialize EditBox id to find it with getElementById below W3EditBox1.InputType := itFile; end; // BUTTON CLICK EVENT CODE ShowMessage('Starting'); asm var formData = new FormData(); alert('Trying to get file box'); myFile = document.getElementById("fupload1").files[0]; alert('Got file: ' + myFile.name); formData.append("username", "Groucho"); formData.append("accountnum", 123456); // number 123456 is immediately converted to a string "123456" // HTML file input, chosen by user //formData.append("fupload", fileInputElement.files[0]); //var myFile = new Blob([content], {type: "text/plain"}); formData.append("userfile", myFile, myFile.name); // JavaScript file-like object var content = '<a id="a"><b id="b">hey!</b></a>'; // the body of the new file... var blob = new Blob([content], { type: "text/xml"}); formData.append("webmasterfile", blob); var request = new XMLHttpRequest(); request.open("POST", "http://127.0.0.1:2001/file"); request.send(formData); end; ShowMessage('Done');
  13. Tim Koscielski

    Uploading a file that has been selected using INPUT box type=itFile

    Thank you for the help. It has gotten me closer, but the SMS approach does not seem to be capturing the data. Also, remember, I am using DMVC to receive the POST, but for the SMS side, I could just as easily be using a server running PHP, NODE.JS or some other mechanism to receive and process the file. My question is more general about how SMS can emulate a form POST to upload the file. Now to the example. I can see the SMS example posting to the correct page, but not the actual data of the file upload component. Using the inspector in Chrome or FireFox and watching the Network activity, for the SMS example in the data section I only see the following which seems to just the the object name and not the data. [object FormData] Now when I compare and use a standard HTML5 form almost exactly like the sample you posted above, the network watcher in the Inspector of the browser shows the following in the Params section for the post which is a sample text file I am posting. It is the same file used via the SMS form and the HTML form. -----------------------------244962545219104 Content-Disposition: form-data; name="fupload"; filename="Hello.txt" Content-Type: text/plain I am a plain text document. -----------------------------244962545219104-- Any thoughts on what might be happening here. I will dig a little deeper into the Javascript processing of FormData, but I'm hoping this feed back can help. I find SMS to be a great tool, but I feel like a beginner still learning this tool. Thanks. Tim
  14. Tim Koscielski

    My forum password...Issues logging in...

    That was it.... Thank you... I am not less confused... <grin>
×