Forum Moderators: open
I hope you can help me on this. It is about
(set/clear)Interval. The problem is I have classes' objects being accessed and used by a wide diversity of functions throughout the entire code (also, different classes access and change eachother's contents). In the same way, some
setInterval delay functions access and change (sometimes even deleting) classes' objects' contents. I need to prevent this from happening. Well I need to somehow delay the execution of
setInterval' loop function call, in order to prevent this: (take a look at this example) X.theFunction()
{
[red][validate X.theobject here][/red]
[exists, continue with process]
[return]
} Y.loopdelayFunction()
{
[red][if something, delete X.theobject][/red]
.
:
.
}
Y.loopdelayFunction starting its execution after validation in X.theFunction occured as it will result in error after it had returned from the delay loop. Is there a way of locking (or delaying should I say)
setInterval's delay function start execution? All comments are much appreciated,
Thank you, ;)
d#Nimrod
BTW: have been trying to find some information on the Net, but couldn't.
var b_do_delay = true;
X.theFunction()
{
[validate X.theobject here]
[exists, continue with process
b_do_delay = false;
]
[return]
}
Y.loopdelayFunction()
{
if ( b_do_delay )
{
[if something, delete X.theobject]
}
.
:
.
}
I have to say I envy you though, I started learning programming with VB, then I moved to web stuff, Javascript and ASP, which I left as soon as I found PHP, but I've always regretted not having a foundation in real programming languages like C or C++, since it's what these higher level languages are all written in.
not having to worry about assigning and releasing memory etc, buffer overruns etc.
That is sooooo true. You can't imagine how better life is with javascript. :)
I have to say I envy you though, I started learning programming with VB, then I moved to web stuff, Javascript and ASP, which I left as soon as I found PHP, but I've always regretted not having a foundation in real programming languages like C or C++, (...)
Isitreal, this is the way I see it: if you can program in PERL, PHP, javascript and coordinate all this with DHTML, clearly you have what it takes (the programming logic) to learn how to program in any language.
If you really regret not having learnt C/C++ or whatever other powerful programming language, you can still have a go at it and learn it -- I am sure you can do it!
Why not try it? ;)
Why not try it? ;)
It's tempting I have to admit, it's a time issue more than anything, too hard to keep up on CSS, which is a relative nightmare to get to run stable, learn PHP well enough, debug javascript issues.
What's a good non MS C/C++ development environment if I ever decide to do that? Is there a good open source one available for windows or do I have to switch to linux (another thing to learn...)
What's a good non MS C/C++ development environment if I ever decide to do that? Is there a good open source one available for windows or do I have to switch to linux (another thing to learn...)
IMHO, Linux is the best open source platform one can find. In fact I am about to change to Linux as well, not only because of the open_source_scheme, but also because it runs in an UNIX platform -- it has got nothing to do with M$. So, if you are not into developing Windows Applications which you could eventually sell (who knows?), forget about MFC (Microsoft Foundation Classes, available in Visual C++ x.x for Windows API/GUI/etc support) and start as soon as possible learning how Linux OS works, in a first stage, and then learning C. :)
Every maturing open source thing I'm using is really good, firebird, apache, php, they all work great, much better than their MS equivalents as far as I'm concerned. What really gets me is how totally configurable all these are, that's really convenient.
Can't fully switch though since there are too many apps I need in windows that aren't available for the linux platform, plus you have to develop using MS IE as your primary browser test since that's what 90+% of most sites visitors are using.
Thanks for the input, now to find a decently fast box to play with...
there's something nice about the idea that the stuff you learn will actually not become obsolete with the latest MS OS release, or like with asp 3 -> asp.net.
I feel precisely the same way as you.
Can't fully switch though since there are too many apps I need in windows that aren't available for the linux platform, plus you have to develop using MS IE as your primary browser test since that's what 90+% of most sites visitors are using.
I kind of grew attached and used to Microsoft's OSes as they were the only products available at the time when I first started programming in PCs (and the most sold worldwide.) So it was only until I had reached a mature age when I realised how wrong I have been.
I too can't fully switch to linux platform now, as my professional obligations do not allow me to do so. But, I am not going to abandon the idea just because of that -- whenever I have the time I will get myself a Linux OS and will learn how to use/program it. :)