Jump to content

Czar

Members
  • Content Count

    446
  • Joined

  • Last visited

  • Days Won

    13

Posts posted by Czar

  1. There have been quite a few bug fixes over the last few weeks. Is there any chance of a incremental update of the alpha?

     

    I know you guys are working on some bigger issues but the current bugs in the alpha are seriously holding up our development. We cannot continue until they have been addressed so it would be awesome if we could receive the updated units while you work on new features. Then we can see if the issues have been resolved.

  2. something like this should be what you are looking for

    obviously code not adjusted for tw3image but you get the concept

     

      for Index := 0 to GetChildCount - 1 do
      begin
        Component := GetChildObject(Index);
        if (Component is TW3Button) then
          TW3Button(Component).OnClick := DoButtonClick;
      end;

     

  3. The failure appears to be with Gumroad. Here are the images of the process using a email address that already exists on gumroad.

     

    I ended up using a different email address and then it kind-of worked. Kind-of because I tried purchasing two pro licenses and it wouldn't allow me to purchase the second one - message was you have already tried to purchase that product. To be honest I believe you need a simpler cleaner solution. Gumroad is difficult to deal with as I found out when I queried a payment - took three weeks to resolve. And I don't like that the "subscription" renews without warning.

     

    purch1.jpg

    purch2.jpg

    purch3.jpg

  4. @Cipher/Jon I am glad I persisted :) We are putting a heap of hours into coding projects that we are using in real-world situations which is a great way to test the alpha so we (RecursiveElk and I )are really pleased to be able to provide feedback when we find weird and odd behaviour. We certainly don't expect a smooth ride at the moment.

  5. Why?

     

    Because TryStrToInt would be my go to method in Delphi

     

    Because I have never used StrToIntDef.

     

    I am sure it is not intended but your answer Jarto comes across as if it obvious that I should be using this StrToIntDef. I don't believe it addresses the issue that TryStrToInt is broken. If the familiar parts of SMS diverge from Delphi too much it makes it very frustrating.

  6. Thanks for the response, I think I follow it.

     

    However, it is still a significant bug. Any normal programmer used to Delphi would expect TryStrToInt to return a 0 if it failed.

     

    But in this case the weird effect s even worse because the TryStrToInt screws up the integer variable even if it is not executed!

     

    ----------

     

    For example I only want to run TryStrToInt if I have an incoming parameter

     

    e.g., if pos('?', BrowserAPI.Window.location.href)>0 then

    begin

    var query : variant; Query :=parseUrlQuery(BrowserAPI.Window.location.href);

    TryStrToInt(query.difficulty, d);

    end;

     

    If the pos results in zero - i.e., don't run the TryStrToInt - it still screws up the variable even though it was never run.

     

    I would expect TryStrToInt to work exactly like the Delphi version, i.e., come back with a zero if the Str To Int failed.

     

    -------------

     

    I have now come across a number of weird behaviours where SMS does not function as expected. I do not think it is suitable for these issues to be swept under the carpet as it means it is not possible to trust SMS to do what is required. :( These unexpected behaviour issues certainly make debugging more difficult as you cannot assume the underlying code is doing what you are expecting.

  7. And, it is not optimized away becuase if you put another writeln after the GetQuestion call same result.

     

     

    writeln('Difficulty exists here >'+inttostr(difficulty));

     

    GetQuestion;

     

    writeln('Difficulty exists here >'+inttostr(difficulty));

  8. I have found a most strange bug.

     

    If I use TryStrToInt then the integer variable is not accessible anywhere else in the program except for in the current local procedure.

     

    Here is the code. You can see the difficulty is a global. As long as the line

    TryStrToInt(d, difficulty);

    remains in the program as valid code the difficulty will not available in other procedures. I put the d='20' to show you that the code doesn't even need to run for it to screw up the results.

     

    If you run the code you will see in the console that difficulty is 101 in the procedure but when the writeln in GetQuestion is run the console shows [object object].

     

    If you comment out TryStrToInt (and preceding line) then everything works as expected.

     

    unit Form1;
    
    interface
    
    uses 
      SmartCL.System, SmartCL.Graphics, SmartCL.Components, SmartCL.Forms, system.types,
      SmartCL.Fonts, SmartCL.Borders, SmartCL.Application;
    
    type
      TForm1 = class(TW3Form)
      private
        {$I 'Form1:intf'}
        procedure GetQuestion;
      protected
        procedure InitializeForm; override;
        procedure InitializeObject; override;
        procedure Resize; override;
      end;
    
    var difficulty : integer;
    
    implementation
    
    { TForm1 }
    
    procedure TForm1.InitializeForm;
    begin
      inherited;
      // this is a good place to initialize components
    
      var d : string;
      d := '10';
    
      difficulty := 101;
    
      if d='20' then  // only here to prove a point
      TryStrToInt(d, difficulty);
    
      writeln('Difficulty exists here >'+inttostr(difficulty));
    
      GetQuestion;
    end;
    
    procedure TForm1.GetQuestion;
    begin
      writeln('But difficulty no longer existss here > '+inttostr(difficulty));  // result = [object object]
    end;
    
    procedure TForm1.InitializeObject;
    begin
      inherited;
      {$I 'Form1:impl'}
    end;
     
    procedure TForm1.Resize;
    begin
      inherited;
    end;
     
    initialization
      Forms.RegisterForm({$I %FILE%}, TForm1);
    end.
  9. The ShowDialog function could do with a bit more love. Currently it is not possible to entirely style the box and contents. Which limits the effectiveness of the dialog when it doesn't play nice with the form styling. In our case we all often have CSS applied to labels and form etc that are not suitable for a more business like dialog box.

     

    For example I get the following result. The image shows that the title has the bottom cut off the letter "g"

     

    dialogs.jpg

     

    Can you please open it up so that we can style the entire dialog using css. Cheers

  10. Whenever I open my projects I have a problem that a double occurrence of an ending square bracket is replaced by a space.

     

    i.e.,

     

    if QItem[ClickNum].FAnswerNum = QItem[G_ItemOrder[CurQNum]].FAnswerNum then

     

    the ]] becomes

     

    if QItem[ClickNum].FAnswerNum = QItem[G_ItemOrder[CurQNum .FAnswerNum then

     

    when I open it up.

×
×
  • Create New...