Jump to content

limelect

Members
  • Content Count

    924
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by limelect


  1. @Dave NottageWell, you might be right, but as a professional using Pascal even before

    Delphi, I do not have the strength to use failing products.

    For Android, I will stick with Android Studio even though Delphi

    is better in that area and wait for a new version

     

    Maybe I will give it one more shot


  2. 3 minutes ago, Dave Nottage said:

    Did you follow the instructions at that link I gave? First, you should check whether or not the settings on the Java tab of the Android SDK settings matc

    Yes, I started by checking the Java path, but on the 32 it does not allow me to change

    Furthermore, I tried to compile to 64, but it wants to update. I say ye,s it fails with no reason

     


  3. @Dave Nottage It is a mess; most directories are bad

    On Java 32-bit, it does not allow me to change it 

    Maybe because I put both 32 and 64 as the same directory?

    The adb.exe does not exist

    and so on

     

    Up to today, I have bought all the Delphi. Should I buy now?

    Is this a Delphi joke


  4. No SDK in the directory after installation of D12

    C:\Users\Public\Documents\Embarcadero\Studio\23.0\CatalogRepository\AndroidSDK-2525-23.0.51961.7529

     

    On my d10.2.3, there are a few exe files, including AVD Manager.exe

    C:\Users\Public\Documents\Embarcadero\Studio\19.0\CatalogRepository\AndroidSDK-2433_19.0.27659.1188

    SDK base path

     

    I did choose Android during the installation

     Can I copy my d10 to my d12 ? or what

     

    On compiling, I get initialization of VM error

    D12 community edition

     

    P.S I have seen this  

     


  5. Cannot deploy the application

    All Java should be in c:\bin, why?

    Ok, I put Java in bin

    Now it need c:\bin\ client\jvm.dll 

    So I made this directory with jvm.dll 

    I have jvm.dll in the server directory

    Lastly, I have this error during the initialization of VM

    Obviously, D12 did not initialize its Java during installation

    Any help?

     


  6. @Remy Lebeau To begin, thank you for helping a lot

    I cannot put here what I did, as it has too many places

    fixed. those 2 lines

        PListItemData(lvClip.Selected.Data).ThePicture.Free;
          Dispose(PListItemData(lvClip.Selected.Data));
     were added in many places, and more my software closes nicely

    without any leaks

    So thanks again


  7. Ok, I did a very simple test

    One line of text and delete

    then 

    if ListItemData.ThePicture.empty then  exit  ;<<<<<<<<<<<< error cannot check

       ListItemData.ThePicture.Free;

    If I check with nil ListItemData.ThePicture is NOT nil

     

    I will keep checking to find what's going on.


  8. Surely I followed your suggestion, which works

    OnDeletion is not done only if I want to delete

    Only if I delete a line in the list, unless I do not understand you

     

    This is why I have a form onclose.

    From the source

     

        New(ListItemData);
        try
          ListItemData.theString := s.Text;
          if ContainsText(s.Text, 'Picture') then
          begin
            ListItemData.ThePicture := nil;
            BlobField := FDQuery2.FieldByName('Image') as TBlobField;
            Stream := FDQuery2.CreateBlobStream(BlobField, bmRead);
            ListItemData.ThePicture := TBitmap.Create;
            ListItemData.ThePicture.LoadFromStream(Stream);

            FreeAndNil(Stream);
          end;
          ClipItem.Data := ListItemData;


        except
          ListItemData.ThePicture.Free;
          Dispose(ListItemData);

        end;
        lvClip.Items.EndUpdate;
        FDQuery2.Next;
      end;
      s.Free;

     

    That's it, nothing else

     

    Ok, let me explain the application. Sometimes you have text only, and at times

    text and Bitmap on the same line

    So I check for bitmap nill, but something fishy is that beside the above

     


  9. @Remy Lebeau Obviously, it works, but using this, free gives an error

    D10,2,3

    procedure TMyForm.lvClipDeletion(Sender: TObject; Item: TListItem);
    var
      ListItemData: PListItemData;
    begin
      ListItemData := PListItemData(Item.Data);
      if ListItemData <> nill then
      begin
        ListItemData.ThePicture.Free; <<<<<<<<<<<<<<<< error
        Dispose(ListItemData);
      end;
    end;

    On vcl.control

     

    procedure TWinControl.MainWndProc(var Message: TMessage);
    begin
      try
        try
          WindowProc(Message);
        finally
          FreeDeviceContexts;
          FreeMemoryContexts;
        end;
      except
        Application.HandleException(Self); <<<<<<<<<<<< error
      end;
    end;
     

    I wanted to add this to the program close

     

    procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);
    var
      i: Integer;
      ListItemData: PListItemData;

    begin
     for i := 0 to lvClip.Items.Count - 1 do
     //   if lvClip.Items.Data <> nil then
        begin
          ListItemData := PListItemData(lvClip.Items.Data);
          if ListItemData <> nil then
          begin
     //     PListItemData(lvClip.Items.Data).ThePicture.Free;
      ListItemData.ThePicture.Free; <<<<<<<<<< Error and
    //        Dispose(ListItemData); <<<<<<<<<<<  I cannot use this as it gives many more errors
          end;

        end;

    end;

     

    Any Idea ?


  10. I hope I explained my problem  with the listview

    I have 2 pictures and 2 text

    Adding text ,the text items is OK, but

    Adding 2 pictures is the problem

     

      PListItemData = ^TListItemData;

      TListItemData = record
        theString: string;
        ThePicture: TBitmap;
      end;
    b: Tbitmap; <<<< is created at oncreat.

    var
      ClipItem: TListItem;

    ListItemData: PListItemData;

     

     while not FDQuery2.Eof do
      begin
    ------ process Query

    ClipItem := lvClip.Items.Insert(0);

      New(ListItemData);

        try
          ListItemData.theString := s.Text;  <<< OK
         if ContainsText(s.Text, 'Picture') then
           begin
             b.Assign(nil);
            BlobField := FDQuery2.FieldByName('Image') as TBlobField;
                Stream := FDQuery2.CreateBlobStream(BlobField, bmRead);<<< read the picture

            b.LoadFromStream(Stream);
            ListItemData.ThePicture := TBitmap(b); <<<< get also the picture
            FreeAndNil(Stream);
          end;
          ClipItem.Data := ListItemData;

        except
          Dispose(ListItemData);
        end;
        FDQuery2.Next;
      end;

    No problem, no leak BUT !!!! Now to the problem of looping twice

     

    PListItemData(lvClip.Items[0].data).ThePicture <<<< first picture
    PListItemData(lvClip.Items[0].data).TheString <<< first text OK

    Second time in the loop

    PListItemData(lvClip.Items[1].data).ThePicture <<< got second picture
    PListItemData(lvClip.Items[1].data).TheString <<< second text OK

    But now PListItemData(lvClip.Items[0].data).ThePicture got the second picture

     

    SO, more explanation. The first item got the second picture!!! But the text is OK it has 2 texts no problem

     

    On the breakpoint, I see the watch list as

    PListItemData(lvClip.Items[0].data).ThePicture
    PListItemData(lvClip.Items[0].data).TheString

    PListItemData(lvClip.Items[1].data).ThePicture
    PListItemData(lvClip.Items[1].data).TheString



             


  11. @Die Holländer My problem is understanding why I see the

    bmp on the keys, even though I have no link to any

    bitmaps

    Just try it and see if you can explain the phenomenon

    Get Gexpert procedure list from the source and copy the toolbar to a new form

    That's it.

     


  12. 30 minutes ago, Die Holländer said:

    Maybe because in design time you copied the toolbar from dmSharedImages module on your form.

    While pasting the toolbar on your form the IDE knows where the images are located.

    That's why you see on the form Images = dmSharedImages.Images

    In Runtime your form has no connection to the dmSharedImages, so the images are ignored and they disappear.

    The only way it knows is from the Gexpert DLL, which means that it has hidden resources.

    Try it yourself and see if you have the Gexpert source

    P.S. I just copied the toolbar from the FORM ( procedure list), nothing else!!!!!!!!!!!

     


  13. I copied a toolbar from the Gexpert procedure list form

    Now, someone can explain

    The toolbar is on a NEW FORM.

    As one can see from the DFM, it has 2 sections

     

     object ToolBar: TToolBar
        Left = 0
        Top = 27
        Width = 552
        Height = 22
        AutoSize = True
        DisabledImages = dmSharedImages.DisabledImages <<<<<<<
        Images = dmSharedImages.Images<<<<<<<<<<<<<

    And the buttons show the icons

    On the form, there are no uses !!!! for it

    image.thumb.png.d5867fdbf056981a045e5629e4e0a0f6.png

     

    Can anyone explain why I see pictures on the buttons?

    Is it because GEXPERT is in my IDE?

    This means I can use all Delphi resources, even if they are hidden.

    P.S. Running this form, the icons disappear !!!
     

×