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

Re: Help: Drag some text into a Textfield (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Re: Stumper question - Leopard Crashes
Next thread: secure socket OK for export?


Re: Help: Drag some text into a Textfield   -   Lennox Jacob
   Help: Drag some text into a Textfield   -   Lennox Jacob
    Re: Help: Drag some text into a Textfield   -   Marnaud
     Re: Help: Drag some text into a Textfield   -   Lennox Jacob
    Re: Help: Drag some text into a Textfield   -   Roger Clary
     Re: Help: Drag some text into a Textfield   -   Lennox Jacob
      Re: Help: Drag some text into a Textfield   -   Roger Clary
       Re: Help: Drag some text into a Textfield   -   Lennox Jacob
    Re: Help: Drag some text into a Textfield   -   Roger Clary
    Re: Help: Drag some text into a Textfield   -   Marnaud
    Re: Help: Drag some text into a Textfield   -   Marnaud
    Re: Help: Drag some text into a Textfield   -   norman xojo.com
    Re: Help: Drag some text into a Textfield   -   Marnaud
    Re: Help: Drag some text into a Textfield   -   Tim Jones
     Re: Help: Drag some text into a Textfield   -   Lennox Jacob
    Re: Help: Drag some text into a Textfield   -   norman xojo.com
    Re: Help: Drag some text into a Textfield   -   Tim Jones
     Re: Help: Drag some text into a Textfield   -   Lennox Jacob
    Re: Help: Drag some text into a Textfield   -   Garth Hjelte
     Stumper question - Leopard Crashes   -   Garth Hjelte
    Re: Help: Drag some text into a Textfield   -   Peter K. Stys
     Re: Help: Drag some text into a Textfield (Solved)   -   Lennox Jacob
    Re: Help: Drag some text into a Textfield   -   Jim McKay
    Re: Help: Drag some text into a Textfield   -   Roger Clary
    Re: Help: Drag some text into a Textfield   -   Roger Clary
     Re: Help: Drag some text into a Textfield   -   Lennox Jacob
    Re: Help: Drag some text into a Textfield   -   Jim McKay
    Re: Help: Drag some text into a Textfield   -   Tim Jones
    Re: Help: Drag some text into a Textfield   -   Jim McKay
    Re: Help: Drag some text into a Textfield   -   Jim McKay
    Re: Help: Drag some text into a Textfield   -   Roger Clary
     Re: Help: Drag some text into a Textfield   -   Lennox Jacob
      RE: Help: Drag some text into a Textfield   -   Dorsey, Jeremy
       Re: Help: Drag some text into a Textfield   -   Lennox Jacob
    Re: Help: Drag some text into a Textfield   -   Roger Clary
     Re: Help: Drag some text into a Textfield   -   Lennox Jacob
    Re: Help: Drag some text into a Textfield   -   Lennox Jacob
     Re: Help: Drag some text into a Textfield   -   Massimiliano Fabbri
      Re: Help: Drag some text into a Textfield   -   Lennox Jacob

Re: Help: Drag some text into a Textfield
Date: 01.08.13 18:14 (Thu, 1 Aug 2013 10:14:46 -0700 (PDT))
From: Lennox Jacob
Yes, it is text, it can paste but not accepting dragged text
I opened openOffice.Org opened a Text document, typed some text then tried dragging text from there, it just does not work.
Lennox

________________________________
From: Garth Hjelte <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Thursday, August 1, 2013 11:51 AM
Subject: Re: Help: Drag some text into a Textfield

At 11:17 AM 8/1/2013, you wrote:

>Could you send me the working project, I tried what you recommended but still I cannot get it to work.

Are you SURE that what you are dragging (or pasting) is actual TEXT? Just checking.

It's fairly common but not usual where I have a customer telling me they can't paste in to a text field; usually the reason is that what they are pasting is not TEXT internally but RTF or HTML in the clipboard, which is certain cases or other are not thought of as TEXT and thus the textfield doesn't react.

I can imagine the default of Text Editor of RTF on Mac may contribute to this, but I could be wrong. Just guessing for you. That may be why no one can replicate your issue.

Garth Hjelte
Sampler User

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Help: Drag some text into a Textfield
Date: 28.07.13 21:08 (Sun, 28 Jul 2013 13:08:23 -0700 (PDT))
From: Lennox Jacob
Hello,
I have a textField on a modal window, I would like to drag some text into that Textfield.
How can I do that.
If I add a menubar to the window i can use the keyboard shortcut Command-V or I can select Paste from the Edit Menu and that works fine.
Thanks.
Lennox
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 21:58 (Thu, 01 Aug 2013 22:58:43 +0200)
From: Marnaud
Le 1 août 2013 à 22:38, Roger Clary a écrit:

> In response to this thread, I can create a simple project with Xojo 2013r2 in which you can drop text on a textField in a Modal window, called with showModal, without ANY additional code. No code in TextField.Open, no code in TextField.DropObject.
> The answer may be to upgrade to Xojo 2013.

Le 1 août 2013 à 22:51, Roger Clary a écrit:

> I can't explain completely why, but here's what's happening. You are calling your modal window from the App.Open event though your default window is your main window. Somehow, this is blocking normal functions from occurring.

I'd just say that, in RB2011r4, just changing the ShowModal call to ShowModal also gets rid of the problem. This is also what's happening.
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 22:37 (Thu, 1 Aug 2013 14:37:59 -0700 (PDT))
From: Lennox Jacob
Thanks Marnaud,
I will work with that.
Lennox

________________________________
From: Marnaud <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Thursday, August 1, 2013 3:58 PM
Subject: Re: Help: Drag some text into a Textfield


Le 1 août 2013 à 22:38, Roger Clary a écrit:

> In response to this thread, I can create a simple project with Xojo 2013r2 in which you can drop text on a textField in a Modal window, called with showModal, without ANY additional code. No code in TextField.Open, no code in TextField.DropObject.
> The answer may be to upgrade to Xojo 2013.

Le 1 août 2013 à 22:51, Roger Clary a écrit:

> I can't explain completely why, but here's what's happening. You are calling your modal window from the App.Open event though your default window is your main window. Somehow, this is blocking normal functions from occurring.

I'd just say that, in RB2011r4, just changing the ShowModal call to ShowModal also gets rid of the problem. This is also what's happening.
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 21:51 (Thu, 1 Aug 2013 16:51:33 -0400)
From: Roger Clary

On Aug 1, 2013, at 4:38 PM, Roger Clary <<email address removed>> wrote:

>>> The same code in a blank project works, but in his project it doesn't.
>>
>> Ok, I've found the problem, which is reproducible (tried in RB 2011, as it's the version I had open). If you show a window using ShowModal (which Lennox is doing), then you can't drop text on the text fields of that window; if you change that to Show (or use implicit instance or app's default window), it works fine.
>> That's my answer, Lennox: instead of calling ShowModal, you may instead just use Show and handle the remaining window(s) when your first window is closed (e.g. put the code in the push button).
>
> In response to this thread, I can create a simple project with Xojo 2013r2 in which you can drop text on a textField in a Modal window, called with showModal, without ANY additional code. No code in TextField.Open, no code in TextField.DropObject.
> The answer may be to upgrade to Xojo 2013.

