Autor Beitrag
LinzerASK
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 135

WIN XP
Delphi 4, Delphi 2005
BeitragVerfasst: Di 17.10.06 09:18 
halloo!

ich hätte eine frage, ob es möglich ist eine tabelle samt datensätzen in ein stringgrid zu laden! mit einer FIFO - Liste...


mfg
passiv
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 270

WIN XP Professional
Delphi 7 Enterprise, Java (Eclipse), Python 2.5, Django 1.1
BeitragVerfasst: Di 17.10.06 09:35 
hat die tabelle integerwerte oder realwerte musst du zeile für zeile (am besten mit einer schleife) und zelle für zelle die werte mit inttostr(WertVonTabelle) oder floattostr(WertVonTabelle) reinladen

ich hoffe halt du weißt wie das stringgrid soweit funktioniert

und im übrigen: wie wärs wenn du vorher leute aus deiner Klasse fragst? ;-)

_________________
Die Probleme, die es in der Welt gibt, sind nicht mit der gleichen Denkweise zu lösen, die sie erzeugt hat.
Albert Einstein
LinzerASK Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 135

WIN XP
Delphi 4, Delphi 2005
BeitragVerfasst: Di 17.10.06 10:04 
hallo!

ja leider funktioniert das nicht.

ich habe die tabelle, "Fahrzeuge.db", und diese soll anhand einer FIFO liste in das stringgrid geladen werden.

als typen habe ich jetzt diese definiert:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
  type
   PKfz = ^Kfz;
    Kfz = Record
            Auto: String;
            Einsatzfahrzeug : Boolean ;
            Nachbar : PKfz;
          End;
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Di 17.10.06 15:31 
Das was du da deklariert hast ist keine FIFO-, sondern eine Einfach verkettete Liste.
FIFO(First In,First Out)-Listen sind Listen, bei denen immer vorn angefügt und vorn entnommen wird, also zu Beispiel ein Stack.

Zuerst sollte mal klar gestellt werden, was es denn nun für eine Liste werden soll. FIFO ist in dem fall sicherlich wert- bis sinnlos ;)

Ihr habt doch damit bestimmt schonmal was gemacht? Keiner stellt sich hin und sagt einfach 'mach mal'. Einige Grundlagen sollten doch da sein, oder?

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
LinzerASK Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 135

WIN XP
Delphi 4, Delphi 2005
BeitragVerfasst: Mi 18.10.06 07:22 
wir haben schon mit lifo gearbeit, fifo sollte mir jetzt anwenden.
man hat uns gesagt dass wir es probieren sollen, wenn wir es nicht schaffen dann mit lifo...

hm bei lifo ist es halt dann so dass der letzte datensatz der tabelle im stringgrid an erster stelle sich befindet.

wie kann ichs dann mit lifo machen? :)
LinzerASK Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 135

WIN XP
Delphi 4, Delphi 2005
BeitragVerfasst: Mi 18.10.06 13:48 
hm

jetzt hab ich in der hilfe auch noch nachgesehen, aber habe leider keinen sinnvollen vorschlag gefunden!

das was mich ein wenig iritiert is ja das so wie bei einer listbox zbsp loadfromfile vorhanden ist, also eine möglichkeit was zum reinladen. bei dem stringgrid ist mir ja schon klat dass ich nichts mit loadfromfile reinladen klann.
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mi 18.10.06 13:54 
Für Datenbanken gibts eigentlich das DBGrid...

Such mal nach verketteten Listen oder so ähnlich hier im Forum. Es gab schon einige Fragen zu dem Thema.

Die grobe Abfolge ist die:

ausblenden Quelltext
1:
2:
3:
4:
5:
6:
Anfang der Tabelle;
Anfang der Liste neu erzeugen;
So Lange wie noch Zeilen in der Tabelle
  Werte in Liste Eintragen;
  Nächsten Eintrag anhängen(über den Next-Zeiger);
  Nächste Zeile der Tabelle;

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
LinzerASK Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 135

WIN XP
Delphi 4, Delphi 2005
BeitragVerfasst: Mi 18.10.06 17:48 
ähm könntest du mir vielleicht ein wenig mit dem source code helfen!

zuerst mal

table1.first;

und wie bekommen ich dann die datensätze in mein stringgrid?
Martok
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 3661
Erhaltene Danke: 604

Win 8.1, Win 10 x64
Pascal: Lazarus Snapshot, Delphi 7,2007; PHP, JS: WebStorm
BeitragVerfasst: Mi 18.10.06 17:57 
Hier scheints ein Missverständnis zu geben, oder?
www.delphi-forum.de/viewtopic.php?t=65346 ist das, wo ich dich jetzt hingelotst hätte. Da kann also nicht das Problem/der Weg liegen.
Mich interessiert immer noch, was bei diesem Problem eine FIFO Liste soll... Es sei denn, es ist eine doppelt verkettete Liste gemeint.

Oder ist das Probelm, aus dieser Pointer-Liste die einträge ins Stringgrid zu kriegen?

_________________
"The phoenix's price isn't inevitable. It's not part of some deep balance built into the universe. It's just the parts of the game where you haven't figured out yet how to cheat."
LinzerASK Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 135

WIN XP
Delphi 4, Delphi 2005
BeitragVerfasst: Mi 18.10.06 18:14 
das problem ist das, dass ich nicht weiß wie ich von meiner tabelle die daten ins stringgrid bekomme!
LinzerASK Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 135

WIN XP
Delphi 4, Delphi 2005
BeitragVerfasst: Do 19.10.06 07:11 
kann mir da jetzt irgendwer helfen? ich sitze schon die ganze zeit da und bekomme nichts weiter...