| |
|
|
Jörg Sellmeyer | me was is always To umständlich, extra any Lines einzuprogrammieren, circa me with the development The values of/ one Classenstruktur Show To let. I Have me therefore what written, with the the very simply machbar is. it must method To eachone class added and the procedure moreover two Lines adjusted go.
Class tTest = hdl&,\
ID%,\
Index%,\
Text$(100),\
tTest@,\
ShowValues@' The method must naturally in the structure eingefügt go.
Proc tTest.tTest
Parameters h&,i%,ind%,t$
.hdl& = h&
.ID% = i%
.index% = ind%
.Text$ = t$
ENDPROC
'these procedure must eingefügt go.
Proc tTest.ShowValues
Parameters T#,cover$
If %pCount > 2
'these row must the jeweiligen code adjusted go
Var Values$ = "hdl&,\
ID%,\
index%,\
Text$(10)"
Declare worth$,txt$
WhileLoop 3,%pcount
txt$ =SubStr$(Values$,&Loop - 2,",") + " = " + $(&Loop) + "\n"
worth$ = worth$ + txt$
Wend
MessageBox(worth$,ClassOf(T#) + " " + cover$, 0)
ElseIf %pcount = 2
'and these row must the jeweiligen code adjusted go
.ShowValues(T#,cover$,.hdl&,\
.ID%,\
.index%,\
.Text$)
EndIf
ENDPROC
Declare Test#[]
Randomize
Cls
Var hTb& = Create("Toolbar",%hwnd,0,0,4,0,0)
WhileLoop 4
Toolbar("AddButton",hTb&,&Loop,2000 + &Loop,"Text " + Str $(&Loop))
Test#[&Loop - 1] = New(tTest,hTb&,Rnd(20),2000 + &Loop,"Text " + Str $(&Loop))
Wend
Toolbar("Separator",hTb&)
Toolbar("AddButton",hTb&,5,2005,"Zufallswerte")
Toolbar("AddButton",hTb&,6,2006,"beenden")
While 1
WaitInput
If Between(%menuitem,2001,2004)
Test#[%menuitem - 2001].ShowValues(Test#[%menuitem - 2001],"Bitte anzeigen")
ElseIf MenuItem(2005)
Test#[Rnd(4)].tTest(Rnd($FFFFFF),Rnd($FFFF),Rnd($FF),"Zufall " + time$(0) + ":" + time$(1))
ElseIf MenuItem(2006)
Break
EndIf
Wend
Dispose Test#[]
|
|
|
| |
|
|
|
p.specht
| |
|
| XProfan 11Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 05/19/18 ▲ |
|
|
|
|
Jörg Sellmeyer | thanks
in the Context would me yet interested, whether one somehow on The variables of/ one structure comes, without tappt im dunkeln of "innen" aufzurufen.
with Long(Test#,n&) can itself in the principle durchhangeln, if only Longs stored are. but whom area to Values To parsen is useful unmöglich. gives it means a point, where The Einsprungadressen one Bereichs indicated are and evtl too The Size the jeweiligen Platzes? |
|
|
| |
|
|
|
p.specht
| RGH ask ... becomes but Perhaps To versionsabhängig? |
|
|
| XProfan 11Computer: Gerät, daß es in Mikrosekunden erlaubt, 50.000 Fehler zu machen, zB 'daß' statt 'das'... | 05/20/18 ▲ |
|
|
|
|
H.Brill | there so one area in the Grunde only one linearer, together liegender Speicherbereich is, think I do not, that one there of 'außen' yet differently rankommt. one can indeed with the normalen Bereichs-command reinschreiben, what wants. The structure (struct) is only one expedient, particularly too, if one several Structures in so one area reinschieben wants. there's then too Rechenarbeit angesagt, or. The length of/ one such structure is then To respect. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 05/20/18 ▲ |
|
|
|
|
Jörg Sellmeyer | it comes Yes on it on, How Roland the intern manages. The Einsprungadressen for individual Strukturvariablen must Yes at least somewhere stored his. time see, what Roland moreover says. |
|
|
| Windows XP SP2 XProfan X4... und hier mal was ganz anderes als Profan ... | 05/20/18 ▲ |
|
|
|
|
H.Brill | Since there it probably no Einsprungsadressen. i think time, that Roland The Strukturvariablen intern of course manages, but whom Content too simply over calculate the position (byte = 1, Word = 2, Long = 4 etc.) from the area ausliest or. reinschreibt.
therefore must indeed The Strings in a Struct one solid Size having. How one on folgendem code sees, cut Roland with one more String as in the Struct pretended, simply whom remainder ex.
with variables Strings could it The position not any more so simply calculate, separate should the Nullbyte with include.
If one something like need, stand Yes still The normalen Bereichsfunktionen available. |
|
|
| Benutze XPROFAN X3 + FREEPROFAN Wir sind die XProfaner. Sie werden von uns assimiliert. Widerstand ist zwecklos! Wir werden alle ihre Funktionen und Algorithmen den unseren hinzufügen.
Was die Borg können, können wir schon lange. | 05/20/18 ▲ |
|
|
|