Lennox…
I can't explain completely why, but here's what's happening. You are calling your modal window from the App.Open event though your default window is your main window. Somehow, this is blocking normal functions from occurring.
Instead, let your Main Window open normally as the default window to your app. Put a timer in your Main Window and, in the timer's action event, call your reg window showModal. Now drag and drop works as expected with no additional code.


Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 22:39 (Thu, 1 Aug 2013 14:39:08 -0700 (PDT))
From: Lennox Jacob
Thanks Roger,
I do not want to upgrade as yet, so I will have to work with Marnaud's recommendation.
Thanks again.
Lennox

________________________________
From: Roger Clary <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Thursday, August 1, 2013 3:51 PM
Subject: Re: Help: Drag some text into a Textfield


On Aug 1, 2013, at 4:38 PM, Roger Clary <<email address removed>> wrote:

>>> The same code in a blank project works, but in his project it doesn't.
>>
>> Ok, I've found the problem, which is reproducible (tried in RB 2011, as it's the version I had open). If you show a window using ShowModal (which Lennox is doing), then you can't drop text on the text fields of that window; if you change that to Show (or use implicit instance or app's default window), it works fine.
>> That's my answer, Lennox: instead of calling ShowModal, you may instead just use Show and handle the remaining window(s) when your first window is closed (e.g. put the code in the push button).
>
> In response to this thread, I can create a simple project with Xojo 2013r2 in which you can drop text on a textField in a Modal window, called with showModal, without ANY additional code. No code in TextField.Open, no code in TextField.DropObject.
> The answer may be to upgrade to Xojo 2013.

Lennox…
I can't explain completely why, but here's what's happening. You are calling your modal window from the App.Open event though your default window is your main window. Somehow, this is blocking normal functions from occurring.
Instead, let your Main Window open normally as the default window to your app. Put a timer in your Main Window and, in the timer's action event, call your reg window showModal. Now drag and drop works as expected with no additional code.


Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 23:18 (Thu, 1 Aug 2013 18:18:03 -0400)
From: Roger Clary
On Aug 1, 2013, at 5:39 PM, Lennox Jacob <<email address removed>> wrote:

