Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Mac OS » Open a folder at runtime
Open a folder at runtime [message #51773] Thu, 23 May 2019 21:55 Go to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Hello,

with

LaunchWebBrowser(GetFileFolder(TD.PATHDIRWWW));

I can open a folder and then display its file content.
Unfortunately it does not work for Mac OS X. Do we have an U++ alternative to do the same or something similar?

Thanks,
Luigi
Re: Open a folder at runtime [message #51778 is a reply to message #51773] Sat, 25 May 2019 21:13 Go to previous messageGo to next message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Fortunately there is the old system function that does its job pretty well

  system("open path &");


Online there are example in objective c that are very scary.

Luigi
Re: Open a folder at runtime [message #51779 is a reply to message #51778] Sat, 25 May 2019 21:31 Go to previous messageGo to next message
Klugier is currently offline  Klugier
Messages: 1075
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello Luigi,

Can you try to use following line of code and let me know if it works for you:
void WorkspaceWork::OpenFileFolder()
{
	ShellOpenFolder(GetFileDirectory(GetActiveFilePath())); // <- This method
}


Sincerely,
Klugier


U++ - one framework to rule them all.
Re: Open a folder at runtime [message #51780 is a reply to message #51779] Sun, 26 May 2019 11:10 Go to previous message
forlano is currently offline  forlano
Messages: 1182
Registered: March 2006
Location: Italy
Senior Contributor
Klugier wrote on Sat, 25 May 2019 21:31
Hello Luigi,

Can you try to use following line of code and let me know if it works for you:
void WorkspaceWork::OpenFileFolder()
{
	ShellOpenFolder(GetFileDirectory(GetActiveFilePath())); // <- This method
}



Hello Klugier,

it doesn't work, ShellOpenFolder() is not recognized.

Thanks,
Luigi
Previous Topic: Mac OSX: How to setup U++
Next Topic: [Fixed] Context Menu does not work properly
Goto Forum:
  


Current Time: Thu Mar 28 16:40:37 CET 2024

Total time taken to generate the page: 0.00943 seconds