Jump to content

Czar

Members
  • Content Count

    447
  • Joined

  • Last visited

  • Days Won

    13

Reputation Activity

  1. Thanks
    Czar reacted to lynkfs in console override   
    This mechanism can be used to redefine more built-in functions. Funny.
    The code below redefines 'ShowMessage' to redirect its contents to a Memo :
    procedure TForm1.InitializeObject; begin   inherited;   {$I 'Form1:impl'}   W3Memo1.Text := 'ShowMessage : ' + #10;   browserapi.window.alert := procedure(text:variant)   begin     W3Memo1.Text := W3Memo1.Text + #10 + text;   end;   ShowMessage('ccc');   browserapi.window.alert('ddd'); end;  
    or combine the two and redefine 'ShowMessage' to redirect its contents to the 'Writeln' function, which in its turn is redirected to the Memo :
    procedure TForm1.InitializeObject; begin   inherited;   {$I 'Form1:impl'}   W3Memo1.Text := 'Console.log : ' + #10; //WriteLn redirects to Memo   browserapi.console.log := procedure(text:variant)   begin     W3Memo1.Text := W3Memo1.Text + #10 + text;   end; //ShowMessage redirects to WriteLn   browserapi.window.alert := procedure(text:variant)   begin     writeln(text);   end;   writeln('aaa');   browserapi.console.log('bbb');   ShowMessage('ccc');   browserapi.window.alert('ddd'); end;  
  2. Like
    Czar reacted to IElite in ToolTips (hints)   
    Would it be possible to add ToolTips into the RTL, so that all visual controls had the capability of displaying ToolTips? I know this is useless on anything other than devices that use a mouse, but I think it would be handy for web browser applications where the mouse is used. 
    could add these properties
    ShowTip property (boolean)
    TipText property (String)
    maybe even a TipStyle property   
    https://www.w3schools.com/css/css_tooltip.asp
     
  3. Thanks
    Czar reacted to lynkfs in console override   
    redirecting 'console.log' or 'writeln' output proves to be very simple :
    have a form with a Memo component :
    procedure TForm1.InitializeObject; begin   inherited;   {$I 'Form1:impl'}   W3Memo1.Text := 'Console.log : ' + #10;   browserapi.console.log := procedure(text:variant)   begin     W3Memo1.Text := W3Memo1.Text + #10 + text;   end;   writeln('aaa');   browserapi.console.log('bbb'); end; all subsequent calls to writeln and/or console.log are now redirected to the Memo component.
     
  4. Like
    Czar reacted to IElite in IDE & Documentation   
    3,0 RTL update has come and gone....there have been periodic updates to this and most likely will continue to be.
    Is there still a IDE update in the near future? Do you have a time frame?
    Is there a revised documentation update in the near future? Do you have a time frame - Particularly documentation on the new 3.0 RTL?
    Keep up the good Work!
     
  5. Like
    Czar got a reaction from jarto in Development updates   
    I have updated using

    SmartUpdate /changechannel /showhidden
     
    If I subsequently run smartupdate by double clicking I get a message that development not available.
    Can you update smartupdate so that we don't have to run from DOS using SmartUpdate /changechannel /showhidden every time - or set up a batch file
  6. Like
    Czar got a reaction from IElite in Development updates   
    I have updated using

    SmartUpdate /changechannel /showhidden
     
    If I subsequently run smartupdate by double clicking I get a message that development not available.
    Can you update smartupdate so that we don't have to run from DOS using SmartUpdate /changechannel /showhidden every time - or set up a batch file
  7. Like
    Czar reacted to jarto in Resize method called 3 times ?   
    I dug deeper into the Layout code and it seems there's a bug in how bottom alignment is done. The code sets the bottom coordinate, which leads to the code to calculate top based on the current component height. However, the current component height at that point is still the default height right after create, so the top coordinate is calculated wrong. Height is set after that, but it does not adjust top accordingly.
    A second resize helps as at that point the bottom component is already of the right height.
  8. Like
    Czar reacted to jarto in Development updates   
    Now it should be possible for everyone to use SmartUpdate with the development-channel.
  9. Like
    Czar reacted to jarto in Development updates   
    17.11.2018
    RTL:
    Changes to handling of Cursor: Style definitions moved from basic html elements to control styles GetCursor and SetCursor can now be overridden Bug fixes to how many controls handle cursor. Especially TW3Label. Themes: Add missing styles TW3CheckBox, TW3CheckMark, TW3RadioButton, TW3RadioToggle and TW3RadioGroup Two new backgrounds: TW3DecorativeListItemBackground and TW3TransparentBackground RTL optimizations to creation of controls, GetBoundsRect, SetBounds, MoveTo and SetSize. Bug fix to SmartCL.Graphics.pas: Changing of canvas font, size and styles did not work. Bug fix to System.DateUtils.DecodeDate. IDE:
    Delete key works now Search dialog and other dialogs. Bug fix: Internal Browser Window showed only a white screen if Execute was clicked while it was open. Compiler:
    Now(), EncodeDate() and EncodeTime() returns now the same values as Delphi and FPC All time/date -functions fixed to work with the new TDateTime-values
  10. Like
    Czar reacted to jarto in DayOf reporting false value   
    I dug around and found out that I actually can fix those "buggy" functions in the compiler without having to upgrade to a newer version of DWScript. I only have IncMonth to fix any more.
    The root cause of the problem is the way javascript dates work. When you build a date from day, month and year, the result depends on your time zone. I guess it builds the date as UTC and then views it from your location. So, while it's 01.12.2018 at 00:00:00 in London, it's still 30.11.2018 in USA. And when you call DayOf on that, you get 30 instead of 1. This affects about 10 other functions as well, including FormatDateTime and DateTimeToStr and TimeToStr.
    I'll make sure to test this all properly and then release an update. Once it's done, I'm super happy to get rid of these problems.
  11. Like
    Czar reacted to jarto in Save tw3image to desktop?   
    @Czar Just had a look and found the problem. The code that was in TW3CanvasFont.WriteFontInfo had to be in ReadFontInfo. Also, WriteFontInfo needed to be constructed from the internal variables.
    Edit: Fixed now. Gonna be in next update.
  12. Like
    Czar got a reaction from IElite in Smart Mobile Studio 3.0.1 is released!   
    I simply edited settings.ini

    [Settings]
    Channel=MASTER
    RelativePaths=1
     
  13. Like
    Czar reacted to jarto in Resize method called 3 times ?   
    In versions before 3.0 alpha, there were a lot of resizes. If I remember right, something like closer to 10 before the form was shown. Flipping the device also resulted in two resizes: One, when the width was changed and one when the height was changed. Also, every BeginUpdate/EndUpdate used to cause a resize (regardless if anything was changed) and if you peek at SmartCL.Controls.pas, they are used a lot.
    For 3.0 alpha I did my best to eliminate all that were safe to be eliminated. So, the device flip causes only one resize, for example.
    At the moment the RTL mostly internally calls ResizeWhenReady, which checks to see if the control and all its children are ready: If not, the resize will be delayed and sent later. Also, invalidate does call ResizeWhenReady with a delay. So if you call invalidate for a control 5 times, you will only get one resize.
    I don't know if I can eliminate more resizes safely, but I can have a look.
  14. Like
    Czar reacted to jarto in Smart Mobile Studio 3.0.1 is released!   
    Couldn't be easier ?
  15. Like
    Czar reacted to jarto in Smart Mobile Studio 3.0.1 is released!   
    Smart Mobile Studio 3.0.1 is released
    This is the first release since 3.0. Biggest new feature is TW3LeafletMap, which lets you use OpenStreetMap. As it does not need API keys (like TW3GoogleMaps), it’s really fast and easy to use:
    – Create a project
    – Add a TW3LeafletMap -control on the form
    – Set AutoCreateMap to true on the map control
    Changes since 3.0
    8.11.2018
    RTL:
    – EventManager:
    – Add procedure AllowDefaultAction, that can be called from OnClick when the default
    action should happen. For example: To let the virtual keyboard to pop up from OnTouch.
    – Bug fixes:
    – Native scrolling was prevented if scrolling was done from an unknown element.
    – Prevent an extra OnClick from being fired on mobile devices.
    – TW3ListView: Bug fix to resizing of items.
    – Bug fixes to GeoLocation. Also update the Geolocation demo.
    – Deprecate PhoneGapAPI’s JGeolocation functions. SmartCL.GeoLocation.pas should be used instead.
    – Fix slider so that OnMouseDown, OnMouseUp and OnMOuseMove can be used.
    – TW3TabControl Tab’s OnShow was sent twice for the first tab
    – SmartCL.RegEx moved to System.RegEx. Also fixed TW3RegEx.Exec to return a proper empty array instead of nil.
    – Bug fix to Chart: TSeriesData.Refresh now also updates the X axis
    – TW3Grid:
    – Added TW3ImageColumn
    – Add Alignment-property to TW3ColumnHeader
    – Added a new OnCellControlCreated-event, which fires when a button, toggle, progress bar or image is created.
    Makes it possible to change properties of the control easily.
    – Added support for OpenStreetMap using the Leaflet library:
    – New control: TW3LeafletMap
    – New featured demo: LeafletMap
    IDE/Compiler:
    – Fixed search path compilation issues
    – Relative and absolute paths are working now
    – Compiler is updated when search path is modified in options
    – $I will look for include file in the project folder first
    – $R supports absolute paths, wildcards, folder name extension and ($Libraries) macro
    – Fix exceptions in Search
    – Upgrade to UPX 3.95
    23.7.2018
    – SmartCL.Effects: Properly handle padding and margins while doing effects.
    22.7.2018
    – Fix to css-files for selected text in TW3Edit and TW3Memo
    Release notes and installers: https://smartmobilestudio.com/2018/11/08/smart-mobile-studio-3-0-1-released/
    Note that you can also use SmartUpdate to keep your portable installation up to date. Instructions on using that are in the link above.
  16. Like
    Czar reacted to lynkfs in Resize method called 3 times ?   
    The multiple calls to ReSize have been a 'feature' from the beginning, but I don't know exactly why this happens.
    The Smart Mobile Studio release page (https://smartmobilestudio.com/category/news/) says : 
    28.9.2017 :
    Improvements to Resizing:
    – Minimize number of resizes during form create.
    – Trigger only one resize during device flip.
    so obviously there can be multiple resize events on startup. 
    Not sure what your business case is here, but personally I use ReSize mainly for device flip purposes.
    If your purpose is to DoSomething after an element or a form has been completely initialised in the DOM, you could use ReadyExecute
      Handle.ReadyExecute( procedure ()   begin     DoSomething;   end); or even when it involves doing this on a repaint
      Handle.ReadyExecute( Procedure ()     begin       BrowserAPI.window.requestAnimationFrame( procedure ()       Begin         DoSomething;       end);     end); not in the ReSize proc but in the control setup
     
  17. Like
    Czar reacted to jarto in getting the row # of a button in a cell of a TW3ButtonColumn in Tw3Grid ?   
    In the next release there's a new OnCellControlCreated -event in TW3Column. It can be used to set properties for the button. For example:
    ButtonCol := TW3ButtonColumn.Create(W3Grid1 as IW3ColumnsControl); ButtonCol.OnButtonClick := procedure(Sender: TObject) begin WriteLn('Click on row '+IntToStr(TW3Button(Sender).TagValue)); end; ButtonCol.OnCellControlCreated := procedure(Sender: TObject) begin TW3Button(Sender).TagValue:=W3Grid1.RowCount; end;  
  18. Like
    Czar reacted to IElite in Calendar Control   
    I would like to see a calendar control (TW3Calendar) in the RTL.  Possibly derive it from TW3Grid? It would be nice to make it like the Delphi version, but I dont think it has to be as elaborate. I think you could keep the Month, Year, and Navigation controls off from the calendar and just make the Month and Year properties and the navigation routines.
    I would like to see at least the Month view (BONUS:  year, and day view as well)
    I have looked at a lot of javascript versions and most are too bloated for me to attempt to port over.
    Features I would like to see:
    - should show the one or more days of previous month if current months first day starts on anything other than the first day of the week - should show the one or more days of next month if current months last day falls on anything other than the last day of the week - should be able to navigate through the years, months - should be able to highlight the current day - clickable days BONUS:  able to set and highlight a range of days. Click and Drag
  19. Thanks
    Czar reacted to DavidRM in Yikes!!!   
    I'm working on a project with SMS and have a couple more planned. I'm looking forward to the next update. I also expect to renew my subscription, which I think ends soon.
    Just saying.
    Also, if you need any help from the hoi polloi, let me know.
    -David
  20. Like
    Czar reacted to jarto in Yikes!!!   
    I'm sad to see Jon leave his baby like this, but I do respect his decision.
    What I can say is, that SMS is not dying here. I've been waiting a few weeks already to push a new update, but have not been able to get any answers from Jon, if he'd also want to include some changes.
    I believe things look worse to you guys than they really are. A lot of RTL work and especially bug fixes was done by me during the last year and almost all the IDE improvements and bug fixes by Primoz. Jon did pretty much all the NodeJS work, so we'll miss him most there.
    If I look at this optimistically, Jon's donating his shares to two young and talented Delphi programmers is a very nice thing and may give them a possibility to spend more time on SMS.
    But hey, hang on there and lets hope that this divorce will not be too ugly.
  21. Like
    Czar got a reaction from IElite in Yikes!!!   
    I just read the news and I believe you are correct IELite. Without Jon's major input the project feels like it will fold. Jarto is the only other member that I am aware of. If the other shareholder's don't show some significant leadership then it will flounder. Personally I hope it doesn't disappear and perhaps a better solution would be to opensource everything.

    SMS is a product we use everyday and it fits very well into part of our development requirements. Shame to see it end.
  22. Sad
    Czar reacted to IElite in Yikes!!!   
    Yikes! Jon is leaving!
    https://jonlennartaasenden.wordpress.com/2018/10/30/leaving-the-smart-company/
     
     
  23. Sad
    Czar reacted to IElite in Yikes!!!   
    @Igor Savkic My intuition is that this will fold.  It seems all the team members are only part of this as a secondary project to what they are actually involved in. 
    One only has to look at the history of this site. On this forum, it's the same 4 or 5 people who actively use the product. Hardly any team members ACTIVELY use the forum to answer questions (aside from @jarto & @lennart ) and when they do, it seems to be very selective. I have, I don't know, 4 questions, that no one has touched except @lynkfs who I am sure isnt a team member (maybe I'm wrong).  There seems to be no marketing, social networking, or articles being written (except when Jon writes them and posts them on his personal page).  They haven't done ANY new documentation for 3.0 (and the old was never completed either). The book that was started was never finished. The team member that started it said that his other project was more important.
    In the overall scheme of things, the product (as great as it is), never did live up to its name. It really is not a tool for creating applications for smartphones. It has a LONG way to go to be able to be known for that. I mean, it can do that, but NOT as EASY as the web page portrays it. However, It is a great tool for creating websites (that need a lot of logic and functionality that are too hard to program from NON-JAVASCRIPT experts).
    It is a shame. I do hope that this project continues to live and improve, BUT,  i am not betting on it that it does.
  24. Like
    Czar reacted to lynkfs in Calendar   
    I would have a look at
    fully developed open source calendar js libraries which can be embedded in your sms app as is (i.e. https://fullcalendar.io/) make your own based on an opensource css-only component. These components usually have no js component at all, just html and css. The css bit you can copy into your stylesheet if you like the look and feel and the html can be used to recreate the logic behind it all. (i.e. https://freefrontend.com/css-calendars/) make your own from scratch my personal approach would be the middle one (unless you find a js library which does exactly what you need)
    cheers
  25. Thanks
    Czar reacted to Kosta in Microsoft has removed Trojan detection from Microsoft Security Essentials for Smart Mobile Studio v3.0   
    Recently Microsoft Security Essentials has detected a Trojan:Win32/Azden.B!cl. in Smart Mobile Studio v3.0 smartms.exe binary, and this detection has been removed form malware definitions.
    Big&Many Thanks to jarto how to submit files to Microsoft in order to remove false malware detection.
    Report from Microsoft
    Submission details
    smartms.exe
    Submission ID: 43e9c4db-2060-431a-a8d8-17bbddecf3be
    Status: Completed
    Submitted by: k**********@gmail.com
    Submitted: Oct 2, 2018 4:44:50 PM
    User Opinion: Incorrect detection
    Analyst comments:
    Hello Kosta ***, Thank you for your inquiry. We have reviewed the file and we have removed the detection. Please try the following steps to clear cached detections and obtain the latest malware definitions.   1. Open command prompt as administrator and change directory to c:\Program Files\Windows Defender 2. Run “MpCmdRun.exe -removedefinitions -dynamicsignatures” The latest definition is available for download here: https://www.microsoft.com/en-us/wdsi/definitions Best regards, Windows Defender Response
     
    Thank you jarto Thank you lennart.
    Best regards
    Kosta.
×
×
  • Create New...