> Thanks Roger,
> I do not want to upgrade as yet, so I will have to work with Marnaud's recommendation.
> Thanks again.

Did you see my post about how you are calling your show modal? That's the answer and it has nothing to do with which version you are using.

Roger Clary
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 02.08.13 00:25 (Thu, 1 Aug 2013 16:25:52 -0700 (PDT))
From: Lennox Jacob
Yes Roger,

The project I sent was just to show that the modal window was not accepting the dragged text.

The actual app that uses it is more complex than that, and what I actually do is to let the main window instantiate completely then at the end of its open event it calls that modal window to do the final checking of the serial number after the user has entered the serial number.

The serial number is 40 character in length (SHA1) so it is not all that convenient to type it, paste works but drag and drop would have been better.

Using show instead of showmodal is not the best option, so I actually use the showmodal which will allow paste, the user would be informed that paste is allowed.

Thanks again.

Lennox

________________________________
From: Roger Clary <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Thursday, August 1, 2013 5:18 PM
Subject: Re: Help: Drag some text into a Textfield

On Aug 1, 2013, at 5:39 PM, Lennox Jacob <<email address removed>> wrote:

> Thanks Roger,
> I do not want to upgrade as yet, so I will have to work with Marnaud's recommendation.
> Thanks again.

Did you see my post about how you are calling your show modal? That's the answer and it has nothing to do with which version you are using.

Roger Clary
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 21:38 (Thu, 1 Aug 2013 16:38:46 -0400)
From: Roger Clary

On Aug 1, 2013, at 4:11 PM, Marnaud <<email address removed>> wrote:

>> The same code in a blank project works, but in his project it doesn't.
>
> Ok, I've found the problem, which is reproducible (tried in RB 2011, as it's the version I had open). If you show a window using ShowModal (which Lennox is doing), then you can't drop text on the text fields of that window; if you change that to Show (or use implicit instance or app's default window), it works fine.
> That's my answer, Lennox: instead of calling ShowModal, you may instead just use Show and handle the remaining window(s) when your first window is closed (e.g. put the code in the push button).

In response to this thread, I can create a simple project with Xojo 2013r2 in which you can drop text on a textField in a Modal window, called with showModal, without ANY additional code. No code in TextField.Open, no code in TextField.DropObject.
The answer may be to upgrade to Xojo 2013.

Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 21:11 (Thu, 01 Aug 2013 22:11:59 +0200)
From: Marnaud
Le 1 août 2013 à 22:05, Marnaud a écrit:

> The same code in a blank project works, but in his project it doesn't.

Ok, I've found the problem, which is reproducible (tried in RB 2011, as it's the version I had open). If you show a window using ShowModal (which Lennox is doing), then you can't drop text on the text fields of that window; if you change that to Show (or use implicit instance or app's default window), it works fine.
That's my answer, Lennox: instead of calling ShowModal, you may instead just use Show and handle the remaining window(s) when your first window is closed (e.g. put the code in the push button).
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 21:05 (Thu, 01 Aug 2013 22:05:23 +0200)
From: Marnaud
Le 1 août 2013 à 21:13, <email address removed> a écrit:

> Which suggests that the drag type you registered to accept is not whats on the clip board
> Really - get drag peeker or one of the other clip board viewers & see what is REALLY there instead of guessing

Well, I've tried Lennox's example and he's right on one point: the same code in a blank project works, but in his project it doesn't. I'm trying to find something that interfere in his code.
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 20:13 (Thu, 1 Aug 2013 13:13:00 -0600)
From: norman xojo.com

On Aug 1, 2013, at 12:51 PM, Lennox Jacob <<email address removed>> wrote:

> Hi Tim,
> As I drag the text I can see the text being dragged but the textfield does not even accept it, there is no response to that in the debugger.
> Lennox

Which suggests that the drag type you registered to accept is not whats on the clip board
Really - get drag peeker or one of the other clip board viewers & see what is REALLY there instead of guessing

Norman Palardy (Xojo, Inc.)

Join us for XDC 2014 March 26-28
Monte Carlo Resort Las Vegas



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 19:15 (Thu, 01 Aug 2013 20:15:04 +0200)
From: Marnaud
Le 1 août 2013 à 20:10, Tim Jones a écrit:

> On Aug 1, 2013, at 10:58 AM, Lennox Jacob <<email address removed>> wrote:
>
>> Thanks Tim,
>> Text dropped from terminal is not accepted in the built app nor in debug mode.
>> Lennox
>
> But what does the Obj contain? Set a breakpoint at the "If Obj.TextAvailable Then" line and then look at Obj in the debug inspector.

