Autor Beitrag
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 03.10.02 19:12 
Hallo,
warum gibt es hier Fehelr:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
procedure TForm1.CloseSheet;
begin

  with Form1 do
    if PageControl1.PageCount <> 0 then begin
      with PageControl1.Pages[PageControl1.ActivePageIndex] do begin
        Liste.Delete(PageControl1.ActivePageIndex);
        Destroy; // Fehler
      end;
    end;
end;


MFG
mimi[/code]
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 03.10.02 19:41 
Benutze mal statt Destroy die Anweisung Free!

Außerdem ist das die falsche Sparte. Topic wird deshalb verschoben.

Gruß
TINO
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 03.10.02 19:51 
Titel: habe ich schon
das habe ich auch schon versucht !
es Führt immer zu einer zugrifverletztung und ich weiß nicht warum !!
auf denn Tabschit sind "TWebBrowser"(AktivX) liegt es daran???

MFG
mimi
Tino
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Veteran
Beiträge: 9839
Erhaltene Danke: 45

Windows 8.1
Delphi XE4
BeitragVerfasst: Do 03.10.02 20:08 
Was macht denn diese Anweisung?
ausblenden Quelltext
1:
Liste.Delete(PageControl1.ActivePageIndex);					

Gruß
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 03.10.02 20:13 
Diese Anweisung wird wohl den Index der jeweils aktuellen Seite aus einer Liste entfernen, wenn die Seite (TabSheet) entfernt werden soll.

Ich hab´s so gemacht:
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
with Content do
  if(PageCount > 1) then
    begin
      ActivePage.Controls[0].Free;
      ActivePage.Free;
    end;

Das "Controls[0]" ist ein TSynEdit, das vor dem Freigeben der Seite selbst auch freigegeben wird. Was soll ich sagen - Kein Fehler!
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 03.10.02 20:19 
habe ich jetzt auch gemacht = Es gibt immer noch Fehler !!!
was mache ich falsch liegt es an der TWebBroser komponenten ?
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
  with Form1 do begin
    if PageControl1.PageCount <> 0 then begin
      Liste.Delete(PageControl1.ActivePageIndex);
      with PageControl1.Pages[PageControl1.ActivePageIndex] do begin
        Controls[0].Free;
        Free;
      end;
    end;
  end;


MFG
mimi
MathiasSimmack
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Do 03.10.02 20:32 
Das glaube ich nicht. Ich hab´s eben mal schnell ausprobiert, und bei mir ging es ohne Probleme. Kommentiere doch mal spaßeshalber die Zeile
ausblenden Quelltext
1:
Liste.Delete(PageControl1.ActivePageIndex);					

aus und probier´s noch einmal. Eine andere Ursache als einen evtl. Fehler hier kann ich nämlich nicht sehen.

Ach ja, und lass mal das
ausblenden Quelltext
1:
2:
with Form1 do
  ...

weg. Deine Prozedur (TForm1.CloseSheet) ist bereits Teil der Form, eine gesonderte Angabe ist deswegen nicht erforderlich.
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 03.10.02 20:40 
Titel: immer noch nicht !
Es geht immer noch nicht !!!
ICH HABE ALLES VERSUCHT
bin ratlos :?: :?:

MFG
mimi
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 03.10.02 22:41 
Titel: Fehler gefunden
Ich habe den Fehler gefunden! aber ich weiß nicht wie ich denn lösen kann der Fehler ist bei PageControl1Change dort führe ich wichtige sachen durch :
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
 if isclose = False then begin
    if PageControl1.ActivePageIndex <> -1 then begin
      AW:=TWebBrowser(Liste[PageControl1.ActivePageIndex]);
      if (isFertig = True) and (AW <> NIL) then
        Edit1.Text:=AW.OleObject.Document.Url;
    end;
  end;
das wird immer ausgeführ kann mir jemmand sagen warum ??? und warum funktioniert die Enter taste bei Formularen(buttons funktioniert,aber nicht bei ein memo(HTML,meine ic)) mFG mimi PS desahlt sieht der text aus so komisch aus !!!
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Fr 04.10.02 00:25 
Titel: geschaft !!
ich habe es geschaft > der Fehler ist weg
es lag an: ich hatte vergessen AW:=nil zu machen !
ich weiß zwar nicht warum AW auf nil muss aber nun geht es
in aw speicher ich denn Akiven Webbrauser !!

und enter geht nun auch endlich in eingabe Fehlder !!!!!
MFG
mimi
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Fr 04.10.02 00:26 
Titel: doch nicht
wenn ich auf
www.delphimania.de/p...ode=newtopic&f=3
gehe und versuch in das eingabe felt enter zu drücken passiert nicht's!!!
ich weiß nicht warum !
aber in diesem Frum geht es endlich !!

MFG
mimi