Xojo Conferences
XDCMay2019MiamiUSA

Help please: How to undo? (Real Studio getting started Mailinglist archive)

Back to the thread list
Previous thread: What is the Windows System Font
Next thread: Bevelbutton menu woes


RB Database   -   tom.russell transport.alstom.com
  Help please: How to undo?   -   Lennox Jacob
   Re: Help please: How to undo?   -   Arnaud Nicolet
    Re: Help please: How to undo?   -   Lennox Jacob
    Re: Help please: How to undo?   -   Lennox Jacob
     Re: Help please: How to undo?   -   Arnaud Nicolet
      Re: Help please: How to undo?   -   Lennox Jacob
       Re: Help please: How to undo?   -   Arnaud Nicolet
        Re: Help please: How to undo?   -   Lennox Jacob

Help please: How to undo?
Date: 01.02.07 01:39 (Wed, 31 Jan 2007 16:39:58 -0800 (PST))
From: Lennox Jacob
Hello,
I have an editfield with some text in it. Then I change (select then Enter) some of the text. I now want to Undo that.
I have a pushbutton named Undo, what do I put in Undo pushbutton's action event?
Thanks.
Lennox

---------------------------------
Never Miss an Email
Stay connected with Yahoo! Mail on your mobile. Get started!
_______________________________________________
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: Help please: How to undo?
Date: 01.02.07 10:21 (Thu, 1 Feb 2007 10:21:09 +0100)
From: Arnaud Nicolet
You'll have to remember the text at a certain point.

Make a property in your window, for example: MyLastText As String

Then, for the example, put this code in the open event (when the text
you want as the default is in the edit field):

MyLastText=me.text

In your push button, write EF1.text=MyLastText (assuming your
editfield is named EF1).

Hope this help

Le 1 févr. 07 à 01:39 Matin, Lennox Jacob a écrit:

> Hello,
> I have an editfield with some text in it. Then I change (select
> then Enter) some of the text. I now want to Undo that.
> I have a pushbutton named Undo, what do I put in Undo pushbutton's
> action event?
> Thanks.
> Lennox

_______________________________________________
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: Help please: How to undo?
Date: 01.02.07 13:24 (Thu, 1 Feb 2007 04:24:40 -0800 (PST))
From: Lennox Jacob
Thanks as usual Arnaud,
At least this is a good starting point.
Lennox.

Arnaud Nicolet <<email address removed>> wrote: You'll have to remember the text at a certain point.

Make a property in your window, for example: MyLastText As String

Then, for the example, put this code in the open event (when the text
you want as the default is in the edit field):

MyLastText=me.text

In your push button, write EF1.text=MyLastText (assuming your
editfield is named EF1).

Hope this help

Le 1 févr. 07 à 01:39 Matin, Lennox Jacob a écrit:

> Hello,
> I have an editfield with some text in it. Then I change (select
> then Enter) some of the text. I now want to Undo that.
> I have a pushbutton named Undo, what do I put in Undo pushbutton's
> action event?
> Thanks.
> Lennox

_______________________________________________
Unsubscribe or switch delivery mode:

Search the archives of this list here:



---------------------------------
Don't be flakey. Get Yahoo! Mail for Mobile and
always stay connected to friends.
_______________________________________________
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: Help please: How to undo?
Date: 01.02.07 13:48 (Thu, 1 Feb 2007 04:48:50 -0800 (PST))
From: Lennox Jacob
Hi Arnaud,

I did not put it in the Open event, but I put it in the Activate and got focus events.

The activate event for opening an existing document and the got focus for changes in an already open document.

Works great.

Lennox.

Arnaud Nicolet <<email address removed>> wrote: You'll have to remember the text at a certain point.

Make a property in your window, for example: MyLastText As String

Then, for the example, put this code in the open event (when the text
you want as the default is in the edit field):

MyLastText=me.text

In your push button, write EF1.text=MyLastText (assuming your
editfield is named EF1).

Hope this help

Le 1 févr. 07 à 01:39 Matin, Lennox Jacob a écrit:

> Hello,
> I have an editfield with some text in it. Then I change (select
> then Enter) some of the text. I now want to Undo that.
> I have a pushbutton named Undo, what do I put in Undo pushbutton's
> action event?
> Thanks.
> Lennox

_______________________________________________
Unsubscribe or switch delivery mode:

Search the archives of this list here:



---------------------------------
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.
_______________________________________________
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: Help please: How to undo?
Date: 01.02.07 15:37 (Thu, 1 Feb 2007 15:37:02 +0100)
From: Arnaud Nicolet
Hi Lennox,