This is, of course, doable if the drag item is first accepted in the window; if the window (or control) has not accepted the correct kind of data, you won't have any drag or drop events.
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 19:10 (Thu, 1 Aug 2013 11:10:44 -0700)
From: Tim Jones
On Aug 1, 2013, at 10:58 AM, Lennox Jacob <<email address removed>> wrote:

> Thanks Tim,
> Text dropped from terminal is not accepted in the built app nor in debug mode.
> Lennox

But what does the Obj contain? Set a breakpoint at the "If Obj.TextAvailable Then" line and then look at Obj in the debug inspector.

Tim

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 19:51 (Thu, 1 Aug 2013 11:51:23 -0700 (PDT))
From: Lennox Jacob
Hi Tim,
As I drag the text I can see the text being dragged but the textfield does not even accept it, there is no response to that in the debugger.
Lennox

________________________________
From: Tim Jones <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Thursday, August 1, 2013 1:10 PM
Subject: Re: Help: Drag some text into a Textfield


On Aug 1, 2013, at 10:58 AM, Lennox Jacob <<email address removed>> wrote:

> Thanks Tim,
> Text dropped from terminal is not accepted in the built app nor in debug mode.
> Lennox

But what does the Obj contain?  Set a breakpoint at the "If Obj.TextAvailable Then" line and then look at Obj in the debug inspector.

Tim

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 18:53 (Thu, 1 Aug 2013 11:53:32 -0600)
From: norman xojo.com

On Aug 1, 2013, at 11:14 AM, Lennox Jacob <<email address removed>> wrote:

> Yes, it is text, it can paste but not accepting dragged text
> I opened openOffice.Org opened a Text document, typed some text then tried dragging text from there, it just does not work.
> Lennox
>

I'd double check what IS on the clip board with drag peeker or something that can show you the types & data that are on the drag clipboard
You might be surprised

Norman Palardy (Xojo, Inc.)

Join us for XDC 2014 March 26-28
Monte Carlo Resort Las Vegas



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 18:23 (Thu, 1 Aug 2013 10:23:55 -0700)
From: Tim Jones
On Aug 1, 2013, at 10:14 AM, Lennox Jacob <<email address removed>> wrote:

> Yes, it is text, it can paste but not accepting dragged text
> I opened openOffice.Org opened a Text document, typed some text then tried dragging text from there, it just does not work.
> Lennox

What if you open a Terminal, type some text there and select and drag that text? OpenOffice uses RTF as its internal document structure, so what you may be dragging is RTF, not plain text. Also, you might want to debug your code at the DropObject event and see if the app thinks that what you're dragging is text.

Tim

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 18:58 (Thu, 1 Aug 2013 10:58:28 -0700 (PDT))
From: Lennox Jacob
Thanks Tim,
Text dropped from terminal is not accepted in the built app nor in debug mode.
Lennox

________________________________
From: Tim Jones <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Thursday, August 1, 2013 12:23 PM
Subject: Re: Help: Drag some text into a Textfield


On Aug 1, 2013, at 10:14 AM, Lennox Jacob <<email address removed>> wrote:

> Yes, it is text, it can paste but not accepting dragged text
> I opened openOffice.Org opened a Text document, typed some text then tried dragging text from there, it just does not work.
> Lennox

What if you open a Terminal, type some text there and select and drag that text?  OpenOffice uses RTF as its internal document structure, so what you may be dragging is RTF, not plain text.  Also, you might want to debug your code at the DropObject event and see if the app thinks that what you're dragging is text.

Tim

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 17:51 (Thu, 01 Aug 2013 11:51:35 -0500)
From: Garth Hjelte
At 11:17 AM 8/1/2013, you wrote:

>Could you send me the working project, I tried what you recommended but still I cannot get it to work.

Are you SURE that what you are dragging (or pasting) is actual TEXT? Just checking.

It's fairly common but not usual where I have a customer telling me they can't paste in to a text field; usually the reason is that what they are pasting is not TEXT internally but RTF or HTML in the clipboard, which is certain cases or other are not thought of as TEXT and thus the textfield doesn't react.

I can imagine the default of Text Editor of RTF on Mac may contribute to this, but I could be wrong. Just guessing for you. That may be why no one can replicate your issue.

Garth Hjelte
Sampler User

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 04.08.13 00:23 (Sat, 3 Aug 2013 19:23:43 -0400)
From: Peter K. Stys
Lennox,

before you tear too much of your hair out, there is a bug in TextFields
that prevented me from drag-dropping folderItems into them. I suspect Text
objects may have the same problem. I posted on this a while ago. A glaring
bug IMHO. RB2012r2.1. Don't know about xojo.

