Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 08/05/2018 in all areas

  1. 5 points
    jarto

    Development updates

    New update available: RTL: TW3ListMenu: Add Items-property, so items can created in Object Inspector. Add OnSelected-event. IDE: Bug fix to renaming of units Show form source instead of designer when form is selected from Project Manager
  2. 5 points
    jarto

    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.
  3. 4 points
    lynkfs

    wysiwyg

    Was looking for an easy to make wysiwyg editor. This one is based on 'document.designMode'. Mozilla: "When an HTML document has been switched to designMode, its document object exposes an execCommand method to run commands that manipulate the current editable region" IFrame's have an innate document element which can be used for that purpose. Have a form with an IFrameHtmlElement and 2 buttons ('bold' and 'italic') : procedure TForm1.InitializeForm; begin inherited; // this is a good place to initialize components W3IframeHtmlElement1.handle.contentDocument.designMode := 'on'; W3IframeHtmlElement1.handle.contentDocument.body.innerHTML := 'this is some text'; W3IframeHtmlElement1.handle.focus(); end; procedure TForm1.W3Button1Click(Sender: TObject); //bold begin W3IframeHtmlElement1.handle.contentDocument.execCommand('bold', false, null); W3IframeHtmlElement1.handle.focus(); end; procedure TForm1.W3Button2Click(Sender: TObject); //italic begin W3IframeHtmlElement1.handle.contentDocument.execCommand('italic', false, null); W3IframeHtmlElement1.handle.focus(); end; Besides 'bold' and 'italic' execCommand supports a host of other edit commands as well. see https://codepen.io/chrisdavidmills/full/gzYjag/
  4. 4 points
    lynkfs

    lighthouse

    Google has implemented a new service : web.dev Basically this measures some indicators of any url using their LightHouse tool. These indicators are grouped into Performance, Accessibility, Best Practices and SEO I created a minimal SMS project with only a single image on a form and run the test : https://web.dev/measure and url : https://www.lynkfs.com/Experiments/lighthouse/www/ This gives scores of 95 / 27 / 77 / 89 for Performance, Accessibility, Best Practices and SEO respectively There are a couple of really simple things which will up these scores considerably. Scores were upped to 96 / 74 / 92 / 100 when doing this : Best Practices from 77 to 92 : 1) in project options/linker unclick 'generate cache manifest' (deprecated) Performance from 95 to 96 : 1) in project options/linker unclick 'store CSS as a separate file' (95 to 96) 2) add async to <script async src="lib/polyfill.custom.events.js" type="text/javascript"></script> in the index.html template SEO from 89 to 100 : 1) add meta description tag to the head of index.html <meta name="Description" content="Put your description here."> Accessability from 27 to 74 : 1) add alt attribute to images, even if only '' : W3Image1.handle.setAttribute('alt', ''); (27 to 58) 2) add lang="en" to html element in index.html template : <html lang="en"> (58 to 74) 3) tabindex=1 for TW3Display and TW3DisplayView. Should be 0 ? run test again on url : https://www.lynkfs.com/Experiments/lighthouse2/www/ to see these results All of the above could be made part of the standard settings for a new visual project
  5. 4 points
    lynkfs

    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.
  6. 4 points
    lynkfs

    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;
  7. 4 points
    jarto

    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
  8. 4 points
    jarto

    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.
  9. 4 points
    jarto

    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.
  10. 3 points
    jarto

    Smart Mobile Studio 3.0.2 is released!

    Smart Mobile Studio 3.0.2 is released. This version contains all the fixes and improvements from the development-channel. There are lots of bug fixes and improvements to the IDE thanks to all the help from our users here. The Smart Mobile Studio team wants to with everybody a Merry Christmas and Happy New Year. Release notes: https://smartmobilestudio.com/2018/12/21/smart-mobile-studio-3-0-2-released/
  11. 3 points
    jarto

    Development updates

    New update available: RTL: TW3TabControl: AnimateTabs-property to control how tabs are changed. TW3ListBox: Prevent an exception if TW3Image is used as a line control and OnShowItem is not set. TW3ListMenu, TW3HeaderControl and TW3SimpleLabel: Don't set default caption to classname during initialization. DWScript: Capitalize day and month names correctly (January instead of january, Sunday instead of sunday) IDE: Improvements to the way the IDE reacts to a changed external file. Use caption while drawing generic controls instead of component name.
  12. 3 points
    jarto

    CSS Resource Files

    @DavidRM Now I was able to reproduce the problem and it explains the "caching" too. When the IDE gets a signal, that something has changed, it reacts to it while the file is still being saved -> It can't access the file. I did probably not get this bug myself as the css file I was testing with was so small. Thank you. Now I can fix this problem 🙂
  13. 3 points
    jarto

    New to Node

    Actually, the communication part between a NodeJS server and a Smart client app is pretty easy. Client: You read data from the server using simple http/https get. When you want to write something to the server, you do it with http/https post. Server: You can start with the NodeJS http server example. When your client sends a get or post, it comes to TServer.HandleRequest where you handle the request. You can start by adding some WriteLn to TServer.HandleRequest to print out what the headers and the content is. Then you can send GET and POST requests to it by using a browser (http://localhost:1881/whatever/url/you/want/to/send/it?params=whatever) or curl. With Curl you can easily send post commands. For example: curl -i -X POST -H 'Content-Type: application/json' -d '{"score": "Player": "10000"}' http://localhost:1881 When you can see what's going on in the server, you can also make the client app and start sending those http get/post with TW3HttpRequest (SmartCL.Net.Http) I have done this earlier on the client side with Smart Mobile Studio and it worked nicely. There were hundreds of thousands of users on iOS and Android. The server was in Delphi but it can really be written in any language. I'd probably write my next server in Smart Mobile Studio using NodeJS.
  14. 3 points
    lynkfs

    component creation

    Question : is this article still the preferred way to develop visual components ? I developed some Material Design components some years ago (here and here) but they need to be ported to the latest rtl as they don't compile anymore. Hence this question. As an example I ported a simple component (switch) using the recipe in Jon's article and it works ok, see below Just a bit elaborate. unit Switch; /****************************************************************************** LynkFS / 20 - 11 - 2018 The Switch component consists of - a W3Panel as the main container for the Switch - a W3Panel for the Switch - a W3Panel for the sliderline - a W3Panel as the highlighter The component is by default styled according to the css theme of the project. Styling can be modified by overriding the following css classes : The Switch CSS classes in BEM notation are .TSwitch .TSwitch__Panel .TSwitch__Panel__Line .TSwitch__Panel__Line--StateOn .TSwitch__Panel__Line--StateOff .TSwitch__Panel__Knob .TSwitch__Panel__Knob--StateOn .TSwitch__Panel__Knob--StateOff .TSwitch__Panel__HighLight .TSwitch__Panel__HighLight--Active .TSwitch__Panel__HighLight--InActive */ interface uses W3C.DOM, System.Types, System.Time, System.Colors, System.Events, {$IFDEF THEME_AUTOSTYLE} SmartCL.Theme, {$ENDIF} SmartCL.System, SmartCL.Touch, SmartCL.Effects, SmartCL.borders, SmartCL.Components, SmartCL.Controls.Panel, SmartCl.Css.StyleSheet; type TSwitch = class(TW3CustomControl) private Panel0 : TW3Panel; //background Panel1 : TW3Panel; //sliderline Panel2 : TW3Panel; //indicator Panel3 : TW3Panel; //Switch knob procedure SetStateOn(StateOn: Boolean); function GetStateOn: Boolean; IsStateOn: Boolean := false; protected // see https://jonlennartaasenden.wordpress.com/2018/05/07/ function MakeElementTagObj: THandle; override; //1 procedure StyleTagObject; override; //2 procedure ObjectReady; override; //3 procedure InitializeObject; override; //4 procedure Resize; override; //5 procedure FinalizeObject; override; Procedure ShowSwitch; //included in 5 Procedure InsertCSS; //included in 2 public property StateOn: Boolean read getStateOn write setStateOn; end; implementation { TSwitch } function TSwitch.MakeElementTagObj: THandle; //1 begin result := w3_createHtmlElement('div'); //div = default, so could be omitted end; procedure TSwitch.StyleTagObject; //2 begin inherited; {$IFDEF THEME_AUTOSTYLE} ThemeBorder := btDecorativeBorder; {$ENDIF} InsertCSS; //insert all styling in stylesheet end; procedure TSwitch.ObjectReady; //3 begin inherited; //set some initial properties Panel0.SetBounds(0,0,self.width,self.height); //background Panel1.SetBounds(round(self.height/2), //slider line round(self.height/2)-round(self.height*0.2), self.Width-self.height, round(self.height*0.4)); Panel2.SetBounds(0,0,self.height,self.height); //highlight circle var x : integer := round(self.height/5); //switch knob Panel3.SetBounds(x,x,Panel2.width-2*x,Panel2.height-2*x); TW3Dispatch.WaitFor([Panel0, Panel1, Panel2, Panel3], 5, procedure (Success: boolean) begin if Success then begin // set some initial properties If IsStateOn then begin Panel2.Left := self.Width - Panel2.Width; Panel3.Left := self.Width - Panel2.Width + round((Panel2.Width-Panel3.Width)/2); end; // Do an immediate resize Resize(); end; end); end; procedure TSwitch.InitializeObject; //4 begin inherited; //creating sub-components Self.TagStyle.Add('TSwitch'); //superfluous, will be auto generated Panel0 := TW3Panel.Create(self); Panel0.TagStyle.Clear; //dont inherit css from TW3Panel Panel0.TagStyle.Add('TSwitch__Panel'); Panel1 := TW3Panel.Create(Panel0); Panel1.TagStyle.Clear; //dont inherit css from TW3Panel Panel1.TagStyle.Add('TSwitch__Panel__Line TSwitch__Panel__Line--StateOff'); Panel2 := TW3Panel.Create(Panel0); Panel2.TagStyle.Clear; //dont inherit css from TW3Panel Panel2.TagStyle.Add('TSwitch__Panel__HighLight TSwitch__Panel__HighLight--InActive'); Panel3 := TW3Panel.Create(Panel0); Panel3.TagStyle.Clear; //dont inherit css from TW3Panel self.SimulateMouseEvents := True; //touch enable self.handle.addEventListener("click", procedure() begin IsStateOn := not IsStateOn; If IsStateOn then begin Panel3.fxMoveBy(self.width - self.height, 0, 0.5); Panel2.fxMoveBy(self.width - self.height, 0, 0.5); end else begin Panel3.fxMoveBy(-self.width + self.height, 0, 0.5); Panel2.fxMoveBy(-self.width + self.height, 0, 0.5); end; Panel2.TagStyle.Clear; //dont inherit css from TW3Panel Panel2.TagStyle.Add('TSwitch__Panel__HighLight TSwitch__Panel__HighLight--Active'); TW3Dispatch.Execute (Procedure() begin Panel2.TagStyle.Clear; //dont inherit css from TW3Panel Panel2.TagStyle.Add('TSwitch__Panel__HighLight TSwitch__Panel__HighLight--InActive'); end, 80); ReSize; end); end; procedure TSwitch.Resize; begin inherited; if not (csDestroying in ComponentState) then begin // Make sure we have ready state if (csReady in ComponentState) then begin // Check that child elements are all assigned // and that they have their csReady flag set in // ComponentState. This can be taxing. A more lightweight // version is TW3Dispatch.Assigned() that doesnt check // the ready state (see class declaration for more info) if TW3Dispatch.AssignedAndReady([Panel0, Panel1, Panel2, Panel3]) then begin // Finally: layout the controls. ShowSwitch; end; end; end; end; Procedure TSwitch.ShowSwitch; begin // Panel1.TagStyle.Clear; Panel3.TagStyle.Clear; If IsStateOn then begin Panel3.TagStyle.Add('TSwitch__Panel__Knob TSwitch__Panel__Knob--StateOn'); Panel1.TagStyle.Add('TSwitch__Panel__Line TSwitch__Panel__Line--StateOn'); end else begin Panel3.TagStyle.Add('TSwitch__Panel__Knob TSwitch__Panel__Knob--StateOff'); Panel1.TagStyle.Add('TSwitch__Panel__Line TSwitch__Panel__Line--StateOff'); end; // end; procedure TSwitch.InsertCSS; var cssProperties : string; begin //make stylesheet var styleSheet : TW3StyleSheet := TW3StyleSheet.Create; styleSheet.Add(".TSwitch", ''); styleSheet.Add(".TSwitch__Panel", ''); cssProperties := 'cursor: pointer; border: 0px; border-radius: 6px;'; styleSheet.Add(".TSwitch__Panel__Line", cssProperties); cssProperties := 'background-color: rgba(164,114,234,.50);'; styleSheet.Add(".TSwitch__Panel__Line--StateOn", cssProperties); cssProperties := 'background-color: rgba(0,0,0,.26);'; styleSheet.Add(".TSwitch__Panel__Line--StateOff", cssProperties); cssProperties := 'cursor: pointer; border: 0px; border-radius: 50%;'; styleSheet.Add(".TSwitch__Panel__HighLight", cssProperties); cssProperties := 'background-color: rgba(164,114,234,.50);'; styleSheet.Add(".TSwitch__Panel__HighLight--Active", cssProperties); cssProperties := 'background-color: transparent;'; styleSheet.Add(".TSwitch__Panel__HighLight--InActive", cssProperties); cssProperties := 'cursor: pointer; border-radius: 50%; box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12);'; styleSheet.Add(".TSwitch__Panel__Knob", cssProperties); cssProperties := 'background-color: rgba(164,114,234,.90);'; styleSheet.Add(".TSwitch__Panel__Knob--StateOn", cssProperties); cssProperties := 'background-color: white;'; styleSheet.Add(".TSwitch__Panel__Knob--StateOff", cssProperties); /* Alternatively add this to a custom stylesheet : .TSwitch { } .TSwitch__Panel { } .TSwitch__Panel__Line { cursor: pointer; border: 0px; border-radius: 6px; } .TSwitch__Panel__Line--StateOn { background-color: rgba(164,114,234,.50); } .TSwitch__Panel__Line--StateOff { background-color: rgba(0,0,0,.26); } .TSwitch__Panel__HighLight { cursor: pointer; border: 0px; border-radius: 12px; } .TSwitch__Panel__HighLight--Active { background-color: rgba(164,114,234,.50); } .TSwitch__Panel__HighLight--InActive { background-color: transparent; } .TSwitch__Panel__Knob { cursor: pointer; border-radius: 10px; box-shadow: 0 2px 2px 0 rgba(0,0,0,.14),0 3px 1px -2px rgba(0,0,0,.2),0 1px 5px 0 rgba(0,0,0,.12); } .TSwitch__Panel__Knob--StateOn { background-color: rgba(164,114,234,.90); } .TSwitch__Panel__Knob--StateOff { background-color: white; } */ end; procedure TSwitch.FinalizeObject; begin Panel0.Free; Panel0 := nil; inherited; end; procedure TSwitch.SetStateOn(StateOn: Boolean); begin IsStateOn := StateOn; end; function TSwitch.GetStateOn: Boolean; begin Result := IsStateOn; end; end. usage procedure TForm1.InitializeForm; begin inherited; // this is a good place to initialize components Switch1 := TSwitch.Create(self); // Switch1.StateOn := true; //default false Switch1.SetBounds(50,50,60,35); end;
  15. 3 points
    jarto

    component creation

    Let me start by commenting on Jon's blog post. For the most part it's accurate, but he makes a small mistake with the "common mistake": ObjectReady() calls ReadySync() which actually does check if the child elements are ready. So, when you override ObjectReady(), the child controls you created in InitializeObject should also be ready. And when ObjectReady() happens, it also triggers the first Resize for the component. Let me comment on these three lines: Users don't need to write as complex checking routines as ReadySync() is. Let the RTL take care of that. It does it very well. However, do always check your controls in Resize(). Minimum is to check that they are not nil. And if you want to be extra sure, check the ready state too. And by far the best way to do this all is pretty simple: In your Resize() procedure, always check if your controls are ready If they are not, call Self.Invalidate(). Do not call Resize() directly or via TW3Dispatch as Jon suggests. Think about Invalidate() as a request for a new Resize(). It calls an internal procedure in the RTL called ResizeWhenReady() and it does exactly what it says: It will call Resize() with a short delay and it will check that any new child components you added after the previous resize are also ready. The delay helps to minimize the number of Resize()-calls and it simply makes sense to not let a Resize() happen before your child components are ready. I think Jon is explaining how the RTL did work before I got involved. It makes sense to rely on ObjectReady() when you have a simple, static control but when you have a control like TW3ListBox, it does not work at all as the TW3ListBox dynamically creates new child components while you use the control.
  16. 3 points
    jarto

    Development updates

    Now it should be possible for everyone to use SmartUpdate with the development-channel.
  17. 3 points
    jarto

    Smart Mobile Studio 3.0.1 is released!

    Couldn't be easier ?
  18. 3 points
    jarto

    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.
  19. 3 points
    lynkfs

    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
  20. 3 points
    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: i**********@msn.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.
  21. 3 points
    lynkfs

    Send an email ?

    This is a 2-step process 1) see this post and follow at least the first steps. Basically establish the link between your app, googles api's and your gmail account. For option 2a(below) you need at least an api-key and clientId, for option 2b you need the full oauth2 gamut including tokens 2) then do one of the following 2a) make use of Googles javascript client library for gmail <!DOCTYPE html> <html> <head> <title>Send email using gmail API</title> <meta charset='utf-8' /> </head> <body> <p>Send email using gmail API.</p> <!--Add buttons to initiate auth sequence and sign out--> <button id="authorize-button" style="display: none;">Authorize</button> <button id="signout-button" style="display: none;">Sign Out</button> <div id="content"></div> <script type="text/javascript"> var apiKey = '********2qOeiRlg2humU4YifLyNqt2TrWR2kGk'; var discoveryDocs = ["https://www.googleapis.com/discovery/v1/apis/gmail/v1/rest"]; var clientId = '********7354-7kp9br0phbsdfkcsilu660u7uq9p6tqs.apps.googleusercontent.com'; var scopes = 'https://www.googleapis.com/auth/gmail.send'; var authorizeButton = document.getElementById('authorize-button'); var signoutButton = document.getElementById('signout-button'); function handleClientLoad() { // Load the API client and auth2 library gapi.load('client:auth2', initClient); } function initClient() { gapi.client.init({ apiKey: apiKey, discoveryDocs: discoveryDocs, clientId: clientId, scope: scopes }).then(function () { // Listen for sign-in state changes. gapi.auth2.getAuthInstance().isSignedIn.listen(updateSigninStatus); // Handle the initial sign-in state. updateSigninStatus(gapi.auth2.getAuthInstance().isSignedIn.get()); authorizeButton.onclick = handleAuthClick; signoutButton.onclick = handleSignoutClick; }); } function updateSigninStatus(isSignedIn) { if (isSignedIn) { authorizeButton.style.display = 'none'; signoutButton.style.display = 'block'; makeApiCall(); } else { authorizeButton.style.display = 'block'; signoutButton.style.display = 'none'; } } function handleAuthClick(event) { gapi.auth2.getAuthInstance().signIn(); } function handleSignoutClick(event) { gapi.auth2.getAuthInstance().signOut(); } // Load the API and make an API call. Display the results function makeApiCall() { const message = "From: lynk@gmail.com\r\n" + "To: nico@hotmail.com\r\n" + "Subject: Subject of this email\r\n\r\n" + "with body text here"; // The body needs to be base64url encoded. const encodedMessage = btoa(message) //but google style, replacing a couple of characters extra const reallyEncodedMessage = encodedMessage.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '') gapi.client.gmail.users.messages.send({ userId: 'me', resource: { raw: reallyEncodedMessage } }).then(function () { console.log("done!")}); } </script> <script async defer src="https://apis.google.com/js/api.js" onload="this.onload=function(){};handleClientLoad()" onreadystatechange="if (this.readyState === 'complete') this.onload()"> </script> </body> </html> 2b) or make an ajax call (post) to https://www.googleapis.com/upload/gmail/v1/users/userId/messages/send and attach a "raw" parameter in the request body with the base64 encoded email as above. I'll "Smart" both of these up a bit when time permits
  22. 3 points
    DavidRM

    ShowModal and Measuring Text

    In the ShowModal, the "init" callback is called before FormActivated is called. Thus, my calling UpdateUI in the init callback is... premature. By adding an OnActivated event handler to the ShowMessageForm, which calls UpdateUI (removing the call from the init callback), my original code works as expected. -David
  23. 3 points
    lynkfs

    OpenStreetMap component?

    you can use a simple IFrameHtmlElement on a form and set src to something like this W3IFrameHtmlElement1.Src := "//www.openstreetmap.org/export/embed.html?bbox=10.970685482025146%2C49.5968664515866%2C10.98160743713379%2C49.603138573344914&layer=mapnik&marker=49.60000261331038%2C10.976146459579468";
  24. 2 points
    Czar

    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
  25. 2 points
    jarto

    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.
×