void TQueueDialog::HandleRefsMessage(BMessage *theMessage)
{
	uint32 		theType; 
	int32 		theCount; 
    entry_ref 	theRef;	

	theMessage->GetInfo("refs", &theType, &theCount); 
       
	if ( theType != B_REF_TYPE )
	{
		ERROR("TQueueDialog::HandleRefsMessage() - Not B_REF_TYPE -\n");
		return;
	}
		
	for ( int32 i = --theCount; i >= 0; i-- ) 
	{ 
		if ( theMessage->FindRef("refs", i, &theRef) == B_OK ) 
		{ 			
			// Evaluate the ref and determine if we can deal with it
			// Currently we are only dealing with files
			status_t retVal = EvaluateRef(theRef);
			if(retVal != B_OK)
				ERROR("TQueueDialog::HandleRefsMessage() - Bad ref -\n");
		} 
	}
}	
void TElementsSorter::HandleRefMessage(BMessage* theMessage)
{

	entry_ref theRef;

	if ( theMessage->FindRef("FileRef", &theRef) == B_OK ) {
		// Evaluate the ref and determine if we can deal with it
		// Currently we are only dealing with files
		EvaluateRef(theRef);
	}
}
void TElementsSorter::HandleRefsMessage(BMessage* theMessage)
{

	uint32 theType;
	int32 theCount;
	entry_ref theRef;

	theMessage->GetInfo("refs", &theType, &theCount);

	if ( theType != B_REF_TYPE )
		return;

	for ( int32 i = --theCount; i >= 0; i-- ) {
		if ( theMessage->FindRef("refs", i, &theRef) == B_OK ) {
			// Evaluate the ref and determine if we can deal with it
			// Currently we are only dealing with files
			EvaluateRef(theRef);
		}
	}
}
//---------------------------------------------------------------------
//	HandleDirectory
//---------------------------------------------------------------------
//	iterate through the directory and pass the resulting
//	refs and attempt to add the resulting file
//
status_t TQueueDialog::HandleDirectory(entry_ref &ref, struct stat &st, BDirectory &dir) 
{
	struct stat s; 
	BEntry entry; 
	
	dir.Rewind();
	while (true)
	{
		if (dir.GetNextEntry(&entry) == B_OK)
		{
			entry.GetStat(&s);
			
			entry_ref eRef;
			entry.GetRef(&eRef);
//			HandleFile(eRef, s);
			EvaluateRef(eRef);
		} else
			break;
	}
		

	return B_ERROR;
}