Peter.


On Thu, Aug 1, 2013 at 2:51 PM, Lennox Jacob <<email address removed>> wrote:

> Hi Tim,
> As I drag the text I can see the text being dragged but the textfield does
> not even accept it, there is no response to that in the debugger.
> Lennox
>
> ________________________________
> From: Tim Jones <<email address removed>>
> To: Realbasic NUG <<email address removed>>
> Sent: Thursday, August 1, 2013 1:10 PM
> Subject: Re: Help: Drag some text into a Textfield
>
> On Aug 1, 2013, at 10:58 AM, Lennox Jacob <<email address removed>> wrote:
>
> > Thanks Tim,
> > Text dropped from terminal is not accepted in the built app nor in debug
> mode.
> > Lennox
>
> But what does the Obj contain? Set a breakpoint at the "If
> Obj.TextAvailable Then" line and then look at Obj in the debug inspector.
>
> Tim
>
> _______________________________________________
> Unsubscribe by sending a message to:
> <<email address removed>>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
> _______________________________________________
> Unsubscribe by sending a message to:
> <<email address removed>>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 02.08.13 01:57 (Thu, 1 Aug 2013 17:57:05 -0700)
From: Jim McKay
I just noticed this a Carbon project, so my workaround doesn't work. Yours does.. so it's the fact that it's in the app.open event that's causing problems. Cocoa doesn't seem to have this problem at all...

On Aug 1, 2013, at 5:40 PM, Roger Clary wrote:

> Apparently my earlier response did not make it to the whole list. That is exactly the solution I proposed and, yes, when you DON'T call show modal from the App.Open, but rather from a timer within the main window, drag and drop of text works as expected.

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 02.08.13 01:56 (Thu, 1 Aug 2013 20:56:11 -0400)
From: Roger Clary

On Aug 1, 2013, at 8:35 PM, Jim McKay <<email address removed>> wrote:

> So the bug is in AcceptTextDrop not working when the window is shown with showmodal. Frame type doesn't seem to matter..

>From my testing, ONLY when the showModal is called from the App.Open event as in Lennox's project. When called as previously stated from a timer in the main Screen, the text drop works with ShowModal with no additional code (in Xojo) No need to add AcceptTextDrop to any event.

Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 02.08.13 01:40 (Thu, 1 Aug 2013 20:40:12 -0400)
From: Roger Clary

On Aug 1, 2013, at 7:43 PM, Tim Jones <<email address removed>> wrote:

>> It's the same in Xojo 2013r2. ShowModal prevents the window's .open event from firing. I think that might be a bug though..
>
> Jim - please explain why you think that this would be a bug. If I open another window using ShowModal in a window's Open event, that Open event will pause until the shown window exits. That is the purpose of ShowModal.
>
> What needs to happen is a timer with a period of 2000 should be created on the main window that is set to Modein the main window's Open event if the license window needs to be displayed. That will allow the app to continue with the starting sequence while displaying the license window modally if required.
>
> Lennox, what if you try that? Does the textfield accept the drop then?

Apparently my earlier response did not make it to the whole list. That is exactly the solution I proposed and, yes, when you DON'T call show modal from the App.Open, but rather from a timer within the main window, drag and drop of text works as expected.

Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 02.08.13 01:47 (Thu, 1 Aug 2013 17:47:43 -0700 (PDT))
From: Lennox Jacob
Yes Roger, 

That is what I am doing now (and earlier), and drag and drop works, but I am having some other problems that I am trying to sort out now.

This seems to be the best option but I am working on some other issues.

Lennox

________________________________
From: Roger Clary <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Thursday, August 1, 2013 7:40 PM
Subject: Re: Help: Drag some text into a Textfield


On Aug 1, 2013, at 7:43 PM, Tim Jones <<email address removed>> wrote:

>> It's the same in Xojo 2013r2. ShowModal prevents the window's .open event from firing. I think that might be a bug though..
>
> Jim - please explain why you think that this would be a bug.  If I open another window using ShowModal in a window's Open event, that Open event will pause until the shown window exits.  That is the purpose of ShowModal.
>
> What needs to happen is a timer with a period of 2000 should be created on the main window that is set to Mode=1 in the main window's Open event if the license window needs to be displayed.  That will allow the app to continue with the starting sequence while displaying the license window modally if required.
>
> Lennox, what if you try that?  Does the textfield accept the drop then?

Apparently my earlier response did not make it to the whole list. That is exactly the solution I proposed and, yes, when you DON'T call show modal from the App.Open, but rather from a timer within the main window, drag and drop of text works as expected.

Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 02.08.13 01:35 (Thu, 1 Aug 2013 17:35:30 -0700)
From: Jim McKay