By doing so, you have to be aware of a fact (if it's relevant for
what you're doing).

If you change your text, then simply switch to the Finder to make
anything and then switch back, the remembered text will be the one
after the switch (because the Activate event is called not only when
a document is opened, but also when the window is simply brought to
the front).
Same fact apply if you simply move to another edit field (assuming
there is more than one) and then come back to your target edit field.

> The activate event for opening an existing document

I think it'll be more reliable to do it in the same method where you
open your document (maybe just call another function).

> and the got focus for changes in an already open document.

You're certainly doing something I don't understand here.

Hope this helps

Le 1 févr. 07 à 13:48 Soir, Lennox Jacob a écrit:

> Hi Arnaud,
>
> I did not put it in the Open event, but I put it in the Activate
> and got focus events.
>
> The activate event for opening an existing document and the got
> focus for changes in an already open document.
>
> Works great.
>
> Lennox.
>
> Arnaud Nicolet <<email address removed>> wrote: You'll have to remember the
> text at a certain point.
>
> Make a property in your window, for example: MyLastText As String
>
> Then, for the example, put this code in the open event (when the text
> you want as the default is in the edit field):
>
> MyLastText=me.text
>
> In your push button, write EF1.text=MyLastText (assuming your
> editfield is named EF1).
>
> Hope this help
>
> Le 1 févr. 07 à 01:39 Matin, Lennox Jacob a écrit:
>
>> Hello,
>> I have an editfield with some text in it. Then I change (select
>> then Enter) some of the text. I now want to Undo that.
>> I have a pushbutton named Undo, what do I put in Undo pushbutton's
>> action event?
>> Thanks.
>> Lennox
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
>
> Search the archives of this list here:
>
> ---------------------------------
> Never miss an email again!
> Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out.
> _______________________________________________
> 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>

_______________________________________________
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: Help please: How to undo?
Date: 01.02.07 17:12 (Thu, 1 Feb 2007 08:12:00 -0800 (PST))
From: Lennox Jacob
Hi Arnaud,

By doing so, you have to be aware of a fact (if it's relevant for
what you're doing).

If you change your text, then simply switch to the Finder to make
anything and then switch back, the remembered text will be the one
after the switch (because the Activate event is called not only when
a document is opened, but also when the window is simply brought to
the front).
Same fact apply if you simply move to another edit field (assuming
there is more than one) and then come back to your target edit field.

By doing so, you have to be aware of a fact (if it's relevant for
what you're doing).

If you change your text, then simply switch to the Finder to make
anything and then switch back, the remembered text will be the one
after the switch (because the Activate event is called not only when
a document is opened, but also when the window is simply brought to
the front).
Same fact apply if you simply move to another edit field (assuming
there is more than one) and then come back to your target edit field.

> The activate event for opening an existing document

I think it'll be more reliable to do it in the same method where you
open your document (maybe just call another function).
I realized that and had corrected it before reading your post, thanks still.

>> and the got focus for changes in an already open document.
>You're certainly doing something I don't understand here.

OK, what happens here is that I do not know how to do undo multiple times (any advice?).
So, I use got focus to remember the text before I do further changes. Then, if I make some more changes (and once I do not lose focus), Undo will take me back to the point before i got focus.

Works for me for now until I become more proficient.

Lennox





---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.
_______________________________________________
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: Help please: How to undo?
Date: 01.02.07 18:02 (Thu, 1 Feb 2007 18:02:02 +0100)
From: Arnaud Nicolet
Le 1 févr. 07 à 17:12 Soir, Lennox Jacob a écrit:

> OK, what happens here is that I do not know how to do undo multiple
> times (any advice?).

You will have to have an array instead of a simple variable.
Like MyTexts() As String

Then, every time you want to remember the text, you add the text to
the array.
When you want to make the undo, you set the text back to the last
item of your array. You then remove it (so further undos works as well).
You may try in that way (remember that you can always try with a
small (and unsaved project) to make tests that behaves as you want).

> So, I use got focus to remember the text before I do further
> changes. Then, if I make some more changes (and once I do not lose
> focus), Undo will take me back to the point before i got focus.

If it's good for you, then that's fine.

Hope this helps.
_______________________________________________
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: Help please: How to undo?
Date: 01.02.07 18:11 (Thu, 1 Feb 2007 09:11:59 -0800 (PST))
From: Lennox Jacob
Thanks Arnaud,
I'll try it (multiple undo via an array).
Thanks again.
Lennox

Arnaud Nicolet <<email address removed>> wrote: Le 1 févr. 07 à 17:12 Soir, Lennox Jacob a écrit:

> OK, what happens here is that I do not know how to do undo multiple
> times (any advice?).

You will have to have an array instead of a simple variable.
Like MyTexts() As String

Then, every time you want to remember the text, you add the text to
the array.
When you want to make the undo, you set the text back to the last
item of your array. You then remove it (so further undos works as well).
You may try in that way (remember that you can always try with a
small (and unsaved project) to make tests that behaves as you want).

> So, I use got focus to remember the text before I do further
> changes. Then, if I make some more changes (and once I do not lose
> focus), Undo will take me back to the point before i got focus.

If it's good for you, then that's fine.

Hope this helps.
_______________________________________________
Unsubscribe or switch delivery mode:

Search the archives of this list here:



---------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.
_______________________________________________
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>