Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun Jun 24, 2018 4:02 am
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: application icon doesn't accept folder drop anymore
PostPosted: Thu Sep 01, 2011 7:52 pm 
Offline

Joined: Thu Sep 01, 2011 7:46 pm
Posts: 2
Hi,

my application icon (when built as a standalone app in Mac OS X) used to accept folder drop (compiled with RealBasic 5.5)
Now I've upgraded to the latest version of Real studio, the application icon doesn't accept any folderitem drop.
Why is this? What could I be doing wrong?

I can still get the main window of the application to accept the folder item drop, that's no problem. But then the user has to start the application and find the main window to drop the folder onto. I'd like to be able to drop the folder directly on the application icon in the dock. It did work, once.

Roel


Top
 Profile  
Reply with quote  
 Post subject: Re: application icon doesn't accept folder drop anymore
PostPosted: Thu Sep 01, 2011 9:23 pm 
Offline
User avatar

Joined: Fri Jan 12, 2007 10:59 am
Posts: 136
Location: Victoriaville, QC, Canada
This should get you started.

Tested in RS 2011r3.


- in the project tab, add a filetypeset using menu Project-Add-File Type Set. This will create an item named FileTypes1

- double-click on FileTypes1 and add the type of files you wish your application to accept. You can use the "Add Common File Type" icon and select one of the files listed. Let's say you add the audio/mp3 type.

- In the project, select the App item. In the property sidebar on the right, under Mac Settings, you'll see the "AcceptFileTypes" property. Click on the (...) circle.

- The file types you added in FileTypes1 are listed. Check the ones you want to accept, and for each specify "Viewer" as Role. From what I understand, this tells OSX what capability your app will provide for these types of file: edit then, just view them, etc. I'm not too sure about the details, but start with this and you can Google on the topic later on.

- In the App, add the following code in the "OpenDocument", put the following:
MsgBox item.name


Run.

You should be able to drag an mp3 file on your app and you should get a message box showing the name of the file you dropped. If you drop several files, the OpenDocument will be fired once for each file.

Have fun!

---
Bruno Fréchette

_________________
Bruno Fréchette
PJJ Productions inc.
RealStudio Web & Desktop on OSX


Top
 Profile  
Reply with quote  
 Post subject: Re: application icon doesn't accept folder drop anymore
PostPosted: Fri Sep 02, 2011 4:02 am 
Offline

Joined: Thu Sep 01, 2011 7:46 pm
Posts: 2
I had already done the rest of your walkthrough, but setting the role to 'viewer' did the trick. Thanx!
Roel


Top
 Profile  
Reply with quote  
 Post subject: Re: application icon doesn't accept folder drop anymore
PostPosted: Tue Nov 13, 2012 3:29 am 
Offline
User avatar

Joined: Sun Jul 15, 2007 3:12 am
Posts: 119
Location: Denmark, Europe
Just what I needed too :)

By the way, you can read more about the roles (Viewer, Editor, Shell, None) in the Users Guide here:


_________________
REAL Studio 2012 Pro (Release 1.2) on a 17" MacBook Pro running Mac OS X Mountain Lion.
ATTENTION Danish RS Devs - make sure you join our Facebook group at http://www.facebook.com/groups/danske.realstudio.udviklere/


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group