On Aug 1, 2013, at 4:43 PM, Tim Jones wrote:

> On Aug 1, 2013, at 4:29 PM, Jim McKay <<email address removed>> wrote:
>
>> It's the same in Xojo 2013r2. ShowModal prevents the window's .open event from firing. I think that might be a bug though..
>
> Jim - please explain why you think that this would be a bug. If I open another window using ShowModal in a window's Open event, that Open event will pause until the shown window exits. That is the purpose of ShowModal.
>

My mistake. The Open events are firing, but accepttextdrop does nothing. Registering with the MBS plugin call does work.. me.NSTextFieldMBS.registerForDraggedTypes(array("TEXT"))
So the bug is in AcceptTextDrop not working when the window is shown with showmodal. Frame type doesn't seem to matter..

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 02.08.13 00:43 (Thu, 1 Aug 2013 16:43:46 -0700)
From: Tim Jones
On Aug 1, 2013, at 4:29 PM, Jim McKay <<email address removed>> wrote:

> It's the same in Xojo 2013r2. ShowModal prevents the window's .open event from firing. I think that might be a bug though..

Jim - please explain why you think that this would be a bug. If I open another window using ShowModal in a window's Open event, that Open event will pause until the shown window exits. That is the purpose of ShowModal.

What needs to happen is a timer with a period of 2000 should be created on the main window that is set to Modein the main window's Open event if the license window needs to be displayed. That will allow the app to continue with the starting sequence while displaying the license window modally if required.

Lennox, what if you try that? Does the textfield accept the drop then?

Tim

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 02.08.13 00:41 (Thu, 1 Aug 2013 16:41:00 -0700)
From: Jim McKay
Just use show, and then in the open of the textfield
me.AcceptTextDrop
self.ShowModal
and you will have droppable text and the modal behavior you want.

better yet, in CheckSharewareStatus

MyAppRegWin.show //instanciate the window so the open events run
MyAppRegWin.ShowModal // get the modal behavior, ie. block until the window closes


On Aug 1, 2013, at 4:25 PM, Lennox Jacob wrote:

> Using show instead of showmodal is not the best option, so I actually use the showmodal which will allow paste, the user would be informed that paste is allowed.

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 02.08.13 00:29 (Thu, 1 Aug 2013 16:29:37 -0700)
From: Jim McKay
It's the same in Xojo 2013r2. ShowModal prevents the window's .open event from firing. I think that might be a bug though..

Jim McKay
piDog.com

On Aug 1, 2013, at 2:39 PM, Lennox Jacob wrote:

> Thanks Roger,
> I do not want to upgrade as yet, so I will have to work with Marnaud's recommendation.
> Thanks again.
> Lennox
>
>
> ________________________________
> From: Roger Clary <<email address removed>>
> To: Realbasic NUG <<email address removed>>
> Sent: Thursday, August 1, 2013 3:51 PM
> Subject: Re: Help: Drag some text into a Textfield
>
>
>
> On Aug 1, 2013, at 4:38 PM, Roger Clary <<email address removed>> wrote:
>
>>>> The same code in a blank project works, but in his project it doesn't.
>>>
>>> Ok, I've found the problem, which is reproducible (tried in RB 2011, as it's the version I had open). If you show a window using ShowModal (which Lennox is doing), then you can't drop text on the text fields of that window; if you change that to Show (or use implicit instance or app's default window), it works fine.
>>> That's my answer, Lennox: instead of calling ShowModal, you may instead just use Show and handle the remaining window(s) when your first window is closed (e.g. put the code in the push button).
>>
>> In response to this thread, I can create a simple project with Xojo 2013r2 in which you can drop text on a textField in a Modal window, called with showModal, without ANY additional code. No code in TextField.Open, no code in TextField.DropObject.
>> The answer may be to upgrade to Xojo 2013.
>
> Lennox…
> I can't explain completely why, but here's what's happening. You are calling your modal window from the App.Open event though your default window is your main window. Somehow, this is blocking normal functions from occurring.
> Instead, let your Main Window open normally as the default window to your app. Put a timer in your Main Window and, in the timer's action event, call your reg window showModal. Now drag and drop works as expected with no additional code.
>
>
>
> Roger Clary
> Class One Software
> <email address removed>
>
>
>
>
> _______________________________________________
> Unsubscribe by sending a message to:
> <<email address removed>>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
> _______________________________________________
> Unsubscribe by sending a message to:
> <<email address removed>>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 03:22 (Wed, 31 Jul 2013 22:22:28 -0400)
From: Roger Clary

On Jul 31, 2013, at 9:18 PM, Lennox Jacob <<email address removed>> wrote:

