Jump to content

jarto

Administrators
  • Content Count

    537
  • Joined

  • Last visited

  • Days Won

    85

jarto last won the day on May 8

jarto had the most liked content!

About jarto

  • Rank

  • Birthday 02/11/1970

Profile Information

  • Gender
    Male
  • Location
    Dubai

Business

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

Smart Mobile Studio

  • Edition
    Enterprise

Recent Profile Visitors

605 profile views
  1. jarto

    Radiogroup - change items text

    With the current designer, having the items as a TStrArray is the only way we can define items at design time.
  2. jarto

    window component

    Cool, you found the new events like OnAllMovement. That makes the code a lot easier. The jitteryness may come from MoveTo. Forgot one thing: You need to call Ctrl.SetCapture when MouseDown happens and Ctrl.ReleaseCapture during MouseUp.
  3. jarto

    window component

    @warleyalex Yeah, well, the problem you experience is because the current Object Inspector lacks features. We're in the process of replacing it with a better component, which should let you edit more properties. For example sets. The Object Inspector also needs a lot of work. The current design was based on the idea that we'd get the Chromium to render us a live preview that we could use to make the controls look realistic. However, there was some changes in Chromium that broke that feature. So we're currently thinking about what'd be the best way to proceed. Basically: Should we try to improve the current one or replace it with something better.
  4. jarto

    window component

    Something like this: var saveX, saveY: Integer; Header.OnMouseDown:=procedure(Sender: TObject; Button: TMouseButton; shiftState: TShiftState; x, y: integer) begin var Ctrl:=TW3CustomControl(Sender); Ctrl.Cursor:=crMove; saveX:=x; saveY:=y; end; Header.OnMouseMove:=procedure(Sender: TObject; ShiftState: TShiftState; x, y: integer) begin var Ctrl:=TW3CustomControl(Sender); if Ctrl.Cursor=crMove then begin Ctrl.MoveTo(Ctrl.Left-(saveX-x),Ctrl.Top-(saveY-y)); PrevSize:=Ctrl.BoundsRect; saveX:=x; saveY:=y; end; end; Header.OnMouseUp:=procedure(Sender: TObject; Button: TMouseButton; shiftState: TShiftState; x, y: integer) begin var Ctrl:=TW3CustomControl(Sender); Ctrl.Cursor:=crDefault; end;
  5. jarto

    window component

    Did you change to use the normal events? Because the situation I mentioned above does still happen when you drag the window.
  6. I also tried to find out which DWS version we use but the source tree does not tell it. @gabr42 may know more as we've not updated DWScript since I joined the project.
  7. jarto

    window component

    @lynkfs SetCapture/ReleaseCapture takes care of those dragging problems that @Czar mentioned. Edit: However, to be able to use SetCapture and ReleaseCapture, you need to listen to MouseDown, MouseUp and MouseMove using the normal Delphi-like events instead of using the raw JS events. Edit2: When you use normal events, the EventManager takes care of a boatload of the complexity. For example, SetCapture locks on to the control meaning that all move events go that one. (See the Scrollbars code in the RTL as an example) The EventManager also notices situations where you click on control to drag it, move the mouse outside of the whole browser window and release the button there. If you try to listen to events through JS, these kinds of special situations are a pain to handle correctly.
  8. We are using the Development version 2.3 with custom bug fixes to the date handling routines. They fix the time zone related problems mentioned here: I don't exactly know when the latest DWS was cloned, but we've used the same version (besides those fixes) for at least 2 years.
  9. jarto

    RoadMap 2019

    @IElite What you're asking for depends a lot on the design of your app and the server api. If you write both, then you yourself get to design how the server and the mobile app talk to each other. A1. Your app makes a https get to your server to retrieve the latest JSON data. To see an example, have a look at how the StringGrid demo reads a local file. The difference between reading data from local or a remote address depends only on the url used. To make this very smooth, you can do this: App starts Make the https get to the remote server Make a call with TW3Dispatch with a 2 second delay to read the local json When you start receiving data from the remote server, cancel the local read (set a boolean or something) Which ever get-command received data, update the GUI based on the data A2. Requesting a value from the server is a simple GET to your server software. You decide what the parameters are that the server needs to identify what data you're requesting. Modifying is a POST command. Again, you decide the parameters. Make sure to verify the parameters so that you're not creating a security hole. B. I'd do this so that your server app is the only one that talks to the database. You just create a simple API for the discussion between your mobile app and the server. So in the end it's basically just your mobile app doing get- and post-calls.
  10. jarto

    Development updates

    New update available in the development-channel: Themes: New background for highlighting errors: bsErrorBackground TW3StringGrid: New event for setting custom row borders and backgrounds: OnDrawGridLineTheme
  11. jarto

    TW3StringGrid is available

    A new event was added: OnDrawGridLineTheme This event can be used to set custom backgrounds and borders for a row. For example, set background to bsErrorBackground for lines that should be highlighted to the user. Example: procedure TForm1.W3StringGrid1DrawGridLineTheme(const Sender: TObject; const Row: Integer; var BackgroundTheme: TW3ThemeBackground; var BorderTheme: TW3ThemeBorder); begin if Row=3 then BackgroundTheme := bsErrorBackground; end; Notice, that the Row is the data row. So it corresponds to the line in your data and NOT the physical line, as the physical line depends on how the grid is sorted. The update is available in the development-channel.
  12. jarto

    TW3StringGrid is available

    I'll have a look at this.
  13. jarto

    UI layout

    The development-channel contains a new update that adds Align and Anchor-support in the RTL. We still have some work to do to get the Visual Designer and Object Inspector to support these properly. While we work on that, you can still use these by setting anchors in code. Align can actually be set in the Object Inspector, but do note that setting the alignment does not make any visual changes in the Visual Designer. I'm going to be travelling for a bit more than a week.. During that time I'll be able to participate in this forum but can't make any changes or bug fixes. If you happen to find situations when Anchors and Align does not work properly, please post examples. I'll be happy to have a look when I return from my trip.
  14. jarto

    Development updates

    New update available in the development-channel: Anchors and Align-support to the RTL. Bug fix to BoundsRect Please note that anchors can only be set in code at the moment. The next step is to add support for setting the anchors and align in the IDE's designer as well. Currently Align actually can be set in the Object Inspector, but the designer does not show the result by aligning components.
  15. As you all know, almost all classes in Smart Mobile Studio are named TW3Something. For example: TW3Button, TW3Panel etc. The decision to do that was done during the first stages of development of Smart Mobile Studio. However, there's no technical reason why the "W3" has to be there. So basically, we could rename all the components and classes to be more compatible with Delphi and making code sharing and porting easier. I wrote a program yesterday evening that analyzed and renamed all the classes and records that start with TW3 in the RTL. There are 849 of them to be precise. The app also renamed themes and the IDE code, so that I was able to compile a new IDE and make my first app with TForm and TButton etc. It all worked nicely, except that the chart component is causing a bit of trouble. It's using TPanel and a couple of other classes that would cause conflicts. I'd be able to add remapping functions to the IDE so that you could load an old project and all the TW3Whatever-classes would be converted to TWhatever. But if you have your own components using names like TPanel, TButton, TList, TStringList, they would cause trouble. Question is: Do you have them and how much of code like this do you have? Any thoughts?
×