Woohoo! I’m immortal!
Thanks guys, will go over it in more detail tomorrow but need to leave it for now.
Woohoo! I’m immortal!
Thanks guys, will go over it in more detail tomorrow but need to leave it for now.
Markus and Amando,
It is apparent from your inability to understand my suggestion that you have never used Event Definitions. Whether or not you are interested, I am going to expand a bit. I programmed in RB for about 8 years and never understood event definitions. At the RealWorld in Austin in '08 I attended a talk by Guyren Howe and he opened my eyes to the power of event definitions. He stated that he consider them to be the most powerful feature of (at that time) RB. I am not proposing subclassing a window and there is no need to write the raiseevent code 24 times.
raiseevent mTxtChged
I hope this helps someone down the road in using Xojo.
Your suggestion is already implemented in the example. Have you taken the time to examine to code I posted before making such false assumptions?
As I am sure you haven’t, please see my code, examine it, and then make your suggestions.
Here to download the code
Then feel free to make comments “after” you have seen the code. If you were, you wouldn’t write that message.
I have +10 years experience developing Xojo commercial applications I clearly know how event definitions works. And Markus as well without doubt.
Your proposal doesn’t work for what Markus needs. Despite the time you insist, sorry… no… doesn’t fit with Markus requirements.
Thanks for the tutorial anyway, but we are no new users with Xojo, fortunately.
Hi Roger,
[quote=103635:@Roger Clary]Markus and Amando,
It is apparent from your inability to understand my suggestion that you have never used Event Definitions.[/quote]
That’s about the time frame we have been on the forums together
I started in 2002 or 2003 with REALbasic 5 but was mostly doing on/off as time permits, so am not a professional.
I wasn’t at the talk but I read his OOP book which did the same to me.
And that’s where it falls down as (see above) that has a major impact on readability.
Basically adding a new TextChanged event isn’t helpful because it only shifts the problem, it doesn’t solve it.
I thought maybe there is some advanced elegant method that I haven’t mastered yet (and there are many I haven’t mastered) but alas it seems there isn’t such a magic bullet.
[quote=103425:@Eli Ott]I’d go with the control set, but I would use constants for the index:
// Defined as constants in the window, not in code
Const MassOfA = 4
Const MassOfC = 18
Mass(MassOfA).text = 123
Mass(MassOfC).text = 219[/quote]
This is how I do it on a number of similar scenarios. I define the constants in a global module. It is a bit more up-front code, but it keeps things neat.