Jump to content

limelect

Members
  • Content Count

    775
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by limelect

  1. limelect

    New Android does not launch

    Still a problem but On the option, I changed the NDK to the max platform. It was 14 now it is 19 C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidNDK-9c_19.0.27659.1188\platforms\android-19 So now I get "class segmentation fault (11)" problem Any advice on how to debug this?
  2. limelect

    New Android does not launch

    @Pat Foley The program loads to the phone. See the icon see splash and program stops Does not even start form create
  3. limelect

    New Android does not launch

    @Lars Fosdal How to do that "for the rights to access the API before use?" I think I checked all things. Like making sure I have the API 26 Checked min and max SDK OR I suspect that I do not use API 26 C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.27659.1188 Android 8.0.0 (API 26) is installed here I can see C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\ platform 22 26 27 29 are installed So what else have I to do to ensure I am using 26?
  4. limelect

    Document projects

    I did this program out of necessity I have hundreds of projects, big or small, that I needed to document. Some of you will not need this program some mite. It documents all the projects in a database. It started simple but got bigger and bigger. I am loading the help file if anyone wants to know more. the link http://limelect.com/downloads/document-projects/ there you will find a lot of goodies for free. I hope it is bug-free. But if need plz email me the comments. Thanks Document_Project.chm
  5. limelect

    Document projects

    SORRYYYYYYYYYYYY redownload project I fix the directory left in dir
  6. limelect

    Data Base does not save data

    I have an RTE file which at the end has 3 bytes 02 00 00 Using FDTable with SQLite FDConnection1.ExecSQL('CREATE TABLE IF NOT EXISTS Projects (MyDateTime DateTime,ProjectName TEXT,ProjectrealName TEXT,Category TEXT NULL,Description TEXT NULL,FilesIndex INTEGER)'); Description TEXT NULL =TEXT First, try ProjectsFDTable.FieldByName(',Description').AsString := MY RTE TEXT ProjectsFDTable.Post; ProjectsFDTable.Refresh; Last 3 bytes get deleted !!! Can I use it as a string????????? Second try as a BLOB Description BLOB NULL =BLOB var BlobField:TBlobField; Stream : TStream ; Stream := TStream.Create; <<<<<<<<< I do not free the stream BlobField := ProjectsFDTable.FieldByName('Description') as TBlobField; Stream := ProjectsFDTable.CreateBlobStream(BlobField, bmWrite); xxxx.SaveToStream(Stream); ProjectsFDTable.Post; ProjectsFDTable.Refresh; After Refresh I can see the stream has changed to the data size as needed. BUT NO DATA IN Description field !!!!! closing the application and looking at the database no description data. I did not manipulate the field let Delphi do the work
  7. limelect

    Data Base does not save data

    Do not know why. It was easier on my head. No reason to be perfect. Looking at my source ProjectsFDTable.FieldByName('Description').AsString; has NO BLOB D10.2.3
  8. limelect

    Data Base does not save data

    @Lars Fosdal You did not read carefully the problem !!! since RTE file which at the end has 3 bytes 02 00 00 The database truncate !!! those bytes when using string You have to use a blob. You can reload the data a string which from which I use it as a stream s := ProjectsFDTable.FieldByName('Description').AsString; St := TStringStream.Create(S); It all comes to this component >>>> AdvRichEditor
  9. limelect

    Data Base does not save data

    @Lars Fosdal Thanks. All the source is in the question. I thought I was very clear with the problem. In any case, it took me a while but I fixed it. The answer is xxxx.SaveToStream(S); TBlobField(ProjectsFDTable.FieldByName('Description')).LoadFromStream(S); Thanks in any case
  10. limelect

    Data Base does not save data

    Thank you everybody for your kind help. Can someone open a site, not for novices? Even professionals need sometime help
  11. limelect

    Saving tree to Data Base

    I have done this many times. This time it does not work I have 2 components FDConnection1 and FilesFDTable (FDTable) >>> SQLite first, I do this >>> FDConnection1 active. procedure TForm1.FDConnection1AfterConnect(Sender: TObject); begin FDConnection1.ExecSQL('CREATE TABLE IF NOT EXISTS Files (SectionsId INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL,Files BLOB NULL)'); FilesFDTable.TableName:='Files'; FilesFDTable.Active:=True; end; I put here all my tries too. Non worked I got NULL no save procedure TForm1.SaveTreeToBlob(Tree: TTreeView); var // MS: TMemoryStream; BlobField:TBlobField; Stream : TStream ; begin //MS := TMemoryStream.Create; BlobField := FilesFDTable.FieldByName('Files') as TBlobField; try // Tree.SaveToStream(MS); // MS.Position := 0; FilesFDTable.Insert; Stream := FilesFDTable.CreateBlobStream(BlobField, bmWrite); Tree.SaveToStream(Stream); // Stream.Write(ms,ms.Size); FilesFDTable.Post; FilesFDTable.Refresh; FilesFDTable.Close;// Active:=False; FilesFDTable.Active:=True; finally // MS.Free; // Stream.Free; end; end; No errors just output NULL or my DATABASE READER DOES NOT SEE THE BLOB?Thanks
  12. limelect

    Saving tree to Data Base

    Thanks every one 30+ years of Delphi did not teach me everything
  13. limelect

    Saving tree to Data Base

    I did not understand blob as binary cant i put any format as strigns or else? strings in stream?
  14. limelect

    Saving tree to Data Base

    @Bill Meyer i used your link to develop my own as strings instead procedure SaveTreeviewToString(tv: TTreeview; Sl: TStringlist); var node: TTreeNode; s:string; begin Assert(Assigned(tv)); try node := tv.Items[0]; while node <> nil do if node.CheckState=csChecked then begin s:=''; s:=s+'#'+inttostr(node.level); s:=s+'#'+(node.Text); Sl.Add(s); node := node.GetNext; end; finally end; end; procedure LoadTreeviewFromFile(tv: TTreeview; Sl: TStringlist); var node: TTreeNode; level,i,x,x2: Integer; s,s1,s2:string; begin try tv.Items.Clear; try node := nil; for i:=0 to sl.Count-1 do begin s:=Sl; x:=PosEx('#',s,1); x2:=PosEx('#',s,x+1); s1:=copy(s,x+1,x2-(x+1)); s2:=copy(s,x2+1,length(s)); level := strtoint(s1); if node = nil then {create root node, ignore its level} node := tv.Items.Add(nil, '') else begin if level = node.level then node := tv.Items.Add(node, '') else if level > node.level then node := tv.Items.AddChild(node, '') else begin while Assigned(node) and (level < node.level) do node := node.Parent; node := tv.Items.Add(node, ''); end; end; node.Text := s2; end; finally end; finally end; end;
  15. limelect

    Saving tree to Data Base

    I wander no one is using FDTable with blobs? I used blob with other database components it works with no problem Is it me or Delphi vcl 10.2.3?
  16. limelect

    Saving tree to Data Base

    @Bill Meyer sorry save does not work procedure SaveTreeviewToStream(tv: TTreeview; S: TStream); 3 var 4 writer: TWriter; 5 node: TTreeNode; 6 begin 7 Assert(Assigned(tv)); 8 Assert(Assigned(S)); 9 writer := TWriter.Create(S, ); 10 try 11 node := tv.Items[]; 12 writer.WriteListBegin; 13 while node <> nil do 14 begin 15 writer.WriteInteger(node.level); 16 writer.WriteString(node.Text); 17 writer.WriteInteger(node.Imageindex); 18 writer.WriteInteger(Integer(node.data)); 19 node := node.GetNext; 20 end; 21 writer.WriteListEnd; 22 writer.FlushBuffer; 23 finally 24 writer.Free; 25 end; 26 end; 27 BlobField := FilesFDTable.FieldByName('Files') as TBlobField; FilesFDTable.Insert; Stream := FilesFDTable.CreateBlobStream(BlobField, bmWrite); SaveTreeviewToStream(tree,Stream); FilesFDTable.Post; FilesFDTable.Refresh; As for the reader it has a bug I am stack !!! any help ?
  17. limelect

    Saving tree to Data Base

    @Bill Meyer thanks i will try
  18. I used gridpanel (2 rows 1 coulomb) to host a label on each row.(I have 2 gridpanels) I want to add a led at the corner of each row. P.S I changed the row to 0 but it goes ABOV the labels What I need is to be in the corner. Do I need to use something else? Furthermore, the label is as a client and centered however I need the text poison at the center of the grid (further down).
  19. limelect

    Add 2 controls to same row coulomb gridpanel

    Thanks, you are right
  20. limelect

    Android Service

    I need an Android service that stays on even if the application is closed. With the service, I want a timer that fires a message every few seconds. The main form will (maybe?) communicate with the service. I looked at http://cc.embarcadero.com/item/30439 or delphi.org/2015/09/minimalistic-android-service-with-delphi-10-seattle/ and theory and a few more sources none gave me my need. On the minimalistic ServiceUnit, I tried to use it by putting a timer in it seems it does not use it. putting a breakpoint did not stop. It seems I do not understand how the ServiceUnit is used P.S I use the emulator and there I can see in the running service "radhost" I am using D10.2.3 Thank you for your help AndroidSimpleService.zip ServiceUnit.pas
  21. limelect

    Android Service

    Or maybe the way to go is Widgets?
  22. limelect

    Android Service

    well it is not my need. I want a timer (check time.Task) even if the form is closed.
  23. limelect

    Android Service

    I will check the above project
  24. limelect

    Android Service

    Things can be even days. Why? as a humen being i touht of things to do and later forget. I want something to remind me.
  25. limelect

    Android Service

    Ok. I want to create tasks in DB as of time. When the time comes a popup will tell me of the task to do. Thats it very simple. Since the form will not be open all the time I thought of service.
×