> Thanks, I have done that already and that works, but in my app it does not work.
>
> The project is a "rock bottom" extract from my real project, just containing the appropriate code, would you like me to send it to you?

Well, given that you now know it does work, start breaking down your project until you find what code you have added to make it not work for you.


Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 04:01 (Wed, 31 Jul 2013 20:01:00 -0700 (PDT))
From: Lennox Jacob
I have broken it down to a bare minimum, no extra code, and just cannot find what the problem is.
Lennox

________________________________
From: Roger Clary <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Wednesday, July 31, 2013 9:22 PM
Subject: Re: Help: Drag some text into a Textfield


On Jul 31, 2013, at 9:18 PM, Lennox Jacob <<email address removed>> wrote:

> Thanks, I have done that already and that works, but in my app it does not work.

> The project is a "rock bottom" extract from my real project, just containing the appropriate code, would you like me to send it to you?

Well, given that you now know it does work, start breaking down your project until you find what code you have added to make it not work for you.


Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

RE: Help: Drag some text into a Textfield
Date: 01.08.13 16:24 (Thu, 1 Aug 2013 15:24:29 +0000)
From: Dorsey, Jeremy
In the open event on the textfield:
me.accepttextdrop

On the DropObject event on the textfield you'll need:
if obj.TextAvailable then
me.Text = obj.Text
end if

I was able to get it to work in your sample program using that code. I copied your "registration string" and dropped it and it worked.

I tested in RS2012R2.1
Jeremy

-----Original Message-----
From: <email address removed> [mailto:<email address removed>] On Behalf Of Lennox Jacob
Sent: Wednesday, July 31, 2013 11:01 PM
To: Realbasic NUG
Subject: Re: Help: Drag some text into a Textfield

I have broken it down to a bare minimum, no extra code, and just cannot find what the problem is.
Lennox

________________________________
From: Roger Clary <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Wednesday, July 31, 2013 9:22 PM
Subject: Re: Help: Drag some text into a Textfield


On Jul 31, 2013, at 9:18 PM, Lennox Jacob <<email address removed>> wrote:

> Thanks, I have done that already and that works, but in my app it does not work.

> The project is a "rock bottom" extract from my real project, just containing the appropriate code, would you like me to send it to you?

Well, given that you now know it does work, start breaking down your project until you find what code you have added to make it not work for you.


Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 17:17 (Thu, 1 Aug 2013 09:17:23 -0700 (PDT))
From: Lennox Jacob
Hi Jeremy,

Could you send me the working project, I tried what you recommended but still I cannot get it to work.

I am using RS2012R2.1 on 
Mac OSX 10.8.4 on MacMini Late 2012
Processor  2.3 GHz Intel Core i7    
Memory  16 GB 1600 MHz DDR3  and RS 2012 R2.1

Thanks.

Lennox

________________________________
From: "Dorsey, Jeremy" <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Thursday, August 1, 2013 10:24 AM
Subject: RE: Help: Drag some text into a Textfield


In the open event on the textfield:
    me.accepttextdrop

On the DropObject event on the textfield you'll need:
      if obj.TextAvailable then
        me.Text = obj.Text
      end if

I was able to get it to work in your sample program using that code.  I copied your "registration string" and dropped it and it worked. 

I tested in RS2012R2.1
Jeremy

-----Original Message-----
From: <email address removed> [mailto:<email address removed>] On Behalf Of Lennox Jacob
Sent: Wednesday, July 31, 2013 11:01 PM
To: Realbasic NUG
Subject: Re: Help: Drag some text into a Textfield

I have broken it down to a bare minimum, no extra code, and just cannot find what the problem is.
Lennox

________________________________
From: Roger Clary <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Wednesday, July 31, 2013 9:22 PM
Subject: Re: Help: Drag some text into a Textfield


On Jul 31, 2013, at 9:18 PM, Lennox Jacob <<email address removed>> wrote:

> Thanks, I have done that already and that works, but in my app it does not work.

> The project is a "rock bottom" extract from my real project, just containing the appropriate code, would you like me to send it to you?

Well, given that you now know it does work, start breaking down your project until you find what code you have added to make it not work for you.


Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 02:00 (Wed, 31 Jul 2013 21:00:28 -0400)
From: Roger Clary

On Jul 31, 2013, at 8:43 PM, Lennox Jacob <<email address removed>> wrote:

> Thanks, but that does not work...
> The project can be downloaded from http://www.mediafire.com/?zac43eahlzzc64a
>
I'm not interested in jumping through the hoops at mediafire to DL your project, but do this…

(Using Xojo 2013r2)
Create a new project
Create a Window
Put a button to open a modal window
In the modal window, put a single textField.

