Jump to content

Igor Savkic

Members
  • Content count

    195
  • Joined

  • Last visited

  • Days Won

    15

Igor Savkic last won the day on December 29 2017

Igor Savkic had the most liked content!

About Igor Savkic

  • Rank

Profile Information

Business

Smart Mobile Studio

  • Edition
    Professional

Recent Profile Visitors

89 profile views
  1. Save Content Dialog

    I don't know about displaying File Save dialog but you can create a hidden a (nchor) element and use it to download file. Take a look at here, it's nicely explained: https://jonlennartaasenden.wordpress.com/2017/01/20/smart-pascal-download-streams/
  2. back(s)lash

    > stringifying this (asm @textdata = JSON.stringify(@data); where @data refers to JA) gives what I was after. > Except that all fieldnames in the result-string have a '$1' appended ({"field1$1"). No idea why that happens or how to avoid that. I would bet on obfuscation mechanism, try declaring all your fields with property: JB = record property field1: string; property params: Array of JC; end;
  3. sqLite's TSQLiteResult Values

    fListBox.Add(fData.values$1); //doesn't work Try in asm, it's allowed to use such property names like: asm @Temp = @fData.values$1; FListBox.Add(ReadItem(Temp));
  4. sqLite's TSQLiteResult Values

    > that gives me the same result > [{"values$1":["WS0202","Maintenance","jdoe"]}] > I need to be able to get the individual data, WS0202, Maintenance, jdoe OK, so you first have array where elements are objects that have string array called "values$1". Try something like: var v: Variant; i: Integer; procedure ReadItem(const AValue: Variant); var i: Integer; begin for i := 0 to AValue.length - 1 do WriteLn(AValue[i]); end; begin v := JSON.Parse('[{"values$1":["WS0202","Maintenance","jdoe"]}]'); for i := 0 to v.length - 1 do ReadItem(v[i].values$1); end;
  5. sqLite's TSQLiteResult Values

    > writeln(JSON.Stringify(sqlResult.Values)); > Syntax Error: Argument 0 expects type "Variant" instead of "array of record TSQLiteRowValues" [line: 98, column: 30, file: frmMain] Try casting to Variant like: writeln(JSON.Stringify(Variant(sqlResult.Values))); or otherwise use asm to assign sqlResult.Values to some Variant variable, something like: asm @Temp = @sqlResult.Values; end; > writeln(JSON.Stringify(sqlResult.Values[0])); > gives me the json structure, but how do i get to the individual data values It's easy if you know structure, how does it look like? On unrelated note, is there any way to control formatting in this forum editor, my reply really looks bad but I don't see a way to change a simple thing.
  6. sqLite's TSQLiteResult Values

    Try to see what JS structure it really has, for example WriteLn(JSON.Stringify(sqlResult.Values)); WriteLn(JSON.Stringify(sqlResult.Values[0]));
  7. sqLite's TSQLiteResult Values

  8. IDE Component Issue ?

    > Is anyone else experiencing an issue with the default sizing of components when placed on a form consecutively? I think I've seen it too in old SMS couple of times, my guess is that during drag drop, SMS treats pressed mouse as request to resize control and depending on how you drop it and move mouse it shrinks.
  9. problem, maybe...

    > In the current ALPHA, you are also able to define custom "width"/"height" values for > TApplication.ShowDialog calls. Also consider adding AutoSized dialog. In most cases one would change default width/height when text that's showing is too big so he'll use GetTextWidth/Height to get true size and adjust dialog size accordingly.
  10. onkeyup-down

    > Yes, i've used OnKeyDown on mainform. but calling setfocus in InitializeForm gives no result. Are you using new alpha? If so, perhaps you need to flag that you intend to listen for keys, I know it's mandatory for custom controls to add cfKeyCapture to CreationFlags, but I'm not sure about added forms and controls on it, check. Alternative is of course to just use MYForm.Handle.addEventListener and make a classic JS event.
  11. The Grid - 6 ways to skin a cat

    Thanks for this, I never heard before of web components and it's canvas grid. During last RTL provided grid was unusable and since I needed a grid capable of showing hundreds of items, I've ended up writing one based on HTMLTableElement which was fast but hard to control (columns, scrolling). I would be very curios to know how all these grids (together with new SMS grid) behaves in large dataset (10+ columns with thousands of records).
  12. Floating modeless forms

    > Taking my first serious look at SMS and investigating if it's possible to > create floating modeless forms to produce an MDI-style interface. I can see that the > default form doesn't have a border, title bar etc - is there any sample > code around demonstrating a more Delphi-like form? Perhaps Smart Desktop Demo is good starting point, take a look at http://quartexhq.myasustor.com/for demo https://bitbucket.org/hexmonks/clientfor ReadMe and code and https://jonlennartaasenden.wordpress.com/?s=smart+desktopfor documentation
  13. Smart 2.9.9 [alpha] is here!

    Thanks for clarification. What happens if I'm listening on two different events in child and parent, OnClick in child and OnMouseDown in parent. Will I only get OnClick for child or both?
  14. Smart 2.9.9 [alpha] is here!

    > There's also a post about the new EventManager: I suggest to add this to help itself or SMS website. Few questions about it: 1) To use EventManager is it enough to just include SmartCL.EventManager or we actually need to create one EventManager per form? 2a) What if I want to handle same event on several places, on label, then on panel etc? It's easy to do so in JS, but from your article on Facebook group it seems that propagating same event to parent control will not work, it would stop at label since it has "touch or movement related events on the control. For example: OnClick or OnMouseDown". 2b) Article also suggest it would stop at first label if it has any kind of related event (Click for example). What if I want to handle onMouseUp in parent and OnClick in label (two different events)?
  15. Scrolling with Components inside Panel Alpha vs Old RTL

    > Hi, i've run a test program under each RTL with chrome mobile dev > tools(Ctrl-Shift-I) and it seems tw3buttons under the new alpha > ignore the scrolling functionality of a panel they belong too. What do you mean, I've tried both links and aside styling differences I don't see anything else, scrolling behaves the same (latest Chrome).
×