Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Reputation Activity

  1. Like
    Czar reacted to lynkfs in alignment   
    Since the ide is getting some pretty good improvements, I would like to make the following suggestion :
    it would be nice if it would be possible to align components in the designer similar to ms-powerpoint :
    select 2 or more components and align them vertically or horizontally,
    something like

  2. Like
    Czar reacted to jarto in css styling   
    Well, I've been thinking about how to support this as it'd be great to be able to use standard stylesheets from other frameworks. That way we could have access to a lot of ready made stylesheets. The one I had a look at earlier was Bulma.
    At the moment we do have background- and borderstyles like for example bsContainerBackground or btFlatBorder. What I'd like to test is to add a number of new styles and then create a mapping layer between them and the other frameworks. For example:
    Add a background like bsErrorBackground When a Bulma stylesheet is used, and bsErrorBackground is set, the mapping layer would translate that to Bulma's style: "is-problem" In the same way, bsContainerBackground could be translated to Bulma's "box" style etc.
  3. Like
    Czar reacted to jarto in Smart Mobile Studio 3.9.1 (1st Alpha release) is available   
    2nd Alpha release of the upcoming version 4.0 is now available. You can install it with SmartUpdate from the ALPHA-channel. If you have installed the first alpha release, you can simply run SmartUpdate in the same folder.
    If a component is added by just clicking, it's created at 96x32 size Prevent deletion of form IDE:
    Disable adding of units to uses-section when a form is opened Required units will still be added when a component is added to the form Add a message if the IDE's internal server can not start Bug fix to sorting of forum posts on the Welcome Page Small bug fix to Switch Comment
  4. Like
    Czar reacted to jarto in Smart Mobile Studio 3.9.1 (1st Alpha release) is available   
    We are proud to release Smart Mobile Studio 3.9.1. This is the first Alpha release of the upcoming Smart Mobile Studio 4.0. The biggest improvement is the new WYSIWYG Designer, which takes developing visual applications in SMS to a new level. The compiler was updated with a new version of DWS (Delphi Web Script) and the IDE uses an updated Chromium component. On top of this, there are new components and improvements to the RTL.......
    Please read the release notes here:
  5. Like
    Czar reacted to jarto in Smart Mobile Studio 3.9.1 (1st Alpha release) is available   
    Huge thanks in developing this version also go to Christian Budde, who is one of the original developers of Smart Mobile Studio. Christian helped with updating the DWS and the embedded Chromium component.
  6. Like
    Czar reacted to IElite in New Visual Designer for Smart Mobile Studio   
    Congrats on the new Baby and the new release!
  7. Like
    Czar reacted to jarto in New Visual Designer for Smart Mobile Studio   
    Well, my wife won the release competition earlier this week, but now the Alpha is also delivered. It's available with SmartUpdate in the ALPHA-channel.
  8. Like
    Czar got a reaction from jarto in New Visual Designer for Smart Mobile Studio   
    Better get it out before third born arrives otherwise we will be waiting a while
  9. Confused
    Czar reacted to IElite in New Visual Designer for Smart Mobile Studio   
    If it is his third, he should be use to the schedule by now
  10. Like
    Czar got a reaction from IElite in New Visual Designer for Smart Mobile Studio   
    Better get it out before third born arrives otherwise we will be waiting a while
  11. Haha
    Czar reacted to jarto in New Visual Designer for Smart Mobile Studio   
    If everything goes according to plans, before Christmas. I can't tell you a fixed date as there is a little competition going on about which will be released first: The Alpha or my 3rd child ūüėÄ
  12. Like
    Czar reacted to jarto in New Visual Designer for Smart Mobile Studio   
    This week has been a bit slow as I've been sick. However, here's a little pic of the Menu Designer

  13. Like
    Czar reacted to IElite in License Serial Number invalid   
    Even though I was just charged a couple of days ago for renewal......I get a "License Serial Number Invalid"
    Seems like this happens every year, yet no one seems to fix this issue
    If I run the non-devloper version, it tells me license expired on 11/18 and won't let the program run

    I have said this in the past, just because we don't renew doesn't mean the program should stop working. Should just not be able to get updates.
  14. Like
    Czar reacted to jarto in New Visual Designer for Smart Mobile Studio   
    Things are looking good. Today I finished fixing timing-related bugs in the IDE. Those were a bit tricky as creating and freeing Embedded Chrome in Delphi is not the simplest thing in the world.
    The rest of the day went deep inside the RTL. There were some timing issues with TW3CheckBox. If it's Resize was done while the parent was not visible, the resize went south. I ended up solving that by creating a new version of TW3CheckBox, which uses only CSS for resizing. It made the control a lot simpler, faster and bullet proof.
    My work list is getting seriously short now, which means that the Alpha-version is really close.
  15. Like
    Czar reacted to jarto in New Visual Designer for Smart Mobile Studio   
    Well, I found a better solution: There will be two new properties that relate to the Anchors:
    AnchorGapRight AnchorGapBottom These are calculated and set by the Designer when Anchors are set. They represent the distance from bottom right corner of the component to the parent's bottom right corner. This is used by the RTL to resize the child component properly when Anchors are used.
    The great thing is that this makes handling Anchors a lot more simple and elegant. It will also work even if the form size happens to change while the form is being built.
  16. Like
    Czar reacted to warleyalex in KaTex   
    //------ typescript definition -------
    /** Documentation: https://katex.org/docs/options.html */
    export interface KatexOptions {
         * If `true`, math will be rendered in display mode
         * (math in display style and center math on page)
         * If `false`, math will be rendered in inline mode
         * @default false
        displayMode?: boolean;
         * If `true`, KaTeX will throw a `ParseError` when
         * it encounters an unsupported command or invalid LaTex
         * If `false`, KaTeX will render unsupported commands as
         * text, and render invalid LaTeX as its source code with
         * hover text giving the error, in color given by errorColor
         * @default true
        throwOnError?: boolean;
         * A Color string given in format `#XXX` or `#XXXXXX`
        errorColor?: string;
         * A collection of custom macros.
         * See `src/macros.js` for its usage
        macros?: any;
         * If `true`, `\color` will work like LaTeX's `\textcolor`
         * and takes 2 arguments
         * If `false`, `\color` will work like LaTeX's `\color`
         * and takes 1 argument
         * In both cases, `\textcolor` works as in LaTeX
         * @default false
        colorIsTextColor?: boolean;
         * All user-specified sizes will be caped to `maxSize` ems
         * If set to Infinity, users can make elements and space
         * arbitrarily large
         * @default Infinity
        maxSize?: number;
         * Limit the number of macro expansions to specified number
         * If set to `Infinity`, marco expander will try to fully expand
         * as in LaTex
         * @default 1000
        maxExpand?: number;
         * Allowed protocols in `\href`
         * Use `_relative` to allow relative urls
         * Use `*` to allow all protocols
        allowedProtocols?: string[];
         * If `false` or `"ignore"`, allow features that make
         * writing in LaTex convenient but not supported by LaTex
         * If `true` or `"error"`, throw an error for such transgressions
         * If `"warn"`, warn about behavior via `console.warn`
         * @default "warn"
        strict?: boolean | string | Function;
    export class ParseError implements Error {
        constructor(message: string, lexer: any, position: number);
        name: string;
        message: string;
        position: number;
     * Renders a TeX expression into the specified DOM element
     * @param tex A TeX expression
     * @param element The DOM element to render into
     * @param options KaTeX options
    export function render(tex: string, element: HTMLElement, options?: KatexOptions): void;
     * Renders a TeX expression into an HTML string
     * @param tex A TeX expression
     * @param options KaTeX options
    export function renderToString(tex: string, options?: KatexOptions): string;
    // ====>- pascal external class definition  <====
    unit katex;
      System.Types, W3C.HTML5, W3C.DOM;
      TJSKatexOptions = class external 'Object'
        displayMode: Boolean; // nullable
        throwOnError: Boolean; // nullable
        errorColor: String; // nullable
        macros: Variant; // nullable
        colorIsTextColor: Boolean; // nullable
        maxSize: Float; // nullable
        maxExpand: Float; // nullable
        allowedProtocols: TStrArray; // nullable
        &strict: Variant; {Boolean or String or JFunction} // nullable
      TJSKatex = class external 'katex'
        class procedure render(tex: String; element: JHTMLElement); overload; external 'render';
        class procedure render(tex: String; element: JHTMLElement; options: TJSKatexOptions); overload; external 'render';
        class function renderToString(tex: String): String; overload; external 'renderToString';
        class function renderToString(tex: String; options: TJSKatexOptions): String; overload;external 'renderToString';
      TJSParseError = class external 'katex.ParseError'
        constructor Create(const msg: String; lexer: Variant; position: Float);
        name: String;
        &message: String;
        position: Float;
  17. Like
    Czar reacted to jarto in SMS and the Ionic Framework   
    Hi Thomas,
    Thank you for an interesting idea. At the moment we are working on the new Visual Designer. Once it's finished, it's way easier to create beautiful and functional PWA apps without having to create all by code. So, the plan is:
    Finish the Designer and have it support all current Visual components. (90% ready) Add non-visual components to the component palette Release a version Once we have that out, we'll be able to plan our next steps.
  18. Like
    Czar reacted to jarto in New Visual Designer for Smart Mobile Studio   
    Time to make a small update. I've now been working on small but tricky issues that are related to Anchors and Align. It all started from the fact that Smart Mobile Studio has not saved the form size anywhere and hence, it hasn't sent any form size in the compiled application either. That's been handled by the RTL, which has set the form size based on device/browser size.
    However, that also means that you can not handle Anchors inside an aligned panel right.
    I've decided to fix this all by actually introducing form size in the designer as well. So you can set the form to for example iPhone vertical and design the form based on that. When the app then starts, it will build the form using this "design form size" and resize it then later according to the device/browser window size.
  19. Like
    Czar reacted to lynkfs in KaTex   
    and this works too
      var html : variant;   asm   @html = katex.renderToString("c = \\pm\\sqrt{a^3 + b^3}", {     throwOnError: false });   end;   W3Panel1.InnerHTML := html;  
  20. Like
    Czar reacted to lynkfs in KaTex   
    A quick solution :
    have a form with a panel and a button
    in the custom template add these lines
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.css" integrity="sha384-bsHo4/LA+lkZv61JspMDQB9QP1TtO4IgOf2yYS+J6VdAYLVyx1c3XKcsHh0Vy8Ws" crossorigin="anonymous"> <script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.js" integrity="sha384-4z8mjH4yIpuK9dIQGR1JwbrfYsStrNK6MP+2Enhue4eyo0XlBDXOIPc8b6ZU0ajz" crossorigin="anonymous"></script>  
    in the onclick handler of the button add this code
    procedure TForm1.W3Button1Click(Sender: TObject); begin   var katexelement : variant;   katexelement := W3Panel1.handle;   asm   katex.render("c = \\pm\\sqrt{a^2 + b^2}", @katexelement, {     throwOnError: false   });   end; end;  
    which results in this :

    This code can be improved a bit.
    F.i. I like to load the js library under program control, so at least you know when it is ready
  21. Like
    Czar reacted to jarto in New Visual Designer for Smart Mobile Studio   
    Time for my (almost) daily update on how the work with the new Designer is progressing. Today I started changing TW3TabControl, so I could use it in the Designer. New tabs can be added by selecting "New tab" in Designer's popup-menu. Then you can change properties in the Property Inspector and add child components into the tabs. This was one of my original big goals with the new designer and I'm really happy to see it become reality ūüôā

  22. Like
    Czar reacted to jarto in New Visual Designer for Smart Mobile Studio   
    Yes, that was very frustrating in the old designer. The development-channel already contains a version that supports custom properties, but they are not that nice to use as you can't see the result in the designer. In the new one you can just change any property and see what visual changes it makes.
    Got Undo&redo ready today. Also found a nice solution for the non-visual components. Basically, I just create virtual properties for those if the class itself does not have them. As they are virtual, I get to ignore them when I produce the Form impl-code (the code that creates the controls and sets the properties and events)
  23. Like
    Czar reacted to jarto in New Visual Designer for Smart Mobile Studio   
    Still going strong!
    Today and yesterday I finished cut/copy/paste. It uses the system clipboard, so copy/paste between two running IDEs is now also possible. Also registered TW3Timer in the Component Palette and made sure that non-visual components are properly supported. There's s little issue about how to show these best in the designer as non-visual components don't have Left- and Top-properties. I could automatically stack them or then try to hack some support for pseudo coordinates.
    Undo is next.
  24. Like
    Czar reacted to jarto in New Visual Designer for Smart Mobile Studio   
    You know the feeling when everything makes sense and everything is easy and you get a lot done? That's where I've been today.
    I cleaned up the IDE code and removed the old designer and the live preview-code, which never worked. Then Snap to grid and export to code and XML. The old designer's popup menu had many functions, but apparently half of them were never finished. So, while there is an undo there, it never worked. Same thing with aligns.
    Now I'm working on cut/copy/paste. While testing, I noticed that the old designer does not check for duplicate names, if you paste a component with child components. Also, you can't paste into another child component, like another panel. Weird thing is also, that the clipboard is cleaned after every paste. And even weirder is, that the old IDE is not using a global clipboard. Wonder why?
    So I ended up fixing those bugs in the old designer, as I get to use most of the underlying functionality with the new designer as well. Also wrote a static TW3URL-class for nice handling of url parameters.
    Life is so good in the zone ūüôā
  25. Like
    Czar reacted to jarto in New Visual Designer for Smart Mobile Studio   
    Let me also write about the progress I'm making with the designer. I got it running inside embedded Chrome in the IDE last night. I'm very excited with everything you can do with this new designer and what it lets us do in the future.
    Let's start with a small geeky detail. Look at those dots in the form. They are the standard 8px grid that Delphi and Lazarus also have. Two for-loops plotting dots on an html5-canvas? No, no, no, this is made with pure CSS and you can use this same code in your own apps as well:
    DesignerForm.Handle.style['background'] := 'linear-gradient(90deg, #EFEBE7 7px, transparent 1%), linear-gradient(#EFEBE7 7px, transparent 1%), #000000'; DesignerForm.Handle.style['background-size'] := '8px 8px'; DesignerForm.Handle.style['background-position'] := '1px 1px'; What is lovely is that you can see what every property does. Like you can see in the image above, I changed the ThemeBorder for the label to flat. So, you can change the theme border and background for every control and see what it looks like. Set AlphaBlend to True and adjust Opacity and you'll see the result. All the other properties are also supported: Color, Angle, BorderRadius, you name it. And it's really cool that you can change functional properties and see what the control did. Fill in the Items of a ListBox and you can see how they are drawn.
    This one will also unlock the secrets of TW3EditBox. Look at the picture below. The slider down there is just a TW3EditBox with itRange as InputType. The panel with the angle has three sub panels and are using Align-properties to position themselves. Inside the middle panel is a TW3ListBox where the background Opacity is adjusted. Hence, you see the blue color from the background getting through. If the background had been an image, you'd see it as well.
    I've been testing and drawing forms for a while now and it's really great fun. I hope I can get this finished soon so I can share the fun with you guys too.

  • Create New...