Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > OOP Powerplant for Mac > GetFullPath Mac...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 422 of 484
Post > Topic >>

GetFullPath Mac Hang when Function get called...

by "Neel" <nilesh.khemkar@[EMAIL PROTECTED] > Sep 21, 2005 at 06:37 AM

Hi
       Using UNavServicesDialogs::AskSaveFile Function, I am trying to
save file.
After calling this function i get FSSpec , then using following method
i m trying
to get fullpath of the selected file. But  sometimes the Mac ( OS X
10.3.2) gets
hang, application not responding.
       Please suggest whats wrong with the following method...

Thanks in advance.


static bool GetFullPathWithString( const FSSpec& theSpec, std::string&
outPath )
		{
			 OSStatus error = noErr;
			 Handle fullPath = NULL;
			 short fullPathLength;
			 outPath.clear();
			error = ::FSpGetFullPath( &theSpec, &fullPathLength, &fullPath
);		// Get full path to file
			//error = ::GetFullPath(theSpec.vRefNum, theSpec.parID,
theSpec.name, &fullPathLength, &fullPath);
			if(( error != noErr ) && ( fullPath == NULL ))
			{
				       outPath = "";
				      return false;
			}
			outPath.append( *fullPath, fullPathLength );
			::DisposeHandle( fullPath );
			fullPath = NULL;
			return  true ; 
		}
 




 5 Posts in Topic:
GetFullPath Mac Hang when Function get called...
"Neel" <nile  2005-09-21 06:37:50 
Re: GetFullPath Mac Hang when Function get called...
David Phillip Oster <o  2005-09-21 15:30:37 
Re: GetFullPath Mac Hang when Function get called...
Ben Artin <macdev@[EMA  2005-09-21 12:54:49 
Re: GetFullPath Mac Hang when Function get called...
David Phillip Oster <o  2005-09-22 05:55:09 
Re: GetFullPath Mac Hang when Function get called...
Chris Baum <cbaum981@[  2005-09-22 03:34:26 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Nov 21 16:32:15 CST 2008.