Jump to content

programmerdelphi2k

Members
  • Content Count

    1406
  • Joined

  • Last visited

  • Days Won

    22

Everything posted by programmerdelphi2k

  1. programmerdelphi2k

    TRichEdit equivalent in FMX?

    https://www.tmssoftware.com/site/tmsfmxpack.asp?s=fmxricheditor#features
  2. programmerdelphi2k

    Using a component from one unit to other units

    no EXE, DCU, etc.. no binary, just code ok
  3. programmerdelphi2k

    Using a component from one unit to other units

    zip and upload yours "FORMS", let's try some...
  4. programmerdelphi2k

    Getters & Settters??

    in "forms", you can try use "AfterContruction" event to init some value! Same that the "form" is not "ready" for use, but you can access the fields or others if the instance is ready! in "inheriting" case, it's necessary look with more attention of calls order :< --> a lazy debug help... create a new form with all events called and see how it happens (who is called at first...)? OnCreate or AfterConstruction? (try with this events "overrided")
  5. I think that too, but for now my big problem was: Have I gone crazy and no longer have the value of reality, or has the IDE rebelled and doesn't want to code anymore? 🙂
  6. programmerdelphi2k

    Using a component from one unit to other units

    GISEngine doest not have "TFORM1" class/instance object, then, you can not reference it like this! you can create a generic "procedure ... of object" and use it for two, or, for example: ------ form1 TForm1 = class(TForm) Viewport3D1: TViewport3D; procedure Viewport3D1Click(Sender: TObject); --------- form2 type TForm2 = class(TForm) Viewport3D1: TViewport3D; procedure FormCreate(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation {$R *.fmx} uses Unit1; procedure TForm2.FormCreate(Sender: TObject); begin Viewport3D1.OnClick := Form1.Viewport3D1Click; end;
  7. same that exists a "blank space" between text on "button" value? like ... 'del=my delete'; <--- this way Basically, the "GET" works = it get the page of the topic, but "POST" (delete) dont delete the message! of course, the commands can not be accept or is wronged in my code... but basically I send the "POST" with url+topicID and param-list to "DEL" button I'll upload a TXT with all returns to "GET" and "POST" texts after send two commands: Http.GET(...) and following it Http.POST(...) in sequece in the same button-click (procedure) I see on returns (Get and Post) that the cookie-values is diferent each other! not the same! (same using the same Http object to send two commands in sequence) YES! I'm using the same instance Object to send "GET" and following "POST" commands. in my button procedure, I create the Http:= TIdHttp.Create(...) I send the Http.GET(...) and put the text-results in my memosLOG after "GET", I send the "POST" Http.POST(...) in sequence, and put the text-results in my memosLOG I destroy the Http object "Http.Free" for better analise, I'm send a TXT with "GET" and "POST" resulted.... I think that is better for you (and me 🙂 very thanks for you support IdHTTP_txt_infos.7z
  8. programmerdelphi2k

    Thread or ProcessMessage?

    hi @Jeff Steinkamp As "CreateAnonimous" return a "Thread" you can do it: create a Array (global or a list protected to multi-access) to store (reference, id, etc...) all thread (anonimous or not) created if using "protected list" (using TMonitor, TCriticalSection, TSemaphore, etc...) you can control it better, but I think that it's not necessary at all (see each situation in usage) if necessary, you can "remove" the thread reference in these list using "OnTerminate or other" when this thread is ended... if possible! when your form needs to be closed, you can scan this array and see if exists any thread on list and try terminate it, free it etc... this task can be done in "OnCloseQuery()", then, "OnClose()" is free to anothers tasks, you decide! I have done some like: function TerminateMyTasksFirstToLast(AStartFromFirst: boolean = false): integer; ... scan all array with thread reference stored and try end it... OnCloseQuery event: CanClose := (TerminateMyTasksFirstToLast() = 0); // if have any thread running... wait end it
  9. hi @Davide Angeli very thanks for your "EYEsssssssss" .... WOW MY GOD..... HELP MY GLASSES..... look, I had tryed many open, close, open, close... IDE, project and "And I couldn't see this very basic and dominant line in the code..." AAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHH, ... I'm going back to sanity now! now, all is going to normality. thansk again
  10. other info: I have opened the old project create in RAD 11.1 Alexandia I have "duplicated" the same thread with a new name (TMyNewThread (new) = TMyThread (old) in another unit (unit2) on same project (nothing changed on config etc...) resulted: EXECUTE IS NOT CALLED ANYMORE FOR NEW THREAD (TMyNewThread)
  11. but if I create it (same) a new project ... the "Execute" is not called anymore RAD STUDIO 11.2 ALEXANDRIA with Patch1 installed
  12. @Der schöne Günther thanks for your quick reply this thread have a long code ok but the constructions base is the same than new thread... unit Unit1; interface uses System.SysUtils, System.Classes; type TMyThread = class(TThread) private FStatusText: String; FThreadID : cardinal; protected procedure Execute; override; public constructor Create(CreateSuspended: boolean = true); destructor Destroy; override; end; implementation { TMyThread } constructor TMyThread.Create(CreateSuspended: boolean); begin inherited Create(CreateSuspended); // FThreadID := ThreadID; end; destructor TMyThread.Destroy; begin inherited; end; procedure TMyThread.Execute; // is called on runtime and showed on Debug mode begin // inherited; FStatusText := 'OnExecute: Thread in execution...' + FThreadID.ToString; end; end.
  13. @Remy Lebeau if I want "delete the topic", I need to do in "Browser" (not in my Indy coding) 1) find and click "edit" message. 2) into message, click "delete" button ------------------------------------------ in Indy-app in my test: // get the topic = ok! no needs nothing more for see the "message" -> it's work, I have a text-html with full-page with the message! Http.Get('https://<<server-address>/topic.asp' + '?topicid=' + LTopicID, LResponseContent); -------------- ResponseCode: 200 ResponseText: HTTP/1.1 200 OK BoundIP: BoundPort: 0 BoudnPortMin: 0 BoundPortMax: 0 ConnectTimeout: 0 ReadTimeout: 10000 AuthRetries: 0 RedirectCount: 0 MaxHeaderLines: 255 UseNagle: true Response.RawHeaders:Cache-Control: private Content-Length: 15116 Content-Type: text/html; charset=utf-8 Server: Microsoft-IIS/7.5 Set-Cookie: ASPSESSIONIDSWTRBRCT=EJ.............JA; secure; path=/ <-------- cookie X-Powered-By: ASP.NET Date: Thu, 24 Nov 2022 13:47:58 GMT ---------------- in Indy-app, I have simulate "edit... delete message", like: 1) ask to edit the message: same<<IdHttp>>Object.Get('https://<<server-address>/topic_edit.asp' + '?topicid=' + LTopicID, LResponseContent); 2) after "GET" command above, I send a "POST" command using same object "Http.xxxx" // LParams = TStringList LParams.Add('roomid=111'); LParams.Add('topicfatherid=0'); LParams.Add('topicid=' + LTopicID); LParams.Add('del="delete"'); // same<<IdHttp>>Object..Post(https://<<server-address>/topic_edit_submit.asp', LParams, LResponseContent); // DOES NOT WORKS yet! 😞 -------------- Then, if I use the same obj "Http.xxxxx" to send a "GET" command to "edit" and, after, a "POST" command to "DELETE" two commands will work in the same "session" (cookie,etc...) or each command will work in distinct session (cookie,etc...)? --- if two session, then, the second command dont will work as expected??? is it possible get the "cookie" from "GET -- edit..." to use in "POST -- delete..." command? if yes, how do it? Do you understand ? thanks for now
  14. programmerdelphi2k

    Create a bitmap of selected control?

    in Fmx, use Gesture
  15. ok. talking about F12 in Chrome calls Console Debug ... same that Edge, Firefox, etc...
  16. thanks by sample, I will try and let you know if ok. see you later
  17. @Remy Lebeau you said: You are not sending any data to the server, so you shouldn't be assigning values to those properties at all. ------ in F12 on Chrome, I see "POST" command was used after "Delete" button to be clicked on "edit message". but I cannot see any body reference????
  18. when clicking in "edit message" I see this in URL: https://<<addres-from-server>>/topic_edit_submit.asp in source-page I see this info: ... <table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#000000"> <form name="Form1" action="topic_edit_submit.asp" method="post" onSubmit="return check()"> <input type="hidden" name="roomid" value="1"> <input type="hidden" name="topicfatherid" value="648330"> <input type="hidden" name="topicid" value="648379"> ... <input type="submit" name="edit" class="button" value="edit"> <input type="submit" name="del" class="button" value="delete"> <input type="reset" name="reset" class="button" value="reset"> <input name="topic_title" type="hidden" value="2"> <textarea class="textarea" name="topic_content" rows="11" cols="73"> </textarea> </form> </table> ... other thing... what would be usage of "TIdMultiPartFormDataStream" in IdHTTP.POS(...)" ? it would be to send some info in "buttons" on "forms" from html page? some sample of usage?
  19. hi @Remy Lebeau first, thanks for your time. As you see, my knowledge of HTML is next to nothing, so I'll try some more information. -- I understand that: If server send (just) HTML, then, I have only HTML. OK! -- use Chrome Debug, I think that I dont know how intercept my requeriment, at all. -- to ask to see (on screen of Chrome) "one" message, I can to do this: https://<<address-from-server>>/topic.asp?topicid=nnnnn <-- ID message that I can see on Chrome URL ------ using INDY "GET" I can receive this message (in HTML text) in my MEMO, too! My big problem is (out others, like "coding" :) -- Currently, in the browser, to delete any message (SPAM), I need to enter the message to see the "DELETE" button. And, looking at the "source" of the page, by Chrome, right mouse button, I see the above mentioned instruction (<input type="submit" name="del" ...), so I thought someone could you tell me how this could be sent by INDY, or another way, because in the Chrome URL I don't see anything related to this. That is, I don't know how this is being sent to the server. Other question about "send config in REQUEST above": you say that I dont need/can send any configuration to server if I just ask something... not send something to server? is that?
×