Webbrowser and WebGMapsLookupEdit

Viewing 17 posts - 21 through 37 (of 37 total)
  • Author
    Posts
  • #53622
    HeDiBo
    Participant
      'minou' wrote:

      Execute code When Page (Google Maps) Has Fully Loaded but this does not happen

      Thank you :a3:, I'm sure Serge will answer this.

      #53641
      Support
      Keymaster

        Hello, Minou

        I'm trying to repeat your problem, but can't. This event is working in my test-app.

        Can you show a demo, please?

        #53699
        HeDiBo
        Participant

          Send us a complete project (dproj and all), that compiles without errors, packed in a ZIP file, if you really want answers.

          #53702
          minou
          Participant
            'HeDiBo' wrote:

            Send us a complete project (dproj and all), that compiles without errors, packed in a ZIP file, if you really want answers.

            thank you

            anyway it is work now my be problem in ie or ac

            #53696
            HeDiBo
            Participant
              'minou' wrote:

              thank you

              anyway it is work now my be problem in ie or ac

              For your information, your test program worked fine with me too.

              Best of luck to you 🙄

              #53883
              HeDiBo
              Participant

                JM-DG apparently posted a message, that was later removed? The message went:

                Quote:
                There is indeed a weird bug with TsWebBrowser in Delphi 7 at least.

                Assign any of these actions in TsWebBrowser

                OnBeforeNavigate2

                OnCommandStateChange

                OnDocumentComplete

                OnNavigateComplete2

                // Put a comment so that delphi does'nt remove them.

                – Save All.

                – Close the project.

                – Reopen the project and the actions won't be linked anymore.

                I can confirm this serious bug using Delphi XE4.

                I tried the same thing with TWebbrowser and no problem there. So it must be somewhere in TsWebBrowser.

                #53890
                Support
                Keymaster

                  Hello and thanks for the demo!

                  The reason of this problem is in different declaration of events under different versions of Delphi.

                  Under Delphi 7 this event looks like this:

                  Code:
                  procedure TForm1.sWebBrowser1DocumentComplete(Sender: TObject; const pDisp: IDispatch; var URL: OleVariant);

                  Under Delphi XE 3:

                  Code:
                  procedure TForm1.sWebBrowser1DocumentComplete(ASender: TObject; const pDisp: IDispatch; const URL: OleVariant);

                  I think, single solution – to redeclare the event after migration to other Delphi version.

                  #53897
                  HeDiBo
                  Participant
                    'Support' wrote:

                    I think, single solution – to redeclare the event after migration to other Delphi version.

                    I'm not sure what you mean. :a1:

                    #53899
                    Support
                    Keymaster

                      Sorry. I mean – to handle the event in new IDE again.

                      Also, I have added some changes in the next release, maybe it helps.

                      #53930
                      HeDiBo
                      Participant

                        Problem solved in 10.16 :a3:

                        #53931
                        minou
                        Participant

                          sWebBrowser1DocumentComplete ..ok

                          sWebBrowser1DownloadComplete ..ok

                          please add this example to demo

                          http://www.alphaskins.com/ademos.php

                          #53932
                          HeDiBo
                          Participant

                            Can you build an English language version?

                            Please correct all the indentation errors in the source. Example:

                            Code:
                            try

                            if Assigned(Super['places'].AsArray) then // Indented too far
                            Count :=Super['places'].AsArray.Length else Count :=0;

                            for i := 0 to Count – 1 do
                            with ListView.Items.Add do
                            begin
                            Caption :=(Super['places[' + inttostr(i) + '].name'].AsString);
                            subitems.Add(Super['places[' + inttostr(i) + '].distance'].AsString);
                            subitems.Add(Super['places[' + inttostr(i) + '].vicinity'].AsString);
                            end;

                            except on e:exception do // Does not align with the try statement
                            result:='произошла ошибка : '+e.Message;
                            end;

                            if ListView.Items.Count>0 then // does not align with the previous end statement.
                            result:='Ближайший банк : ' + ListView.Items[0].caption +'только : ' +ListView.Items[0].SubItems[0]+ ' метр'
                            end;

                            You see, sample code should be impeccable: readers of the example should be able to follow it without extra effort.

                            Your example is very interesting, because it illustrates the use of Google Maps. :a3:

                            #53934
                            minou
                            Participant
                              'HeDiBo' wrote:

                              Can you build an English language version?

                              Please correct all the indentation errors in the source. Example:

                              Code:
                              try

                              if Assigned(Super['places'].AsArray) then // Indented too far
                              Count :=Super['places'].AsArray.Length else Count :=0;

                              for i := 0 to Count – 1 do
                              with ListView.Items.Add do
                              begin
                              Caption :=(Super['places[' + inttostr(i) + '].name'].AsString);
                              subitems.Add(Super['places[' + inttostr(i) + '].distance'].AsString);
                              subitems.Add(Super['places[' + inttostr(i) + '].vicinity'].AsString);
                              end;

                              except on e:exception do // Does not align with the try statement
                              result:='произошла ошибка : '+e.Message;
                              end;

                              if ListView.Items.Count>0 then // does not align with the previous end statement.
                              result:='Ближайший банк : ' + ListView.Items[0].caption +'только : ' +ListView.Items[0].SubItems[0]+ ' метр'
                              end;

                              You see, sample code should be impeccable: readers of the example should be able to follow it without extra effort.

                              Your example is very interesting, because it illustrates the use of Google Maps. :a3:

                              Try now

                              #53949
                              Support
                              Keymaster

                                Thanks for the example, I will publish it soon.

                                #53950
                                HeDiBo
                                Participant
                                  'minou' wrote:

                                  Try now

                                  It's a beautiful example. Bravo :a3:

                                  #54032
                                  minou
                                  Participant

                                    fix

                                    work in win 10 !

                                    #54261
                                    arabelaalborn
                                    Participant

                                      You all are brilliant!

                                    Viewing 17 posts - 21 through 37 (of 37 total)
                                    • You must be logged in to reply to this topic.