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

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Di 03.06.03 17:52 
Hallo,
wie bekomme ich das was in HotKey1.HotKey drinen steht als interger wert zurück ?

_________________
MFG
Michael Springwald, "kann kein englisch...."
TomT
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 116

Suse 9.1 WinXP
D6 Pers
BeitragVerfasst: So 08.06.03 12:50 
Explizite Typumwandlung:
ausblenden Delphi-Quelltext
1:
zahl := integer(hotkey1.HotKey);					

_________________
...und da wurde mir klar, dass eine Toolbar keine Kneipe für Heimwerker ist.
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: So 08.06.03 15:08 
hatte ich schon gemacht, da meint er es sei eine ungültige typumwanlung

_________________
MFG
Michael Springwald, "kann kein englisch...."
TomT
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 116

Suse 9.1 WinXP
D6 Pers
BeitragVerfasst: So 08.06.03 15:38 
sicher? hab das bei mir selbst getestet bevor ichs gepostet hab. lief einwandfrei. (D6)

_________________
...und da wurde mir klar, dass eine Toolbar keine Kneipe für Heimwerker ist.
Tweafis
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 647

WinXP + fbsd
Delphi 5 Prof
BeitragVerfasst: So 08.06.03 16:32 
TomT hat folgendes geschrieben:
Explizite Typumwandlung:
ausblenden Delphi-Quelltext
1:
zahl := integer(hotkey1.HotKey);					


Vielleicht

ausblenden Delphi-Quelltext
1:
zahl := (hotkey1.HotKey as Integer);					

_________________
.: Es wird der Tag kommen, an dem wir es nicht mehr ändern können :.
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: So 08.06.03 17:52 
was heißt "Explizite" ?
werde ich mal ausprobieren:)

_________________
MFG
Michael Springwald, "kann kein englisch...."
TomT
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 116

Suse 9.1 WinXP
D6 Pers
BeitragVerfasst: So 08.06.03 22:19 
Explizite heisst ausdrückliche, will sagen: man teilt dem Compiler mit wohin er umwandeln soll.
Im Gegensatz dazu wandelt die implizite Typumwandlung "automatisch" um. z.B:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
var a:float;
      b: integer;
begin
  a:=a+b; //hier wird b implizit ein einen float umgewandelt
end;

_________________
...und da wurde mir klar, dass eine Toolbar keine Kneipe für Heimwerker ist.
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: So 08.06.03 22:23 
achso, aber damit ist das Problem noch nicht behoben :( :(

_________________
MFG
Michael Springwald, "kann kein englisch...."
TomT
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 116

Suse 9.1 WinXP
D6 Pers
BeitragVerfasst: Mo 09.06.03 00:06 
Könntest du vielleicht den Ausschnitt aus deinem Quellcode posten, weil bei mir klappt die von mir angegebene Lösung ohne Probleme. Welche Delphi Version nutzt Du?

PS: Die Sache mit dem as geht nicht, da es sich bei integer nicht um eine Klasse handelt.

_________________
...und da wurde mir klar, dass eine Toolbar keine Kneipe für Heimwerker ist.
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: So 15.06.03 20:24 
meine frage hatte ich falsch gestellt.
die pfeiltasten habe den Asccicod 37-40 aber auf der Zehertastertur ist es das selbe.
wenn ich jetzt die zahl umwaldel zu einem Tastencode string steht da z.b.
Nach-Links und wenn ich auf die Zehertastertur drücke 2 (Zehertastertur)
egal ob ich nun Num lok an oder aus habe. wie kann ich es so machen das da im Hotkey nur "nach links" steht und nicht "4 (Zehertastertur) ?
hat da jemmand eine idee ?

_________________
MFG
Michael Springwald, "kann kein englisch...."