Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Everything posted by lynkfs

  1. webrtc I think has come of age, so it's worthwhile exploring I'll be happy to have a look
  2. lynkfs


    I didn't know of this object either until recently. It has been around for a long time and is supported in all browsers. afaik it handles subobjects as well I'll check it out
  3. lynkfs


    the paypal library. That gives credit-card, debit-card and paypal in one go you need to go through a vetting process, but after that easy to include
  4. Edited The other approach is to gain access to the internal j5 functions in a more readable way, as in function createElement(a,b:string): Variant; external 'createElement'; function ellipse(a,b,c,d:integer): Variant; external 'ellipse'; implementation { TForm1 } procedure TForm1.W3Button1Click(Sender: TObject); begin var txt := createElement('p', 'move your mouse over the canvas'); txt.position(50, 70); W3DivHtmlElement1.onMouseMove := procedure(Sender: TObject; Shift: TShiftState; X: Integer; Y: Integer) begin ellipse(X,Y,80,80); end; which eliminates the asm blo
  5. Demo1 and Demo2 P5.js : There are different ways of doing this - mapping all p5.js functions and variables to pascal so they can be accessed from Smart by name - take a bit of a shortcut The latter approach looks like this : - let P5 construct its canvas. This requires a minimum sketch.js file with its setup and draw functions. (The draw function can be empty. See project zipfile demo1) - copy the constructed canvas to a Smart component (W3Panel); - use p5 functions in code Demo1 uses this approach, Demo2 is a copy of one of the p5 examples Both projects in
  6. lynkfs


    I recently came across the javascript proxy object A proxy object basically monitors a chosen object, and has getter and setter functions which are invoked when the value of any of its properties changes (set) or are being accessed (get). In that respect there are some similarities with the mutationobserver object. In the below code snippet a regular EditBox has its text saved in a proxied object, which triggers the setter function and a Button which reads that value and thus triggers the getter function procedure TForm1.InitializeForm; begin inherited; // this is a go
  7. lynkfs


    I usually don't publish commercial apps on the forum. Here is the exception : a retail shopping experience - made with Smart
  8. Suggestion can the default viewport meta tag in the generated index.html file be changed from <meta name="viewport" content="width=device-width, maximum-scale=1.0, initial-scale=1.0, user-scalable=no"/> into <meta name="viewport" content="width=device-width, maximum-scale=2, initial-scale=1, user-scalable=yes"/> This allows to pinch & zoom images etc on mobile by default
  9. The MP4 codecs are only license free in browsers (as long as users don't have to pay for the audio or video). In any other application the use of the most widely used MP4 codecs requires a commercial license. Looks like that is the reason for the exclusion of mp4 in CEF4 It should be possible to write-your-own MP4 codec. There are a couple of interesting posts on the subject (post 1, post 2) and there is a rudimentary codec structure in the rtl (system.codec.) However not in the complexity of what mp4 requires Google has produced its own license free product : 'webm' This is us
  10. I can't seem to be able to play video in the embedded browser The test-code below works fine in any standalone browser, but not in the ide // video var video1 : variant := new JObject; video1 := browserapi.document.createElement('video'); self.handle.appendChild(video1); video1.outerHTML := #' <video class="div" src="video1.mp4" muted="true" playsinline="true" preload="auto" poster="" autoplay="" loop="true" width="' + InttoStr(self.width) + '"></video>'; There is link here which refers to disabled codecs in CEF4, would that be the cause ? It
  11. lynkfs

    responsive grid

    I believe so. The grid is a bit more versatile in that it covers 2 dimensions, where flex is basically one-dimensional. Moot point if using flex works fine
  12. Composing a Radiogroup in the designer works fine For objects created in code however the add function doesn't work //creating in code var RadioGroup1 : TW3RadioGroup := TW3RadioGroup.Create(self); RadioGroup1.setbounds (200,200,200,200); RadioGroup1.Add('bbb'); <==== no results //created in the designer W3RadioGroup1.Add('aaaa'); <==== correct results (probably to do with the difference between TStringlist and TStrArray)
  13. lynkfs

    responsive grid

    This post is about using the css-grid for responsive content. It happens often that the contents of a container need to re-arrange itself depending on the size (width) of the container, as in Using a css-grid for that purpose, the code is pretty minimal at just 5 lines : //container (w3panel) cards.handle.style.display := 'grid'; cards.handle.style['grid-template-columns'] := 'repeat(auto-fill, minmax(180px, 1fr))'; //set minmax to just a bit bigger than the card-width cards.handle.style['grid-gap'] := '50px'; cards.handle.style['justify-items'] := 'center
  14. I'm sharing some links below to app-demo's, based on design templates. I'm a big fan of these types of templates as they provide essential design guidance on navigation, styling and the use of animation. And since I'm not a graphic designer, that all helps tremendously. The demo's below are recreated in Smart, using elements of the 'famous' design templates (https://famous.co) Retail shop demo couple of slides of a business presentation demo's optimised for laptop only (also the background video's on the first forms may take a couple of seconds to load) On t
  15. I mostly agree. I suppose that on rare occasions one might want to do something when tw3display or displayview gets the focus, like in Display.OnGotFocus := procedure(sender:tobject) begin writeln('focus'); display.handle.style['background-color'] := 'white' end; see the zen-sky demo where display is a visible element Very rare I think, and even then the tabindex shouldn't be 1 but rather 0
  16. The edge sense controller works, but has some caveats. For one, it does not display the edge cursors for elements with a scrollbar
  17. note : I'm not an expert in css, but I did notice that the first div child of the checkbox has a display="inline-block" as an attribute of that element. I think that should be a property of the style (style ="display:flex;width ... etc) Also I think the answer is to change the box layout system for these components from block to flex (or grid) original : <div class="lbxcontent lbxcontent_v_center lbxdisableBreak lbxcontent_h_center" display="inline-block" style="width: 100%;"> <input type="checkbox" display="inline-block" style="width: 16px; height: 16px; position: rel
  18. lynkfs


    just for reference : I'm using the SmartCL.Controller.Swipe controller to enable swiping I noticed that on Android phones I need to change the default parameters to something like constructor TW3SwipeController.Create(const AOwner:TW3TagObj); begin inherited Create(AOwner); FHRange:=TW3SwipeRange.Create(20,90); // [min]---X---[max] //20-40 FVRange:=TW3SwipeRange.Create(20,90); // [min]---Y---[max] //20-40 Latency := 55; //35 Options := []; //[coStrictTarget]; end; otherwise it wouldn't detect a swipe reliably
  19. I'm working on a project which has 2 (inter)faces : one where the user is in a design phase, and one where the end-result is being displayed The idea is that there will be users in the role as designer, and other users which will be just using the end result. These other users should not even be aware of the design environment I'm looking for the best way to distinguish between these 2 states. In principle this could be solved by dividing the project into 2 separate projects letting the user switch between these environments at will (like selecting a menu item, maybe
  20. opacity settings of TW3Panel (and probably of the other visual controls as well) are not rendered correctly The css opacity style is a float between 0 and 1, current designer expects an integer between 0 and 255
  21. or ping the socket server let's ask @jarto
  22. I suppose we could check the browsers url object. If it is something like '' it might be the internal ide browser Must be a better way
  23. What would be the best code to see if a project runs in the IDE-browser or whether it runs natively in any other browser ?
  24. there is also the system.db.pas unit, which provides some db and sql based references
  25. They must have some sort of an sql parser. Some links : Commercial vcl (delphi tokyo) parser : http://sqlparser.com/download.php http://sqlparser.com/dlaction.php?fid=gspdxe10_2_tokyo_trial&ftitle=General%20SQL%20Parser%20VCL%20for%20delphi%20XE10.2%20tokyo%20trial%20version and some really old ones https://torry.net/quicksearchd.php?String=sql+parser&Title=Yes http://www.felix-colibri.com/papers/db/sql_parser/sql_parser.html to write a complete sql parser from scratch might be a big job
  • Create New...