Run the app. Press the button to open the modal window. Select some text from any other app. Drag it to your textfield. The text should appear as dragged. Nothing else need be added to your project.
What behavior are you seeing?

Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 02:18 (Wed, 31 Jul 2013 18:18:56 -0700 (PDT))
From: Lennox Jacob
Hi Roger,

Thanks, I have done that already and that works, but in my app it does not work.
 
The project is a "rock bottom" extract from my real project, just containing the appropriate code, would you like me to send it to you?

Thanks.

Lennox

________________________________
From: Roger Clary <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Wednesday, July 31, 2013 8:00 PM
Subject: Re: Help: Drag some text into a Textfield


On Jul 31, 2013, at 8:43 PM, Lennox Jacob <<email address removed>> wrote:

> Thanks, but that does not work...
> The project can be downloaded from http://www.mediafire.com/?zac43eahlzzc64a
>
I'm not interested in jumping through the hoops at mediafire to DL your project, but do this…

(Using Xojo 2013r2)
Create a new project
Create a Window
Put a button to open a modal window
In the modal window, put a single textField.

Run the app. Press the button to open the modal window. Select some text from any other app. Drag it to your textfield. The text should appear as dragged. Nothing else need be added to your project.
What behavior are you seeing?

Roger Clary
Class One Software
<email address removed>



_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 31.07.13 18:45 (Wed, 31 Jul 2013 10:45:45 -0700 (PDT))
From: Lennox Jacob
The project can be downloaded from http://www.mediafire.com/?zac43eahlzzc64a

Lennox

________________________________
From: Lennox Jacob <<email address removed>>
To: REALbasic NUG <<email address removed>>
Sent: Sunday, July 28, 2013 3:08 PM
Subject: Help: Drag some text into a Textfield


Hello,
I have a textField on a modal window, I would like to drag some text into that Textfield.
How can I do that.
If I add a menubar to the window i can use the keyboard shortcut Command-V or I can select Paste from the Edit Menu and that works fine.
Thanks.
Lennox
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe by sending a message to:
<<email address removed>>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 31.07.13 22:34 (Wed, 31 Jul 2013 23:34:59 +0200)
From: Massimiliano Fabbri
Into destination textfiled open event: me.AcceptTextDrop
drag any text into, the system will paste accordingly.

Il 31/07/13 19:45, Lennox Jacob ha scritto:
> The project can be downloaded from http://www.mediafire.com/?zac43eahlzzc64a
>
> Lennox
>
> ________________________________
> From: Lennox Jacob <<email address removed>>
> To: REALbasic NUG <<email address removed>>
> Sent: Sunday, July 28, 2013 3:08 PM
> Subject: Help: Drag some text into a Textfield
>
> Hello,
> I have a textField on a modal window, I would like to drag some text into that Textfield.
> How can I do that.
> If I add a menubar to the window i can use the keyboard shortcut Command-V or I can select Paste from the Edit Menu and that works fine.
> Thanks.
> Lennox
> _______________________________________________
> Unsubscribe by sending a message to:
> <<email address removed>>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
> _______________________________________________
> Unsubscribe by sending a message to:
> <<email address removed>>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

Re: Help: Drag some text into a Textfield
Date: 01.08.13 01:43 (Wed, 31 Jul 2013 17:43:09 -0700 (PDT))
From: Lennox Jacob
Thanks, but that does not work...
The project can be downloaded from http://www.mediafire.com/?zac43eahlzzc64a

Lennox

________________________________
From: Massimiliano Fabbri <<email address removed>>
To: Realbasic NUG <<email address removed>>
Sent: Wednesday, July 31, 2013 4:34 PM
Subject: Re: Help: Drag some text into a Textfield


Into destination textfiled open event: me.AcceptTextDrop
drag any text into, the system will paste accordingly.

Il 31/07/13 19:45, Lennox Jacob ha scritto:
> The project can be downloaded from http://www.mediafire.com/?zac43eahlzzc64a
>
> Lennox
>
> ________________________________
>  From: Lennox Jacob <<email address removed>>
> To: REALbasic NUG <<email address removed>>
> Sent: Sunday, July 28, 2013 3:08 PM
> Subject: Help: Drag some text into a Textfield

>
> Hello,
> I have a textField on a modal window, I would like to drag some text into that Textfield.
> How can I do that.
> If I add a menubar to the window i can use the keyboard shortcut Command-V or I can select Paste from the Edit Menu and that works fine.
> Thanks.
> Lennox
> _______________________________________________
> Unsubscribe by sending a message to:
> <<email address removed>>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
> _______________________________________________
> Unsubscribe by sending a message to:
> <<email address removed>>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>

--