Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


IElite last won the day on December 26 2017

IElite had the most liked content!

About IElite

  • Rank

Contact Methods

  • Website URL

Profile Information

  • Gender
  • Interests
    FreePascal, Delphi, Smart Mobile Studio


  • Company name
    Cold River Labs
  • Sector
    Information technology
  • Position

Smart Mobile Studio

  • Edition

Recent Profile Visitors

3,700 profile views
  1. When is the next contest?

    A repost from Facebook - dated January 9 "Mid february it's time for a Smart competition again! This time the winner recieves the Asus Tinkerboard which is an absolute power-house of a SBC (single board computer). We ourselves use this board for running Smart Mobile Studio via EXAGEAR (x86 emulation for ARM devices), and also as a node.js and Android deployment device. Like our sister group, Delphi Developer, we are printing a special edition white "retro case" for this fantastic little machine (fresh off the mint, they were done printing yesterday at 25 hours each). The lucky winner recieves the following (pre assembled ofcourse): 1 x "Special Edition" White Retro Case 1 x Asus Tinkerboard 1 x 32 Gb Samsung class 10 SD card 1 x Fan to ensure reliable operational temperature 1 x Red light diode power indicator 1 x Smart ready Ubuntu installation (*) Samba is setup and registers on the network as "SmartDevice". PM2 which is the node.js clustering software used to run large Smart Mobile Studio cloud services is also "ready to go". Sftp is likewise there, so you can upload your compiled code as part of your build process (Smart has project options for this). More information about the competition will be released in due time (at least a month from now), but if you have been waiting for a nice competition - now is the chance to create, port or implement something amazing 😎 Looking forward to the submissions. We are lucky to have so many fine developers using Smart!"
  2. Currently, the listbox has events for handling items that have been clicked or selected......but I need a list box item that can be double clicked Would it be possible to add this to the RTL? e.g. TW3ListBox = class(TW3ScrollControl) private FOnItemDblClick: TW3ListBoxItemDataEvent; procedure SetOnItemDblClick(Value: TW3ListBoxItemDataEvent); protected procedure HandleItemDblClick(Sender: TObject); public published property OnItemDblClick: TW3ListBoxItemDataEvent read FOnItemDblClick write SetOnItemDblClick; end; implementation procedure TW3ListBox.HandleItemDblClick(Sender: TObject); begin if not (csDestroying in ComponentState) then begin for var i:=0 to FFilteredItems.Count-1 do begin var Item := TW3ListBoxItemData(FFilteredItems[i]); if Item.ItemObject=Sender then begin if MultiSelect then begin Item.Selected := not Item.Selected; if Item.Selected then FSelectedIndex := Item.Index else FSelectedIndex := -1; end else SelectedIndex := Item.Index; if Assigned(FOnItemDblClick) then FOnItemDblClick(Self, Item); if Assigned(FOnSelected) then FOnSelected(Self, Item.Index); break; end; end; end; end; procedure TW3ListBox.SetOnItemDblClick(Value: TW3ListBoxItemDataEvent); begin FOnItemDblClick := Value; end; procedure TW3ListBox.ShowListItem(Item: TW3ListBoxItemData); begin if Assigned(FOnShowItem) then FOnShowItem(Self,Item) else if Item.ItemObject is TW3Label then TW3Label(Item.ItemObject).Caption:=Item.Caption else TW3CustomControl(Item.ItemObject).InnerText:=Item.Caption; Item.ItemObject.OnClick:=@HandleItemClick; Item.ItemObject.OnDblClick:=@HandleItemDblClick; end; end.
  3. Overriding TW3ListBoxItemData style

    hmmm, how'd i miss that? thanks
  4. Database Examples

    @lennart What is "TW3WebSQLCustomTransaction" I only find "TW3WebSQLTransaction"....however, the GetWriteTransaction method expects a "TW3CustomDbTransaction" which seems to work. Also, is there a reason why you would NOT also put the "checking of database active property" and the "creation of table" in the Application object? e.g. procedure TApplication.ApplicationStarting; var Transaction: TW3CustomDbTransaction; begin //setup database engine FDatabase:=TW3WebSQLDatabase.Create; FDatabase.DBName:={$I 'app:name'}; FDatabase.DBDescription:='Database for ' + {$I 'app:name'}; FDatabase.DBSize:=(1024 * 1024) * 4; // activate database try if not Datastore.Active then Datastore.Active := True; except on e: exception do begin writeln("Failed to activate database: "); writeln(e.message); exit; end; end; // Create our table // Get new write transaction if Datastore.GetWriteTransaction(Transaction) then begin try Transaction.Execute("create table if not exists customers (id integer primary key asc, name string);",[]); finally if Transaction.LastFailed then WriteLn(Transaction.LastError); Transaction.Free; end; end else raise Exception.Create('Failed to create write transaction error'); inherited; end;
  5. Overriding TW3ListBoxItemData style

    @lennart, @jarto Testing the latest update, I am trying to override the TW3ListBoxItemData's "RemoveSelectedStyle" and "SetSelectedStyle" methods. However, I can't seem to get the StyleClass property to work. However, I can do color changes at runtime. procedure TXListBoxItemData.RemoveSelectedStyle; begin //TXListBoxItem(ItemObject).StyleClass:= 'XListBoxItemStyle'; //does not work //TXListBoxItem(ItemObject).Label.StyleClass:= 'XListBoxItemStyle'; //does not work TXListBoxItem(ItemObject).Label.Color:= clWhite; //works TXListBoxItem(ItemObject).Label.Font.Color:= clBlack; //works end; procedure TXListBoxItemData.SetSelectedStyle; begin //TXListBoxItem(ItemObject).StyleClass:= 'XListBoxItemSelectedStyle'; //does not work //TXListBoxItem(ItemObject).Label.StyleClass:= 'XListBoxItemSelectedStyle'; //does not work TXListBoxItem(ItemObject).Label.Color:= clBlack; //works TXListBoxItem(ItemObject).Label.Font.Color:= clWhite; //works end; It seems that the StyleClass will not happen instaneously. Is there a method that has to be called after setting StyleClass to get it to refresh immediately? When I select an item, I do not see the Style change until I select another item, then the previous item I selected, changes Download from Github Thanx
  6. Database Examples

    @lennart THANKS! Please, I would love to see a sqlite example when you find the time. Thats the one I have been working with the longest trying to do persistent data
  7. New Alpha update

    Thanks for the TW3ListBox and TW3CheckListBox changes! How do you override the creation of the TW3ListBoxItemData ? Specifically how to override the SetSelected? This is something I am very interested in doing Here is a ListBox example I created for demo purposes that uses a custom listbox item here is the code on github
  8. Save and load SQLite Database to local storage

    ok thanks, I see lynkfs is also having troubles
  9. Database Examples

    I guess not!
  10. Save and load SQLite Database to local storage

    @Dennis07 I am Not following you. How is it really simple cause you can do a type cast? The code above still does not work.
  11. Save Content Dialog

    There is a System.Filesystem unit, and a System.FileSystem.Memory unit, which would give you some functionality, but not all that you are looking for maybe someone else knows much more @lennart
  12. Save Content Dialog

    You could also use a modal dialog as shown in the Featured Demos\Forms & Components\ModalDialog
  13. Save Content Dialog

    hmmm, not sure if SMS has FileSystem procedures yet......besides that could be a mess if you are developing for multiple device platforms Dont you just want to save the memo contents to local storage? if so, then you have a few options - since you only then have to worry about the name and not the location You could build your own dialog using TW3Dialog from SmartCL.Dialogs unit or use the following function from the SmartCL.System unit function w3_Prompt(aText: String; aDefault: String = ''): String; e.g. DataName:= w3_Prompt(DataName', 'Uknown'); LocalStorage.setKeyStr('Data', DataName);
  14. Syntax Error: Unknown name

    You are missing {$I 'Form1:intf'} in the private section of your form TForm1 = class(TW3Form) private {$I 'Form1:intf'} protected Also, you will need to select your button on the form, go to the object inspector, select the events tab, and delete the event that you have no implementation for
  15. Database Examples

    I know the team is busy, but..... I am still waiting for a decent example of how to create a database on a mobile device. Add, Edit, and Delete records, and make the data persistent (i.e. save and load data to and from the device and app. I have tried WebSQL, sqlite, and TW3Dataset with no luck. It would be nice to see a REAL example of all three of these, but the best method for having a database on a mobile device would work fine for me. is anything like this in the works in the IMMEDIATE future?