Autor Beitrag
Rool
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 211



BeitragVerfasst: Di 06.05.03 14:24 
Ich zeichne meine Listen (Listview+Treeview) selbst. Jetzt erscheint häufiger, aber zu unbestimmbaren Zeiten der Fehler:
'Leinwand/Bold erlaubt kein Zeichnen'
Woran kann das liegen?? Ich weiss überhaupt nicht was die Ursache dafür sein könnte. So als hätte Delphi gerade Lust dazu!!! :?

_________________
MFG Rool
ase
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 203

Gentoo, Windows 9X, ME, 2k, NT, XP
Delphi 7 Prof., PHP 5 (Eclipse 3 SDK)
BeitragVerfasst: Mi 07.05.03 20:46 
servus


hört sich für mich wie nen thread-konflikt an. bist du sicher das dein code thread-sicher ist? ist das vielleicht nen "netzwerk-programm"? verwendest du indy komponenten?

es kann immer nur ein thread auf eine canvas zugreifen.
Rool Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 211



BeitragVerfasst: Do 08.05.03 08:09 
Titel: ...
ich verwende weder einen 2. thread, noch irgendetwas, was mit netzwerk zu tun haben könnte. keine ahnung wie das kommt!!!

_________________
MFG Rool
ase
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 203

Gentoo, Windows 9X, ME, 2k, NT, XP
Delphi 7 Prof., PHP 5 (Eclipse 3 SDK)
BeitragVerfasst: Do 08.05.03 08:19 
servus

versuch doch mal folgendes:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
Procedure MaleListeView...
Begin
  Try
    ListView.Canvas.Lock;

    // malen wie bisher...
  Finally
    ListView.Canvas.Unlock;
  End;
End;


probier mal nen paar mal und guck mal ob es immernoch diesen fehler gibt. welche delphi version hast du? ich glaube Canvas.Lock kam erst ziemlich spät dazu. wenn nicht, dann poste mal deine komplette zeichen routine.


ase
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 08.05.03 09:51 
Überprüf mal ob die Komponente zum Zeitpunkt des Zeichnens einen Parent zugewiesen hat...

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
Rool Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 211



BeitragVerfasst: Do 08.05.03 16:03 
Titel: ..
an motzi: wie soll ich das verstehen?

_________________
MFG Rool
ase
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 203

Gentoo, Windows 9X, ME, 2k, NT, XP
Delphi 7 Prof., PHP 5 (Eclipse 3 SDK)
BeitragVerfasst: Do 08.05.03 16:18 
Ganz einfach:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
Procedure MyListViewDraw...
Begin
  If MyListView.Parent = Nil then
    OutputDebugString('ListView: Ups, ich hab ja kein Parent...')
      Else
    OutputDebugString(PChar('ListView: Mein Parent ist ' + MyListView.Parent.Name));
End;


Bei einem Zeichenereignis auf keinen Fall mit message boxen arbeiten!

in delphi CTRL+ALT+V drücken und programm starten.



ase

_________________
-EN
Rool Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 211



BeitragVerfasst: Do 08.05.03 18:08 
Titel: ..
achso, ja klar, aber warum??
(Mit Messageboxen im Paint hab ich auch schon meine Erfahrungen gemacht :D)

_________________
MFG Rool
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 08.05.03 18:26 
Die Fehlermeldung tritt immer wieder auf, wenn versucht wird ein Objekt zu zeichnen, das keinen Parent hat... deswegen meine Frage.. aber DebugStrings würde ich ehrlich gesagt keine ausgeben ;)

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
ase
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 203

Gentoo, Windows 9X, ME, 2k, NT, XP
Delphi 7 Prof., PHP 5 (Eclipse 3 SDK)
BeitragVerfasst: Do 08.05.03 18:32 
wie willst du das sonst machen wenn nicht mit debug strings? er muss natürlich OutputDebugString wieder rausnehmen. Ist doch nur zum testen ob nen parent da ist.

hats denn nun nen parent oder nicht?


