Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Textfield (Real Studio getting started Mailinglist archive)

Back to the thread list
Previous thread: opening two IDE windows
Next thread: Re: MDI Window dressing


Textfield   -   Jeroen van der Putten
  Re: Textfield   -   Michael Rebar

Textfield
Date: 09.02.06 09:20 (Thu, 9 Feb 2006 09:20:47 +0100)
From: Jeroen van der Putten
Hi,

I am looking at strange and unexpected behaviour I don't know how to fix:

I have a multiline Editfield in a window which I allow to accept text
files through drag and drop.
1. Created a 'Textfile' item at Filetypes, looking for extension 'txt'
2. In the open function of the Editfield I write:
self.AcceptFileDrop "TextFile"

Now, I can import the contents of a text file into this Editfield as
expected. Great!
Now, my problem is the Editfield also seems to accept other file formats!
When I drop a Word-file onto it for example my Editfield converts to an
embedded 'Word-viewer'...

Am I doing something wrong or should I exclude all other file types,
instead of assuming my application
only does what I tell it to do?

Can someone explain me how I should approach this problem?
Thanks!
Jeroen
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Textfield
Date: 10.02.06 18:29 (Fri, 10 Feb 2006 09:29:41 -0800)
From: Michael Rebar
On 2/9/06 12:20 AM, "Jeroen van der Putten"
<<email address removed>> wrote:

> Hi,
>
> I am looking at strange and unexpected behaviour I don't know how to fix:
>
> I have a multiline Editfield in a window which I allow to accept text
> files through drag and drop.
> 1. Created a 'Textfile' item at Filetypes, looking for extension 'txt'
> 2. In the open function of the Editfield I write:
> self.AcceptFileDrop "TextFile"
>
> Now, I can import the contents of a text file into this Editfield as
> expected. Great!
> Now, my problem is the Editfield also seems to accept other file formats!
> When I drop a Word-file onto it for example my Editfield converts to an
> embedded 'Word-viewer'...
>
> Am I doing something wrong or should I exclude all other file types,
> instead of assuming my application
> only does what I tell it to do?
>
> Can someone explain me how I should approach this problem?
> Thanks!
> Jeroen

Jeroen,

Just a guess based on what you've written...

I think you must specify a MacType. With only a file extension specified,
your EditField will accept other types as well.

Michael

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>