Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


jarto last won the day on October 16

jarto had the most liked content!

About jarto

  • Rank

  • Birthday 02/11/1970

Profile Information

  • Gender
  • Location


  • Company name
    The Smart Company AS
  • Sector
    Information technology
  • Position
    Development Manager

Smart Mobile Studio

  • Edition

Recent Profile Visitors

1,069 profile views
  1. @lynkfs Oh, that helped so much! I've struggled at the concept of calling these external js apis when class references don't exists and also had no experience with using promises. But you helped me get going and now I'm making very good progress 🙂 Now I have TW3FacebookLogin- and TW3GoogleLogin-classes that both work. I'll have to read up a bit to add the necessary parameters (besides ClientId of the app), but I should be able to get them into alpha and component palette next week.
  2. @lynkfs It doesn't seem to use the platform api.
  3. @JimKueneman No, I haven't changed anything in WebSockets code.
  4. Does anyone have a working example of how to use Google's Sign-In api via their platform.js? I can find documentation and js code: https://developers.google.com/identity/sign-in/web/sign-in https://www.intricatecloud.io/2019/07/adding-google-sign-in-to-your-webapp-using-the-js-library/ ...but as I'm not at all used to using promises, I feel there's quite a learning curve here for me. With a working example I could turn it into an easy-to-use component in no time.
  5. Yep, got it working nicely. I'm in the process of writing this into a non-visual component, which can be added to the component palette.
  6. I thought I'd test this. When I try to compile, I get an error in FaceBook.SDK.pas: Syntax Error: Class "JFBUIParams" isn't defined completely [line: 15, column: 35, file: FaceBook.SDK] Edit: Got the SDK to compile by changing into this: JFBUIParams = class external end;
  7. A new update is available: IDE: When a property is changed, the IDE adds the required unit into uses clauses. RTL: Bug fix to TRESTCall: Call OnRemove only if it is assigned.
  8. jarto


    Well, that was easy. I was able to get the required unit from DWS, so the IDE adds it dynamically. @lynkfs The 4.0 is the current alpha + some fixes that I have not committed yet. Suggestions are welcome for any other fixes/small improvements. In the situation we are now, I don't want to delay the release too much by taking on something too big.
  9. jarto


    Thank you for having patience with me and the support 🙂 I just took the kids to school. First day since we returned home. Eager to get the new version released. Here's what needs to be done: Waiting for a new signing dongle for the executables. Solve a small problem with having the right units in the uses-clause when we use TW3ScrollBox or a component that is derived from it. This is mainly about the scroll bar type. I either change the IDE or move the definition of TW3ScrollBarType to another unit. First I'll have a look if DWS will give me enough information so that I can dynamically add the right unit in the IDE. I gave this a try half a year ago, but did not manage to do it then. However, it'd be the best solution by far. If that does not work, it'd possible to have an internal list of types and what units they require. It's not elegant, so I'd like to avoid that as far as I can. The other way to solve this is to simply start using SmartCL.Types.pas and move the defintion there. At the moment it's an empty unit, which makes me think that the plan was originally to have them there. This is not a really optimal solution as that unit would need to be added to old projects to get them to compile.
  10. Hi all, as you probably have noticed, I've been very quiet lately. When COVID-19 spread around the world, the restrictions hit my personal life pretty hard. In UAE, all the schools were closed very early and remained closed all the way to the end of the semester. There was also a strict lock down and lots of restrictions. Doing a lock down with three small children and having to home school them basically meant that my chances of spending many hours of time on development went to nil. Luckily it seems like the schools will open in 3 weeks, which should give me a possibility to concentrate on development again. My plan is to get 3.0 out then.
  11. The IDE does not use smsc.exe to compile. However, it uses the same source code for the compiler. AFAIK, you should be able to compile all the complex projects also with the command line compiler. If you have trouble with that, make sure that you are using the right compiler. If you have several versions of SMS installed, it may be that you run an older version of smsc.exe du to it being in your path. If that doesn't help, you can zip the project and e-mail it to me (jt at smartmobilestudio.com) and I'll have a look where the problem is.
  12. Does the error vanish if you open SmartCL.Net.Rest.pas and do these changes on lines 142 and 147: if Assigned(OnRemove) then OnRemove(Self);
  13. jarto

    mouse position

    Thank you. This is one of the really old demos where lots of code is in TForm1.InitializeObject. When that is done, you run the risk of everything not being initialized when your code runs. Standard fix is to move the code to TForm1.InitializeForm: type TForm1 = class(TW3Form) private {$I 'Form1:intf'} FIsCapture: boolean; function MakeMouseEvent(label: TW3Label; name: string): TMouseEvent; function MouseToStr(shift: TShiftState; x, y: integer; scrXY: TPoint): string; protected procedure InitializeForm; override; procedure InitializeObject; override; end; implementation { TForm1} procedure TForm1.InitializeObject; begin inherited; {$I 'Form1:impl'} end; procedure TForm1.InitializeForm; procedure EndCapture; begin W3pnlSetCapture.Visible := true; W3pnlReleaseCapture.Visible := false; W3Panel2.OnMouseUp := nil; FIsCapture := false; end; begin inherited; OnMouseMove := MakeMouseEvent(W3lblFormCoords, 'Form'); W3Panel1.OnMouseMove := MakeMouseEvent(W3lblPanel1Coords, 'Panel1');
  14. I used the method in the example I posted with Phonegap. Does anyone have any idea about doing this with a normal Android browser?
  15. @Huseyin SEKER Here's code that compiles. unit Form1; interface uses System.Types, System.Types.Convert, System.Objects, System.Time, System.IOUtils, System.Device.Storage, W3C.Dom, SmartCL.System, SmartCL.Time, SmartCL.Graphics, SmartCL.Components, SmartCL.FileUtils, SmartCL.Device.Storage, SmartCL.Forms, SmartCL.Fonts, SmartCL.Theme, SmartCL.Borders, SmartCL.Application; type TForm1 = class(TW3Form) private {$I 'Form1:intf'} procedure onBackKeyDown(eventObj: JEvent); procedure onDeviceReady(eventObj: JEvent); protected procedure InitializeForm; override; procedure InitializeObject; override; procedure Resize; override; end; implementation { TForm1 } procedure TForm1.InitializeForm; begin inherited; // this is a good place to initialize components end; procedure TForm1.InitializeObject; begin inherited; {$I 'Form1:impl'} BrowserAPI.document.addEventListener('deviceready', @onDeviceReady, false); end; procedure TForm1.Resize; begin inherited; end; procedure TForm1.onBackKeyDown(eventObj: JEvent); begin //Here do the right thing based on any variable in your app. //Call preventDefault if you do not want your app to close. eventObj.preventDefault(); end; procedure TForm1.onDeviceReady(eventObj: JEvent); begin BrowserAPI.document.addEventListener('backbutton', @onBackKeyDown, false); end; initialization Forms.RegisterForm({$I %FILE%}, TForm1); end.
  • Create New...