ase

_________________
-EN
Motzi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2931

XP Prof, Vista Business
D6, D2k5-D2k7 je Prof
BeitragVerfasst: Do 08.05.03 18:45 
Oops.. hab da irgendwie was verwechselt.. :roll: :oops: DebugStrings sind in dem Fall wahrscheinlich die sinnvollste Variante..

Würd mich jetzt aber auch interessieren ob ein Parent existiert oder nicht..!

_________________
gringo pussy cats - eef i see you i will pull your tail out by eets roots!
ase
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 203

Gentoo, Windows 9X, ME, 2k, NT, XP
Delphi 7 Prof., PHP 5 (Eclipse 3 SDK)
BeitragVerfasst: Do 08.05.03 19:52 
nujo aber ich denke mal das es nen parent hat. ich mein ne listview die auf nem form zur entwicklungszeit platziert ist hat doch immer nen parent. ich denke nicht das es daran liegt.

ich kenne diesen fehler nur von thread-unsafigem code aber wenn er sagt er verwendet keine threads. wie währe es wenn du mal deine draw routine postest? vielleicht finden wir den fehler dann.


ase

_________________
-EN
JacFab
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 111



BeitragVerfasst: Fr 09.05.03 13:01 
ich habe genau den gleichen fehler, obwohl ich meine listbox/listview nicht selber zeichne. aber bei mir kommt das nicht unregelmäßig, sondern immer! und zwar genau dann, wenn ich die data eines items dieser listbox auslesen will!
ase
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 203

Gentoo, Windows 9X, ME, 2k, NT, XP
Delphi 7 Prof., PHP 5 (Eclipse 3 SDK)
BeitragVerfasst: Fr 09.05.03 13:06 
hmm. also ich arbeite auch oft mit Data und hab sone probleme nie gehabt. Verwendet ihr das ganze in frames?


ase

_________________
-EN
Rool Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 211



BeitragVerfasst: Fr 09.05.03 13:42 
Titel: ...
Mit data hab ich auch nix am hut!!! n parent hats auf jeden fall (habs zwar nicht getestet, geht aber nicht anders). JacFab=>dann hats vielleicht gar nix mit dem selbstzeichnen zu tun?!?

ase=> die liste selbst ist nicht im frame, aber frames werden verwendet!!!

_________________
MFG Rool
ase
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 203

Gentoo, Windows 9X, ME, 2k, NT, XP
Delphi 7 Prof., PHP 5 (Eclipse 3 SDK)
BeitragVerfasst: Fr 09.05.03 14:06 
hmm. welche delphi versionen habt ihr?


ase

_________________
-EN
Rool Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 211



BeitragVerfasst: Fr 09.05.03 14:40 
Titel: 6.0
6.0

_________________
MFG Rool
ase
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 203

Gentoo, Windows 9X, ME, 2k, NT, XP
Delphi 7 Prof., PHP 5 (Eclipse 3 SDK)
BeitragVerfasst: Fr 09.05.03 14:47 
hm. ich hab 7 und kann die zeichenkette 'Leinwand' im gesamten delphi verzeichnis nicht finden. drum geh ich davon aus das bei D7 der fehler net existiert. was wiederum heißten könnte (!) das der fehler nen vcl bug is der in d7 gefixt wurde.

meinungen??


ase

_________________
-EN
JacFab
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 111



BeitragVerfasst: Sa 10.05.03 01:09 
bei mir hatte das mit dem selbstzeichnen 100%ig nix zu tun... ich hab den fehler auch schon ausgemerzt.
Ich idiot hab in der funktion messageboxes verwendet. das führte zu dem fehler !
nu klappt alles
ase
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 203

Gentoo, Windows 9X, ME, 2k, NT, XP
Delphi 7 Prof., PHP 5 (Eclipse 3 SDK)
BeitragVerfasst: Sa 10.05.03 08:56 
dann möchte ich zum :autsch: heAdbAngen bitten! jippi!


ase

_________________
-EN