Jump to content

jarto

Administrators
  • Content Count

    706
  • Joined

  • Last visited

  • Days Won

    146

jarto last won the day on March 31

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

900 profile views
  1. jarto

    Checkbox Wordwrap

    Yes, both the combo and the radiobutton were changed. The previous ones were a lot more complicated as they used JS for all resizes while the new one uses pure CSS. The new ones are a lot faster and they don't run into problems in case you happen to hide a parent component while any of them are resizing. That's because once the component is not visible any more, ClientWidth, ClientHeight and ClientRect return 0 or even negative values. So if you have a TW3CheckListBox, which is constantly dynamically drawing and hiding lines, it'd be a pain to make it work with the previous versions.
  2. jarto

    Checkbox Wordwrap

    This is a bit more tough problem, than I anticipated. The current TW3CheckBox and TW3RadioButton are based on TW3Label, which does all the aligns and word wraps automatically through CSS. That makes them very fast and light as they don't need any resize code. However, once you add that check mark or radio toggle, it becomes way harder to properly do horizontal alignments and word wraps. I first thought that I just apply the css class to the wrong container (which I do), but that's not (only) the case. So I am able to fix this so that Word Wrap works, but can't get center and right alignments to work no matter what I try.
  3. jarto

    Checkbox Wordwrap

    That property doesn't seem to work. Let me have a quick look. Yep, confirmed. There are issues with other properties as well. On it...
  4. jarto

    Database development

    First picture is from a manually constructed dataset. Second one is from sqlite-database. Doesn't look beautiful, but you can see data-aware versions of TW3Memo, TW3Label and TW3StringGrid. All connected to the same Data source.
  5. jarto

    ide browser sensing

    Login protected is the only safe way to go. If security is not that important in this project, I'd go with the url parameter.
  6. jarto

    opacity settings

    The Opacity-property should be a number between 0 and 100. The RTL changes that to the proper css value. You also need to set AlphaBlend to true. I'll fix the default value.
  7. jarto

    ide browser sensing

    Altering UserAgent is probably the best way to go as otherwise we want to keep the Internal Browser as close to a real browser as possible. @lynkfs may I ask why you need to detect this?
  8. jarto

    Database development

    What I am now using for testing is to read the db-file to memory and accessing it there. After that, the db can be saved to a stream. However, when doing this infrastucture, it has to be versatile enough, so I don't restrict it only to a memory based sql database. It needs to be extendable so, that the sql-queries could just as well be sent to a remote server or a cloud based database.
  9. jarto

    Database development

    Heh, well, this actually looks now a lot easier. Sqllite actually returns the parsed column names in the results. It even works with field aliases: lower(employees.FirstName) as Representative That was correctly returned as Representative
  10. jarto

    Database development

    Reading a bit of Lazarus source, it seems they don't have a full blown sql parser. For example, they don't allow updates if the select is from multiple tables or derived tables. So it's probably a good idea to aim at being able to show a dbgrid from a select-query and try to retrieve and parse the field names. I'd better add a possibility to provide or adjust field names as well. After all, if you use complicated SQL, you do know what your columns are and what you want to view.
  11. jarto

    Database development

    Seems like DBGrid in Lazarus can parse this properly as well: select lower(customers.FirstName) as FirstName,lower(customers.LastName) as LastName, lower(employees.FirstName) as Representative from customers,employees where customers.SupportRepId=employees.EmployeeId; The dataset used is chinook.db from here: https://www.sqlitetutorial.net/sqlite-sample-database/
  12. jarto

    Database development

    @lynkfs Thank you. It's possible to get the table fields with a query in SQLite as well. For example: select sql from sqlite_master where tbl_name="Employee"; That returns: CREATE TABLE [Employee] ( [ID] INTEGER PRIMARY KEY NULL, [Name] TEXT NULL, [Department] text NULL, [Seniority] INTEGER NULL ) So, if the query selects all fields from that table (select * from Employee....), it's quite simple to find the field name. However, when only some fields are selected (select Name, Department from Employee...), I'd need to analyze also, which fields are selected. Problem is, this can get pretty complicated. I have no control over what the sql-query is. There can possibly be joins, functions etc. For example: select Name,lower(Department) from Employee; select Name,lower(Department) as Position from Employee; When I test those, I notice that Lazarus' TDBGrid does add the second column as "lower(Department)" or "Position". So it seems that it analyzes the sql-query itself and creates the fields from there. Makes sense. Then, the next big question is editing data. In a simple "select *" it's easy, but I wonder if the other data aware controls simply prevent editing, when the field name is a function or an alias.
  13. jarto

    Database development

    I've been doing some work to create data aware controls for SMS. I'm aiming to do a versatile solution, where you can access data from a TDataset by using a TDataLink, no matter what the data comes from. So it could be a cvs-table, json, sql query etc. I started by building a TW3DataSet (and fixing some bugs) and writing a simple TW3DataSource and TW3DataLink. Then a data-aware Label, which shows the data properly. It's pretty much the same mechanism as with Delphi and Lazarus. Today I started then adding SQLite. I started by downloading a database file with TW3HttpRequest and loading it from a stream. Again, a few bugs and improvements had to be made, but now it works and I have a nice mechanism for loading any binary data from a file. But now then... Making it possible to read the results of a SQLite query through a dataset.... Here I hit a little road block and don't know how to proceed. It's simple to make a select-query and access that data for results, but what's the best way for me to know what the fields are? Their names and datatypes?
  14. jarto

    Roadmap 2020

    Hi Dean. I strongly suggest that you'd start using the Alpha-branch, which is the upcoming 4.0 -version. It is by far superior to version 3. Not only does it have the new visual designer, but also properly working anchors and align and lots of bug fixes. As you do have an active license, you can easily install it in another folder on your computer without having to remove the current version. As long as you have an active subscription, you can install all the new versions, including version 4. Hence, there's no upgrade prize. Yes, I do agree that documentation is needed. 😔 If you're interested to do contract work, please do send me an e-mail to jt at smartmobilestudio.com introducing yourself. I look forward to hearing from you 🙂
  15. jarto

    open external link in new tab of browser

    I need to have a look at the code completion/code insight. It's been on my bug list for quite some time. Have to see what I can do to that internal browser shutdown issue as well :-)
×