Jump to content

azrael_11

Members
  • Content Count

    69
  • Joined

  • Last visited

Posts posted by azrael_11


  1. Try to connect to cscart Rest API Server

    The documentation here says that Uses Basic HTTP authentication so but the e-mail and the api-key must encode to base64 encoder.

     

    So i encode the email and api and try with the rest tool that embracedero provides.

     

    I add in the authentication tab the basic and in user name the encoded with base64 email and in the password the encoded with base64 Apikey.

     

    And returns that

     

    pic_01.thumb.png.6ffff828f5b73d2a431c6729a2f8c848.png

     

    pic_02.thumb.png.d3cee59ff1c5880288ffa9a6b128e4a4.png

     


  2. On 6/30/2019 at 11:29 AM, Uwe Raabe said:

    You can use the approach shown in TArray from System.Generics.Collection:

     

    
    type
      TMyExtArray = class(TArray)
      public
        class procedure DeleteElement<T>(var Values: TArray<T>; const Index: Cardinal);
      end;
    
    class procedure TMyExtArray.DeleteElement<T>(var Values: TArray<T>; const Index: Cardinal);
    begin
      if (Index < Low(Values)) or (Index > High(Values)) then begin
        raise EArgumentOutOfRangeException.Create('argument out of range');
      end;
      System.Delete(Values, Index, 1);
    end;

    Note that handling different types (intrinsic, pointer, reference counted) in the implementation part can be a bit tricky.

    I'' try this when i found time

    Thank you

     


  3. On 6/30/2019 at 3:02 PM, David Heffernan said:

    Without knowing what types you are using we can only guess what you are doing. 

     

    On 6/30/2019 at 11:29 AM, Uwe Raabe said:

    You can use the approach shown in TArray from System.Generics.Collection:

     

    
    type
      TMyExtArray = class(TArray)
      public
        class procedure DeleteElement<T>(var Values: TArray<T>; const Index: Cardinal);
      end;
    
    class procedure TMyExtArray.DeleteElement<T>(var Values: TArray<T>; const Index: Cardinal);
    begin
      if (Index < Low(Values)) or (Index > High(Values)) then begin
        raise EArgumentOutOfRangeException.Create('argument out of range');
      end;
      System.Delete(Values, Index, 1);
    end;

    Note that handling different types (intrinsic, pointer, reference counted) in the implementation part can be a bit tricky.

    Thank you very much.

    Sorry for the late response.

     

    David the arrays is set of record having more records and object types.

    The main goal here is.

     

    example

     

    type 
    	TmyRecord_2= Class(TObject)
        procedure : mine();
        function : mine_2():boolean;
        ......
        ....
    end;
    
    type
    	TmyRecord = record
    		one: array [0..10] TmyRecord_2	
            two: string;
            three ........
            .....        
    end;
    
    var
    	myHole_Array: array of TmyRecord;
        
        
    Create a dynamic set of myHole_Array about 100 entries
    
    Now i want to Delete the 7 entrie
    Now i want to Insert a new entrie in 16 position
    
    So far is good 
    
    I Try to make a global procedure to delete or insert entries in different arrays or records.
    
    How can i add this 
    Procedure Delete_Entrie_In_Array(myArray : here is the difficult part for me ; vDelete_Num: Cardinal);
    
    Thank you again.
        

     

     


  4. 31 minutes ago, David Heffernan said:

    More details please. What is the error? What is TArray? I expect that it is your own type because the type defined in the RTL of that name is not an array, it's just a collection of static methods. 

    Error is that cant compile

    TArray is a try of mine to add a generics view of point like TArray<> but i cant do that either.

    The main goall here is the procedure to take any array that maybe is a records or objects or any else and delete the desire element of that array.


  5. Hello

     

    I try to add a var array in procedure parametre.

     

    i try this but not working so

    procedure delete_an_element_from_array(var vArray: TArray; const vIndex: Cardinal);
    begin
    ......
    end;

    How can i do this

    vArray get many array types like records, objects, integers, strings etc.

     

    Thank you.


  6. Try to change the screen cursor in FMX desktop application with no success.

     

    I find that you can do this.

    form1.cursor := crHourGlass;
    ///Make the job
    
    form1.cursor := crDefault;
    

    But it is not working.

     

    How can i do this.


  7. 20 minutes ago, PeterBelow said:

    The project configurations form a hierarchy, simple select the top node ("all configurations - all platforms" probably, I have a german language version of RAD Studio) in the project options dialog, compiler options, dropdown list on the top of the right hand pane.

    Nothing happend i start to believe something going with rio installation.


  8. Hello

     

    Try to move a project from tokyo 10.2.3 to rio 10.3.1 community edition.

    And have two questions

     

    1. How to remove the inherited values from debug from include file search path?

    2. In rio i install the pasLicVlc and everything is ok. Create a new multi application add the component TFmxPasLibVlcPlayer go to include file search path add the path source and source.fmx like tokyo do but compiler cant find it. Does this change in rio somehow?

     

    P.S. I have both installed in my computer Delphi 10.2.3 CE and Delphi 10.3.1 CE

     

     


  9. 1 hour ago, Lars Fosdal said:

    For Windows, the norm would be to install the font. AddFontResource could be used, but as you demonstrated, it doesn't seem to work as intended?
    For MacOS, I would also assume that installing the font is recommended.
    I've not used custom fonts with FMX on Android or iOS, so I can't answer that.

    So the installation in every operation system is the best choice.

    Maybe we send a message to embarcadero developers to make a better in delphi solution.

    Thank you very much.


  10. On 3/11/2019 at 9:29 AM, Lars Fosdal said:

    What happens if you install the font in Windows and just try to use it the same way as any other font? (Saw that was answered already).

     

    AddFontResource is a WinAPI call, so if you plan for cross-platform FMX code, you should not use it. 

     

    Also, https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-addfontresourcea
    says that return value for success = the number of fonts installed, and 0 = failure.

    I plan in the future to be multi platform so what is the best way  to do that?

     

    Thank you.


  11. 1 hour ago, uligerhardt said:

    What does "doesn't work" mean for you? Computer exploding? Hard drive formatted?

     

    I just created a FMX app with this:

    
    procedure TForm1.FormCreate(Sender: TObject);
    begin
      AddFontResource('C:\Users\uli\Documents\Embarcadero\Studio\Projekte\IcoMoon\IcoMoon-Free-master\Font\IcoMoon-Free.ttf');
      SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);
      Text1.Font.Family:= 'IcoMoon-Free';
      Text1.Text:= #$e900;
      Text1.TextSettings.FontColor:= TAlphaColorRec.Red;
      Text1.TextSettings.Font.Size:= 32;
      Text1.TextSettings.HorzAlign:= TTextAlign.Trailing;
    end;

    And I get a red house. I'm not sure if it matters that font file name and family are the same in my sample.

    The font appear in the settings->personalization->fonts so that means it loading

     

    But i get a square instead of the house.

     

    But if i install the font permanently then everything works just fine...


  12. I add IcoMoon free Font  https://icomoon.io/#preview-free with this code

     

    AddFontResource(PChar(extrafe.prog.Paths.Fonts + 'icomoon.ttf'));
      SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);

     

    Then i creat a TText component on run

      ex_load.Intro.Text:= TText.Create(ex_load.Intro.Video);
      ex_load.Intro.Text.Name:= 'Loading_Intro_Text';
      ex_load.Intro.Text.Parent:=  ex_load.Intro.Video;
      ex_load.Intro.Text.SetBounds(extrafe.res.Width- 300, 10, 300, 30);
      ex_load.Intro.Text.Font.Family:= "IcoMoon-Free';
      ex_load.Intro.Text.Text:= 'e900';
      ex_load.Intro.Text.TextSettings.FontColor:= TAlphaColorRec.White;
      ex_load.Intro.Text.TextSettings.Font.Size:= 32;
      ex_load.Intro.Text.TextSettings.HorzAlign:= TTextAlign.Trailing;
      ex_load.Intro.Text.OnClick:= ex_load.Input.mouse.Text.OnMouseClick;
      ex_load.Intro.Text.Visible:= True;

    That is suppose to see a black house instead you see a e900

    Is there anything i forget or have something to see the icon of the icomoon in my text?

     


  13. On 3/4/2019 at 10:25 AM, M.Joos said:

    Be aware that there is a bug in the TMediaPlayer component that reports an "unsupported media file" error when it should have reported a "file not found" error. So first check if the file you are pointing to actually exists.

    No i double check that the .mp3 files plays just fine.

    Thank you.


  14. 20 hours ago, pcplayer99 said:

    what kind of video file can supported,  depends on system, not by FMX.  Cause FMX just use default mediaplayer of system.

    That i know, but mediaplayer from windows plays just fine.

    So something else create the problem.

     


  15. Hello ...
    Try to add video files with TMediaPlayer and TMediaPlayerControl and always get "unsupported media file" for any video file type like *.avi, *.wmv or *.mp4.

    I install the latest K-Full media codecs and the problem remains the same.

    Anyone has some experience about TMediaPlayer?

     

    P.S. Even the MediaPlayerHD example provided from delphi not working.

    Thank you..


  16. 12 hours ago, Remy Lebeau said:

    That has nothing to do with Indy, and everything to do with your particular HTML/CSS, and whether the receiver supports what you are trying (for instance, not all email readers support background images - see The Ultimate Guide to Background Images in Email ).  Indy does not care about the particular content of your HTML, it gets sent as-is (other than to encode it for transmission purposes only).

     

    I will say this, though:

     

    - in your 1st case, 'url("back,png")' is wrong for an embedded image, you need to use 'url("cid:back.png")' instead since "back.png" is the Content-ID you assigned to the attachment.

     

    - in your 2nd case, the 3rd call to Html.Add() appears to be broken.

    Remy this is a hell good Guide, it helps a lot.

     

    In the 1st your are right i miss that.

    In the 2nd case i forgot some  " '+" so yes it is broken. 

     

    Thank you.


  17. Hello i manage to send an HTML e-mail with formations but i can't add background color to main body.

     

    I try this with css but not working

      // This is for adding repeating image in background of body
      vHTMLBuild.HtmlFiles.Add(vBackground, 'back.png');
      //vHTMLBuild.HtmlFiles.Add(vLogo, 'logo.png');
    
      vHTMLBuild.Html.Add('<html>');
      vHTMLBuild.Html.Add('<head>');
      vHTMLBuild.Html.Add('<style>body {'+
      'background-image: url("back.png");'+
      'background-repeat: repeat;'+
      'background-color: #cccccc;'+
      '}</style>');
      vHTMLBuild.Html.Add('</head>');
      vHTMLBuild.Html.Add('<body>');
      vHTMLBuild.Html.Add('</body>');
      vHTMLBuild.Html.Add('</html>');
      

    and this

    // This is for adding only background color
    //  vHTMLBuild.HtmlFiles.Add(vBackground, 'back.png');
    //  vHTMLBuild.HtmlFiles.Add(vLogo, 'logo.png');
    
      vHTMLBuild.Html.Add('<html>');
      vHTMLBuild.Html.Add('<head>');
      vHTMLBuild.Html.Add('<style>body {'+
      '{background-color: coral;
      '}</style>');
      vHTMLBuild.Html.Add('</head>');
      vHTMLBuild.Html.Add('<body>');
      vHTMLBuild.Html.Add('</body>');
      vHTMLBuild.Html.Add('</html>');    
        
      

    Thank you.

×