I have a simple component I created which I instantiate in my main program like so:
newMessage = new MessageDetail();
newMessage.body.text = "Hello World";
I receive the error "Cannot access a property or method of a null object reference" on the second line because newMessage was not fully created prior to hitting the second line of ...
Hello,
I need a little help with asynchronous events in ActionScript 3. I am writing a simple class that has two functions, both of which return strings(logic and code outlined below). Due to the asynchronous nature of the AS3 HTTPService, the return value line is always reached before a result is returned from the service, yielding an...
Hi Experts,
Please define why the wait() and notify() methods are in Object class and not in Thread class?
Thanx
...
I have a TFrame (fraDisplay) with a TTimer (timAnimateDataChange). The timer is used to control a small animation. In the form containing the frame I want to have a method that does something like this:
procedure TForm.DoStuff;
begin
DoSomeLogicStuff;
fraDisplay.AnimateResult;
WaitForAnimationToFinish;
DoSomeOtherLogicStuff;...
I have an class which should send/receive data in packet form. This class contains an event handler which runs when new data is available to be read from the physical medium.
In the event handler I read the data from the medium and parse the available data for complete packets. Once a packet is identified an event is raised to pass the ...
In my lua program, i want to stop and ask user for confirmation before proceeding with an operation. I'm not sure how to stop and wait for user input, how can it be done?
...
Can jQuery provide a fallback for failed AJAX calls? This is my try:
function update() {
var requestOK = false;
$.getJSON(url, function(){
alert('request successful');
requestOK = true;
});
if (!requestOK) {
alert('request failed');
}
}
Unfortunately, even if the callback function of the $...
I'm new to processes in *nix, and am working on a basic shell in C... in implementing pipes, I count the commands on the line and iteratively fork() a new process.
At the end of each iteration I wait() on the child before proceeding to the next command. This was working fine, but I've apparently changed something to break it:
Program ...
I created this silly program to play with wait()
public class WaitTest {
public static void main(String [] args) {
System.out.print("1 ");
synchronized(args){
System.out.print("2 ");
try {
args.wait();
args.notifyAll();
}
catch(InterruptedException e){ System.out.pri...
I'm creating various processes (3 to be precise) and making them do different things.
So far so good. I'm trying to wait in the parent until all children are completed. I've played around with many options (such as the one listed below) but either the parent waits but I have to press enter to return to the shell (meaning that some child...
Hello ,
i am developing one application in blackberry java development.
I am requesting to http means i am connecting to web service .response of web service taking some time .That time i want to display some waiting screen.
Could you tell me how can i do that....
Regards
Pankaj Pareek
...
I have scenarios where I need a main thread to wait until every one of a set of possible more than 64 threads have completed their work, and for that I wrote the following helper utility, (to avoid the 64 waithandle limit on WaitHandle.WaitAll())
public static void WaitAll(WaitHandle[] handles)
{
if (handles == null)
...
I need to dynamically load jQuery and jQuery UI from a javascript, then check if it has loaded and do something afterwards.
function loadjscssfile(filename, filetype){
if (filetype=="js"){ //if filename is a external JavaScript file
var fileref=document.createElement('script');
fileref.setAttribute("type","text/javascript");
fil...
We are working on integrating two different applications that run simultaneously and share data. One application provides the data, the other one computes some values based off external systems and the data and has to provide it back to the first application.
We are using this library to share the data between the applications: http://g...
I'm trying to make a div fade in/out that's within an each statement. The problem is that next item is called before the fade in/out is complete.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script>
<div id='one'>one</div>
<div id='two'>two</div>
<div id='three'>three</div>
<sc...
When using Monitor.Wait(object obj) what should one use for the obj? In this article I'm reading on multithreading in .NET the author instantiates a new Object() to be used only as a monitor lock. Is this what you should do in practice, or is it more typical to Monitor the actual variable shared between two or more threads?
...
Is there a more straightforward way to wait for a specific amount of time in Cocoa than what I have come up with below?
- (void) buttonPressed {
[self makeSomeChanges];
// give the user some visual feedback and wait a bit so he can see it
[self displayThoseChangesToTheUser];
[self performSelector:@selector(buttonPressed...
Hello all,
I am trying to use NSURLConnection in asynchonous mode and wait for completion.
During the wait, I use NSRUNLOOP to handle events. Its works in most cases (3G and WIFI)
but the application hangup randomly in GSM DATA and EDGE environnement.
Anyone can help me ?
My code:
(void) connectionDidFinishLoading:(NSURLConnection ...
I have been trying to solve a problem involving thread communication using wait() and notify(). Basically i have 2 threads T1 and T2 and i want them to be executed in the following order
T1 , T2, T1, T2 ..... How can i achieve that?
Actual Problem: There are 2 threads T1 - which prints odd numbers (say 1 - 100) and T2 - which prints ev...
Hi
The question has been posted several times and is how to delay an addClass.
I got this:
$("#menu ul li").hover(function(){
$(this).addClass("hover");
},function(){
$(this).removeClass("hover");
})
And want something similar but where the class is added after 500msek or so. Best answer so far is this one using settimeout. Mayb...