Xojo Conferences
XDCMay2019MiamiUSA

Dim x As New EditField questions (Real Studio getting started Mailinglist archive)

Back to the thread list
Previous thread: Listbox CellTextPaint doesn't work...
Next thread: Don ¹ t refresh


RB Database   -   tom.russell transport.alstom.com
  Dim x As New EditField questions   -   Carlos M
   Re: Dim x As New EditField questions   -   CV
   Re: Dim x As New EditField questions   -   Joseph J. Strout
   Re: Dim x As New EditField questions   -   FreeFL

Dim x As New EditField questions
Date: 04.01.06 07:44 (Wed, 4 Jan 2006 06:44:23 -0000)
From: Carlos M
If I use the following

Function foo() As String
Dim ef As New EditField
Dim s As String = "anytext"
ef.Text = s
Return ef.Text
End Function

it works and "anytext" is returned.

Questions:

1. Is it ok to create an EditField or any other control this way? I
presume it's not, but couldn't find an answer for this on the LR or
User's guide.

2. If 1 yes: If instead of line "ef.Text = s" I use the AppendText
method (ef.AppendText s) it does not work. Why?

Carlos

[Win2K - RB2005r4]

_______________________________________________
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: Dim x As New EditField questions
Date: 04.01.06 08:09 (Tue, 3 Jan 2006 23:09:22 -0800)
From: CV

On Jan 3, 2006, at 10:44 PM, Carlos M wrote:

> If I use the following
>
> Function foo() As String
> Dim ef As New EditField
> Dim s As String = "anytext"
> ef.Text = s
> Return ef.Text
> End Function
>
> it works and "anytext" is returned.
>
> Questions:
>
> 1. Is it ok to create an EditField or any other control this way? I
> presume it's not, but couldn't find an answer for this on the LR or
> User's guide.

It is not supported for objects subclassed from RectControl, which
includes editfields, listboxes,.. A Timer, on the other hand, can be
instantiated by New.

>
> 2. If 1 yes: If instead of line "ef.Text = s" I use the AppendText
> method (ef.AppendText s) it does not work. Why?
>

I think that follows from the above. :-)

Best,

Jack
_______________________________________________
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: Dim x As New EditField questions
Date: 04.01.06 18:37 (Wed, 4 Jan 2006 10:37:37 -0700)
From: Joseph J. Strout
At 6:44 AM +0000 1/4/06, Carlos M wrote:

>1. Is it ok to create an EditField or any other control this way?

No. It might sort-of work in some situations, but it's certainly not
supported or recommended.

Best,
- Joe

Re: Dim x As New EditField questions
Date: 05.01.06 09:01 (Thu, 5 Jan 2006 09:01:13 +0100)
From: FreeFL
| 4/01/06 ~ 10:37 -0700 :
| Joseph J. Strout,
| " Re: Dim x As New EditField questions "

>No. It might sort-of work in some situations, but it's certainly
>not supported or recommended.

It is for this kind of answer that i like Realbasic... ;-)

_______________________________________________
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>