Xojo Conferences
XDCMay2019MiamiUSA

Re: DropObject weirdness - CONSEQUENCES (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Canvas MouseDown/MouseUp
Next thread: Re: selecting bundles


Re: DropObject weirdness - CONSEQUENCES   -   Klaus Busse

Re: DropObject weirdness - CONSEQUENCES
Date: 01.08.02 21:22 (Thu, 1 Aug 2002 22:22:06 +0200)
From: Klaus Busse
>>Do you have a type called "????" defined as one of your file types?
>>The thing you pass to AcceptFileDrop is supposed to be the name of a
>>file type as you've defined it in the File Types dialog.

First thanks for the help. Of course the problem was that the
expected parameter was not the Mac Type but the name of the RB
Filetype, so the correct code for the open event of my example was:

me.AcceptFileDrop "special/any"

>This seems to come up every few weeks, doesn't it? We need to figure
>out a way to make this clearer.

A couple of suggestions:

#1. Documentation & example! ------------------------------------------------

Currently the description of "AcceptFileType" is:

AcceptFileDrop FileType as string
Permits documents of type FileType to be dropped on the control.

To me this sounds like FileType should be the type, while in fact it
needs to be the name of the type.
What about the following:

AcceptFileDrop FileTypeName as string
Permits documents of the named file type to be dropped on the
control. (see example below)

[...]

In the examples examples:
blablabla...
AcceptFileDrop "text/html"

This alone should make live quite a bit easier for you - and your
users as well ;-)

#2. Disable malfunction --------------------------------------------

Why accept a drop at all when the file type is not defined? If I try
to use a wrong type, and the drop is not even accepted, then the
first thing I usually do is to check if I really provided the correct
parameters! What was exspecially misleading was the fact the the drop
was accepted, so I thought that everything worked fine so far.

Maybe FileType could even be a class (AcceptFileDrop mytype as
FileType), but I guess that #1 and #2 should be quite an improvement
already ;-)

Ceterum censeo that App's version properties should become cross platform.

Klaus


---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>