Jump to content

gabr42

Administrators
  • Content Count

    201
  • Joined

  • Last visited


Reputation Activity

  1. Like
    gabr42 got a reaction from DidierXT in WebWorker demo   
    Problem fixed. We updated the beta channel with the new RTL so you can rerun SmartUpdate and get the fixed files.
    Worker is now compiled to the www subfolder so you don't have to copy files around.
    Thank you very much for reporting this problem! That one would slip directly under the radar.
    P.S. We are aware that worker.js is quite large at the moment. We are working on that.
  2. Like
    gabr42 got a reaction from recursiveElk in TLayout questions   
    BTW, it is completely legit (and quite fast enough if you are not resizing the form ten times per second) to create, use and destroy the layout in the Resize method:
     

    procedure TForm1.Resize; begin inherited; Layout.Client( [Layout.Top(W3HeaderControl1), Layout.Center(W3Image1)] ).Resize(Self); end;
  3. Like
    gabr42 got a reaction from two_dog_knight in How to create SplashScreen using ShowModal   
    I have posted a tutorial on my blog: http://www.smartprogrammer.org/2013/07/creating-splash-screen.html
  4. Like
    gabr42 reacted to markus_ja in Layouts   
    You have to put your Layout code in the InitializeForm procedure. When InitializeObject is called, the size properties are not present at this time.
     
    And in the Resize procedure, you have to check if the Layout is already assigned.
    if Assigned(FLayout) then   begin     FLayout.Resize(self);     FTabLayout.Resize(W3Panel1);   end;
  5. Like
    gabr42 got a reaction from IElite in TW3DataSet.Delete not working properly   
    Thanks for the fix, I'll make sure it makes it into 2.2 RC2.
  6. Like
    gabr42 got a reaction from IElite in TW3DataSet.EOF not working properly   
    I do agree with the change. It will be available in 2.2 RC2.
  7. Like
    gabr42 got a reaction from Dany in SmartCL.Inet.REST   
    Indeed, a stupid bug. Thanks!
     
    Will be, of course, fixed in the next release.
  8. Like
    gabr42 got a reaction from Dany in Wrong javascript transalation   
    This turned out to be a compiler bug, which is now fixed. Thanks for reporting the problem!
  9. Like
    gabr42 got a reaction from lynkfs in How to change the properties of a control in a form from another form   
    Solution IV: Move {$I 'FrmMain:intf'} from the 'private' section to 'public' and all components will become visible to other forms.
  10. Like
    gabr42 got a reaction from lynkfs in How to change the properties of a control in a form from another form   
    Solution IV: Move {$I 'FrmMain:intf'} from the 'private' section to 'public' and all components will become visible to other forms.
  11. Like
    gabr42 got a reaction from lynkfs in How to change the properties of a control in a form from another form   
    Solution IV: Move {$I 'FrmMain:intf'} from the 'private' section to 'public' and all components will become visible to other forms.
  12. Like
    gabr42 got a reaction from IElite in Wrong javascript transalation   
    This will be fixed in the release. Thanks for reporting the problem!
  13. Like
    gabr42 got a reaction from IElite in Closed Browser still has focus   
    I can confirm the problem. We'll try to fix it in time for the next release.
  14. Like
    gabr42 got a reaction from IElite in Layouts still not working correctly in SMS 2.2 beta 5   
    Did some testing and this is the preferred way layouts should be used if your program has more than one form:
     
      TForm2 = class(TW3Form)   private     {$I 'Form2:intf'}     FLayout: TLayout;     procedure Form2Deactivate(Sender: TObject);   protected     procedure InitializeForm; override;     procedure InitializeObject; override;     procedure Resize; override;   end;   implementation   { TForm2 }   procedure TForm2.Form2Deactivate(Sender: TObject); begin   FLayout := nil; end;   procedure TForm2.InitializeForm; begin   inherited;   // this is a good place to initialize components   FLayout := Layout.Client(Layout.Top([W3Label1, W3Button1])); end;   procedure TForm2.InitializeObject; begin   inherited;   {$I 'Form2:impl'} end;   procedure TForm2.Resize; begin   inherited;   if assigned(FLayout) then     FLayout.Resize(Self); end;   Primož
  15. Like
    gabr42 got a reaction from IElite in Layouts still not working correctly in SMS 2.2 beta 5   
    In InitializeObject, controls are not yet fully instantiated and don't have Width/Height.
     
    You have to create a layout in InitializeForm.
     
    As first Resize is called before the InitializeForm is called, you have to change the code in Resize to:
     
      if assigned(fLayout) then     fLayout.Resize(self);   I have also created a pull request for your GitHub project with corrected code: https://github.com/holmesshanea/smartmobilestudio/pull/1
  16. Like
    gabr42 got a reaction from IElite in Error - SMS 2.2 BETA   
    About the Upload function not working: I have notified the forum manager.
  17. Like
    gabr42 got a reaction from BobLawrence in Free SMS Compiller - Fibonacci Test - Compiler errors   
    The reason for this error is quite simple - DWScript doesn't support assigning result to function by assigning it to its name (fib := 1). You have to assign it to the pseudo-variable Result (Result := 1).
  18. Like
    gabr42 got a reaction from jorn in What is similiar to the Form's OnActivate in Delphi?   
    But the simplest way to determine when a form is activated or deactivated is to override its FormActivated / FormDeactivated methods.
     
      TW3CustomForm = class(TW3CustomControl)   ...   public     procedure FormActivated; virtual;     procedure FormDeactivated; virtual;   end;   They are called from GotoForm at appropriate places.
  19. Like
    gabr42 got a reaction from IElite in Labels won't show in secondary forms when using layout   
    I did some more digging. The proper way to initialize/resize a layout is to:
     
    1) Create it in InitializeForm.
    2) Resize it in Resize (if it was already created - Resize is called once before InitializeForm is called).
     
    procedure TfrmMountains.InitializeForm; begin   inherited;   FLayout :=     Layout{1}.Client(Layout{2}.Margins(5).Spacing(5), [     Layout{3}.Top(Layout{4}.Center(W3Label1)),     Layout{5}.Bottom(W3Button1)]); end;   procedure TfrmMountains.Resize; begin   inherited;   if assigned(FLayout) then     FLayout.Resize(Self); end;   This doesn't fix the "invisible labels" problem, though, as this is an unrelated problem.
  20. Like
    gabr42 got a reaction from jorn in Why "CL" namespace?   
    Good question! I would guess that it's in SmartCL because it uses two SmartCL uses. On the other hand, it
     
    1) really should be in the System namespace,
    2) should not use SmartCL.System, and
    3) SmartCL.Consts (which is used by Dictionaries) should probably be also moved to the System namespace.
     
    We'll have to discuss this internally to find the best solution. I'll let you know (here) how it plays out.
     
    As for the Filter request, I'll forward it to Eric (the compiler guy).
  21. Like
    gabr42 got a reaction from Dany in Suggestion for Assigned   
    Eric says: "Yes, it would make sense but might be a bit ambiguous as there is both null and unassigned in JS and variants. Typically null equates to nil, but null is not unassigned in js, so Assigned(null) would have to be either true or false depending on the point of view..."
     
    And he has a point here - Assigned may bring in unexpected consequences in some cases for some users which, again, is not good.
  22. Like
    gabr42 got a reaction from jorn in Why "CL" namespace?   
    Good question! I would guess that it's in SmartCL because it uses two SmartCL uses. On the other hand, it
     
    1) really should be in the System namespace,
    2) should not use SmartCL.System, and
    3) SmartCL.Consts (which is used by Dictionaries) should probably be also moved to the System namespace.
     
    We'll have to discuss this internally to find the best solution. I'll let you know (here) how it plays out.
     
    As for the Filter request, I'll forward it to Eric (the compiler guy).
  23. Like
    gabr42 got a reaction from jorn in Any Books on SMS other than A Smart Book   
    Yes, an update is long overdue - we can all agree on that It's just that old problem of not enough hours in a day.
     
    I have started the book when I was just an external SmartMS contributor. After a while, a wheels have turned and I became a Program Manager for the project. That brough in more responsibility and more work, which, sadly, used the time slots previously dedicated to the book
     
    We'll try to find a solution for that. After all, we totally realize that SmartMS needs a good documentation.
  24. Like
    gabr42 reacted to Mason Wheeler in Crash on shutdown   
    Following a period of intense CPU activity for no good reason that was lagging things horribly, (10-20 seconds from keypress to response,) I tried to shut down and got the following error.  I've seen this before, poking around in DWS, and it means something somewhere else went very wrong, so I'm not sure how much this will help, but here's the error report: http://pastebin.com/6YrFndxP
     
    If it would help at all, I'd be willing to work under NDA with the sources, to help track down and fix up stability issues like this.  If I could have attached the debugger at the point where things were burning 100% CPU and lagging everything to high heaven, I might have a more useful bug report for you guys...
×