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

[RB List] Starting a Thread (Real Studio getting started Mailinglist archive)

Back to the thread list
Previous thread: editField data to be flashing after updating
Next thread: How to make a blinking cursor a chosen EditField upon launch?


RE: [RB List] MouseRightButton ?   -   RBNUBE
  [RB List] Starting a Thread   -   Eirik Karlsen
   RE: [RB List] Starting a Thread   -   Will Brokenbourgh
    Re: [RB List] Starting a Thread   -   Joseph J. Strout
    Re: [RB List] Starting a Thread   -   Eirik Karlsen
    Re: [RB List] Starting a Thread   -   Andrew Keller
     RE: [RB List] Starting a Thread   -   RBNUBE
      Re: [RB List] Starting a Thread   -   Eirik Karlsen
      Re: [RB List] Copy an array   -   Joseph J. Strout
    Re: [RB List] Starting a Thread   -   Stuart Malin
    Re: [RB List] Starting a Thread   -   Terry Ford
    Re: [RB List] Starting a Thread   -   Eirik Karlsen
    Re: [RB List] Starting a Thread   -   Stuart Malin
    Re: [RB List] Starting a Thread   -   Terry Ford
    Re: [RB List] Starting a Thread   -   Terry Ford
    Re: [RB List] Starting a Thread   -   Andrew Keller
    Re: [RB List] Starting a Thread   -   Joseph J. Strout
    Re: [RB List] Starting a Thread   -   Stuart Malin
    Re: [RB List] Starting a Thread   -   Terry Ford
    Re: [RB List] Starting a Thread   -   Joseph J. Strout
    Re: [RB List] Starting a Thread   -   Terry Ford
    Re: [RB List] Starting a Thread   -   Stuart Malin

[RB List] Starting a Thread
Date: 03.02.05 23:43 (Thu, 03 Feb 2005 23:43:11 +0100)
From: Eirik Karlsen
Andrew,
I've been fiddling with the thread stuff this evening but I can't get it to
work.
This is just a very basic test to get a thread running, got nothing to do
with the
timer issue. The thread is just a tight empty loop.

It appears as if the thread is not running (have put a breakpoint in it).

source is here:
<http://home.online.no/~eikarlse/temp/>

See whats wrong?



Andrew Keller wrote:

> > Should be a very simple task, and if I'm not too mistaken I've done a
> > very
> > simple error...
>
> The concept sure is easy, but the error isn't as much. The reason that
> the timer isn't working is that your busy code (the code that sucks all
> the processor time) won't let anything else happen until it's done.
>
> I would put that code in a thread, and not in the window. It's very
> simple. Create a new class, and set it's super to a Thread, and call
> it something meaningful. Then, in the Open event of your window, run
> the thread, like this:
>
> Sub Open()
> Dim t As MyThread
> t = New MyThread
> t.Run
> End Sub
>
> That code will simply run the thread and forget about it. Since you
> want to be able to access the tread later, in the timer, you will want
> to make that variable a property on the window and not a variable in
> the event. The rest of the sample code is the same. It's very simple.
>
> In the timer's Action event, just call it like any other class.
>
> MyThread.WhateverPropertyOrMethod
>
> In order to access variables in the thread, you may want to make the
> variables properties in the thread and not variables in the Run Event.
>
> HTH!
>
> Andrew Keller

RE: [RB List] Starting a Thread
Date: 03.02.05 23:54 (Thu, 3 Feb 2005 14:54:59 -0800)
From: Will Brokenbourgh
Try this:
http://www.aybcomputers.com/real/

Will

-----Original Message-----
From: <email address removed>
[mailto:<email address removed>] On Behalf Of
Eirik Karlsen
Sent: Thursday, February 03, 2005 2:43 PM
To: Getting Started
Subject: [RB List] Starting a Thread

Andrew,
I've been fiddling with the thread stuff this evening but I can't get it
to
work.
This is just a very basic test to get a thread running, got nothing to
do
with the
timer issue. The thread is just a tight empty loop.

It appears as if the thread is not running (have put a breakpoint in
it).

source is here:
<http://home.online.no/~eikarlse/temp/>

See whats wrong?



Andrew Keller wrote:

> > Should be a very simple task, and if I'm not too mistaken I've done
a
> > very
> > simple error...
>
> The concept sure is easy, but the error isn't as much. The reason
that
> the timer isn't working is that your busy code (the code that sucks
all
> the processor time) won't let anything else happen until it's done.
>
> I would put that code in a thread, and not in the window. It's very
> simple. Create a new class, and set it's super to a Thread, and call
> it something meaningful. Then, in the Open event of your window, run
> the thread, like this:
>
> Sub Open()
> Dim t As MyThread
> t = New MyThread
> t.Run
> End Sub
>
> That code will simply run the thread and forget about it. Since you
> want to be able to access the tread later, in the timer, you will want
> to make that variable a property on the window and not a variable in
> the event. The rest of the sample code is the same. It's very
simple.
>
> In the timer's Action event, just call it like any other class.
>
> MyThread.WhateverPropertyOrMethod
>
> In order to access variables in the thread, you may want to make the
> variables properties in the thread and not variables in the Run Event.
>
> HTH!
>
> Andrew Keller

Re: [RB List] Starting a Thread
Date: 03.02.05 23:52 (Thu, 3 Feb 2005 16:52:05 -0600)
From: Joseph J. Strout
At 11:43 PM +0100 2/3/05, Eirik Karlsen wrote:

>It appears as if the thread is not running (have put a breakpoint in it).

Try a different test. Have the thread speak, or increment the number
in a StaticText, or something. Most likely, the debugger is simply
failing to stop at the breakpoint.

HTH,
- Joe

Re: [RB List] Starting a Thread
Date: 04.02.05 00:11 (Fri, 04 Feb 2005 00:11:55 +0100)
From: Eirik Karlsen
Yes I did that.

thread1 / Run code:
'*******************'
'dim i as double
again:
for i to 9999
window1.statictext1.text=str(i)
next i
goto again
'******************

Window / Events / Open code:
'************
Dim t As Thread1
t = New Thread1
t.Run
'************



"Joseph J. Strout" wrote:

> At 11:43 PM +0100 2/3/05, Eirik Karlsen wrote:
>
> >It appears as if the thread is not running (have put a breakpoint in it).
>
> Try a different test. Have the thread speak, or increment the number
> in a StaticText, or something. Most likely, the debugger is simply
> failing to stop at the breakpoint.
>
> HTH,
> - Joe
>
> --
> REAL World 2005 - The REALbasic User Conference
> March 23-25, 2005, Austin, Texas
> <http://www.realsoftware.com/realworld>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> Search the archives of this list here:
> <http://www.realsoftware.com/listarchives/lists.html>

Re: [RB List] Starting a Thread
Date: 04.02.05 05:13 (Thu, 3 Feb 2005 23:13:55 -0500)
From: Andrew Keller
> This is just a very basic test to get a thread running, got nothing to
> do with the timer issue. The thread is just a tight empty loop.
>
> It appears as if the thread is not running (have put a breakpoint in
> it).
>
> source is here:
> <http://home.online.no/~eikarlse/temp/>
> See whats wrong?

Yup. When I implement a thread, I make the thread its own class in the
project window, and in that case, to execute it, you create a new
instance and run it. Since you created the thread as an object on the
window, it is now behaves like a control. In that case, you wouldn't
create a new instance of it; you would just run it. If you really
wanted to create multiple instances of the thread, then you could set
the Index of the thread to 0, and now it is a part of a control array.
You can still run Thread1(0) without making a new one, though, because
Thread1(0) already exists. When making the thread a class, it does
exist until you create a new instance, which is why you need to call
New before you can run it.

Oh, and just so you know, posting the document on the internet turned
out to be an excellent idea! I found the error in about fifteen
seconds, whereas without the document, I would have never thought of it
on my own. :)

- Andrew Keller

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

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

RE: [RB List] Starting a Thread
Date: 04.02.05 10:34 (Fri, 4 Feb 2005 04:34:34 -0500)
From: RBNUBE
True...the only problem with posting files to a web server rather than
posting it to the list is that the details can be lost for those in the
future who search this list through RB's website.


-----Original Message-----
From: <email address removed>
[mailto:<email address removed>] On Behalf Of
Andrew Keller
Sent: Thursday, February 03, 2005 11:14 PM
To: Getting Started
Subject: Re: [RB List] Starting a Thread

> This is just a very basic test to get a thread running, got nothing to
> do with the timer issue. The thread is just a tight empty loop.
>
> It appears as if the thread is not running (have put a breakpoint in
> it).
>
> source is here:
> <http://home.online.no/~eikarlse/temp/>
> See whats wrong?

Yup. When I implement a thread, I make the thread its own class in the
project window, and in that case, to execute it, you create a new
instance and run it. Since you created the thread as an object on the
window, it is now behaves like a control. In that case, you wouldn't
create a new instance of it; you would just run it. If you really
wanted to create multiple instances of the thread, then you could set
the Index of the thread to 0, and now it is a part of a control array.
You can still run Thread1(0) without making a new one, though, because
Thread1(0) already exists. When making the thread a class, it does
exist until you create a new instance, which is why you need to call
New before you can run it.

Oh, and just so you know, posting the document on the internet turned
out to be an excellent idea! I found the error in about fifteen
seconds, whereas without the document, I would have never thought of it
on my own. :)

- Andrew Keller

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

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


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

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

Re: [RB List] Starting a Thread
Date: 04.02.05 20:05 (Fri, 04 Feb 2005 20:05:31 +0100)
From: Eirik Karlsen
This list does'nt have a file upload area does it?
BTW I'd much prefere a list layout like the Yahoo lists,
having upload, photo, file areas.

RBNUBE wrote:

> True...the only problem with posting files to a web server rather than
> posting it to the list is that the details can be lost for those in the
> future who search this list through RB's website.
>

Re: [RB List] Starting a Thread
Date: 04.02.05 16:48 (Fri, 4 Feb 2005 10:48:38 -0500)
From: Stuart Malin

On Feb 3, 2005, at 11:13 PM, Andrew Keller wrote:

>> This is just a very basic test to get a thread running, got nothing
>> to do with the timer issue. The thread is just a tight empty loop.
>>
>> It appears as if the thread is not running (have put a breakpoint in
>> it).
>>
>> source is here:
>> <http://home.online.no/~eikarlse/temp/>
>>
>> See whats wrong?
>
> Yup. When I implement a thread, I make the thread its own class in
> the project window, and in that case, to execute it, you create a new
> instance and run it. Since you created the thread as an object on the
> window, it is now behaves like a control. In that case, you wouldn't
> create a new instance of it; you would just run it. If you really
> wanted to create multiple instances of the thread, then you could set
> the Index of the thread to 0, and now it is a part of a control array.
> You can still run Thread1(0) without making a new one, though,
> because Thread1(0) already exists. When making the thread a class, it
> does exist until you create a new instance, which is why you need to
> call New before you can run it.

I am really confused - perhaps someone can clear this up for me. I
have played a but with this code, and have found that:

If I create the thread as an independent class, then I can call the
threads Run event and it will run.

And, if the thread is "installed" as a control on the window, and I
invoke it by name, as Thread1.Run, then it does run.

But if I do what Erik had done, and create a new instance, it does not
run. Why?

dim t as Thread1
t = new Thread1
t.run

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

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

Re: [RB List] Starting a Thread
Date: 04.02.05 18:23 (Fri, 04 Feb 2005 09:23:55 -0800)
From: Terry Ford

On 4-Feb-05, at 7:48 AM, Stuart Malin wrote:

> I am really confused - perhaps someone can clear this up for me. I
> have played a but with this code, and have found that:
>
> If I create the thread as an independent class, then I can call the
> threads Run event and it will run.
>
> And, if the thread is "installed" as a control on the window, and I
> invoke it by name, as Thread1.Run, then it does run.
>
> But if I do what Erik had done, and create a new instance, it does not
> run. Why?
>
> dim t as Thread1
> t = new Thread1
> t.run

Because it doesn't have an index of 0.

Erik created a control form of thread and one cannot clone controls
unless they have an index value.

BTW, I have never used a tread until this came up. It follows the
rules. Erik's project lacked the class in the project window but he
must have created it and then deleted it. That's my guess.

Terry

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

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

Re: [RB List] Starting a Thread
Date: 04.02.05 20:22 (Fri, 04 Feb 2005 20:22:29 +0100)
From: Eirik Karlsen
Ok, I did it right this time; created a new class and set its super to
thread, and now it runs.
It updates the statictext control about 30.000 times/sec (not really), but
I'm getting the
iteration number transferred to the control anyway...and FAST.

I'll play around a bit with threads and see if they'll do what I want 'em
to.

Thanks all.

Andrew Keller wrote:

> ....o call
> New before you can run it.
>
> Oh, and just so you know, posting the document on the internet turned
> out to be an excellent idea! I found the error in about fifteen
> seconds, whereas without the document, I would have never thought of it
> on my own. :)
>
> - Andrew Keller
>

Re: [RB List] Starting a Thread
Date: 04.02.05 20:42 (Fri, 4 Feb 2005 14:42:50 -0500)
From: Stuart Malin

On Feb 4, 2005, at 12:23 PM, Terry Ford wrote:

>
> On 4-Feb-05, at 7:48 AM, Stuart Malin wrote:
>
>> I am really confused - perhaps someone can clear this up for me. I
>> have played a but with this code, and have found that:
>>
>> If I create the thread as an independent class, then I can call the
>> threads Run event and it will run.
>>
>> And, if the thread is "installed" as a control on the window, and I
>> invoke it by name, as Thread1.Run, then it does run.
>>
>> But if I do what Erik had done, and create a new instance, it does
>> not run. Why?
>>
>> dim t as Thread1
>> t = new Thread1
>> t.run
>
> Because it doesn't have an index of 0.
>
> Erik created a control form of thread and one cannot clone controls
> unless they have an index value.
>
> BTW, I have never used a tread until this came up. It follows the
> rules. Erik's project lacked the class in the project window but he
> must have created it and then deleted it. That's my guess.

Thanks for your comments Terry. Yet I remain befuddled... even if Erik
did what you say... what we have is code that *seems* to define a new
thread, yet it doesn't execute, which *seems* to be to be problematic
:-)

As for indexing, how can this code be modified to become functional?

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

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

Re: [RB List] Starting a Thread
Date: 04.02.05 21:43 (Fri, 04 Feb 2005 12:43:05 -0800)
From: Terry Ford

On 4-Feb-05, at 11:42 AM, Stuart Malin wrote:

> Thanks for your comments Terry. Yet I remain befuddled... even if
> Erik did what you say... what we have is code that *seems* to define a
> new thread, yet it doesn't execute, which *seems* to be to be
> problematic :-)

But it will execute if the Thread1's index is set to some value. Any
value will work even. Actually, it is instantiating a new clone of the
Thread1 (quasi) Control.

Take Erik's posted project and simply add an index of '0' to the timer1
control and it works. It stops at the breakpoint ad-infinitum.

His run code is:

Sub Run()
'dim i as double <-- He changed it to a Property.

again:
for i to 9999// <-- the Breakpoint was here.
'window1.statictext1.text=str(i)
next i
goto again
End Sub

Take out the breakpoint, un-comment the statictext1 line and it runs
forever. Comment out the "again:" and "goto again" and it counts to
999.

> As for indexing, how can this code be modified to become functional?

I don't know as this is my first exposure to threads. I've always done
my things within the main thread but need to learn myself.

What you must remember is that New can be used differently depending on
the object. If it's a control, it wants to create a new one in an
array. If it's a class, then it wants to make a new instance of the
class.

It also makes more sense to me to use threads as classes and *not*
controls although it appears to be possible. How Erok did it has not
been explained. All I did was take his test and make it work with a
simple change.

Terry

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

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

Re: [RB List] Starting a Thread
Date: 04.02.05 21:53 (Fri, 04 Feb 2005 12:53:52 -0800)
From: Terry Ford

On 4-Feb-05, at 12:43 PM, Terry Ford wrote:

> Take out the breakpoint, un-comment the statictext1 line and it runs
> forever. Comment out the "again:" and "goto again" and it counts to
> 999.

Actually 9999. :)

T.

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

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

Re: [RB List] Starting a Thread
Date: 04.02.05 22:00 (Fri, 4 Feb 2005 16:00:01 -0500)
From: Andrew Keller
> As for indexing, how can this code be modified to become functional?

The difference between a class, a control, and a control in a control
array should be understood.

- A class is something defined in the project window, and does not
exist in memory at runtime until you make a variable point to a new
instance of that class. The variable used is dimensioned as that
class. Notice that the New method is used. Once the New method has
been called and a new instance of the class exists, it is fully
functional and ready to go.

- A control with an index of Nil is in a window, and does exist at
runtime in memory, and is also fully functional. Just call it by it's
name. The New method does not do anything.

- A control in a control array has an index, and is called by it's
name, and then a parameter, the index. All of the controls that are
present in the IDE will be in memory and fully functional at runtime.
Any additional instances of the control are created at runtime, using
the New method. The lowest unused index is automatically assigned to
the new control. New instances of a control in a control array do not
have to be put inside a variable, because the control array itself is
already an array.

If you try to reference a control that is a part of a control array, or
call the New method on a control that is not a part of a control array,
then RB will throw up an error when it compiles the app.

Andrew Keller

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

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

Re: [RB List] Starting a Thread
Date: 04.02.05 22:02 (Fri, 4 Feb 2005 15:02:01 -0600)
From: Joseph J. Strout
At 12:43 PM -0800 2/4/05, Terry Ford wrote:

>It also makes more sense to me to use threads as classes and *not*
>controls although it appears to be possible.

I often find it more convenient to use them as controls. You do this
by control-clicking on the window, and choosing "Add Control > Any"
and finding Thread on the pop-up list. Then you have a thread object
right on the window, which you don't have to create with code, and
which has a Run event right there on the window ready to fill out --
no Thread subclass is needed.

Best,
- Joe

Re: [RB List] Starting a Thread
Date: 04.02.05 23:29 (Fri, 4 Feb 2005 17:29:16 -0500)
From: Stuart Malin

On Feb 4, 2005, at 4:00 PM, Andrew Keller wrote:

>> As for indexing, how can this code be modified to become functional?

<snip>

> If you try to reference a control that is a part of a control array,
> or call the New method on a control that is not a part of a control
> array, then RB will throw up an error when it compiles the app.

Thanks for your explanations Andrew. Yet I remain befuddled.

Here's a recap of what I have (borrowed from Erik's app):

A single window with

1) a static text control names StatitcText1

2) a thread instantiated as a control named Thread1 (it does NOT have
an index value set)
Thread1 has a run event that says:
staticText1.text = "I am Thread 1"

3) several pushbutton controls for trying various combination of things.

a) PushButton1 has this as an Action Event handler:
Thread1.Run

b) PushButton2 resets StaticText1

c) PushButton3 has an Action Event handler that does what Eric first
tried:
dim t as Thread1
t = new thread1
t.Run

Results
----------
1) this all compiles (cf. your comment that RB will through up a
compile time error when New is used on a control that is not a part of
a control array)

2) PushButton1 works (which invokes Thread1 by name)

3) PushButton3 does not set StaticText1

So, I still have two questions:
---------------------------------------
1) What is PushButton3's Action Event handler causing to happen, if
anything?

2) I put a breakpoint on the "new" line of PushButton3's Action Event
handler. When I step it, t does take on a value, and is a Thread1
object. The index of this control instance is -2147483648. What does
that mean?

Then:
--------
I changed the Thread Control on the window to have an index value of 0.

So, I changed the code of PushButton1 to be
Thread1(0).Run
And that works.

And, now when PushButton3 is clicked, the object t is created with an
index value of 1, and the thread is invoked (yeah!).

Which is all as expected.

So:
----
Is it a bug that (in the original version before giving Thread1 an
index), that:
dim t as Thread1
t = new thread1

neither functions as it *seems* it should NOR causes any compile time
error NOR a runtime exception. It simply compiles and does not work.

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

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

Re: [RB List] Starting a Thread
Date: 04.02.05 23:30 (Fri, 04 Feb 2005 14:30:32 -0800)
From: Terry Ford

On 4-Feb-05, at 1:02 PM, Joseph J. Strout wrote:

> I often find it more convenient to use them as controls. You do this
> by control-clicking on the window, and choosing "Add Control > Any"
> and finding Thread on the pop-up list. Then you have a thread object
> right on the window, which you don't have to create with code, and
> which has a Run event right there on the window ready to fill out --
> no Thread subclass is needed.

Darn. That feature was mentioned on one of the lists about a week ago
and I already forgot about it. :)

All things considered, the important issue was the way to run the
Thread whether it was a subclass or a control. I'm sure someone could
find a use for a Thread Control array but, personally, I can't think of
one off the top of my head. But then, I'm still learning about a Rb
feature that I haven't needed to use (yet).

Thanks for the reminder,

Terry

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

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

Re: [RB List] Starting a Thread
Date: 04.02.05 23:43 (Fri, 4 Feb 2005 16:43:46 -0600)
From: Joseph J. Strout
At 5:29 PM -0500 2/4/05, Stuart Malin wrote:

>2) a thread instantiated as a control named Thread1 (it does NOT
>have an index value set)
> Thread1 has a run event that says:
> staticText1.text = "I am Thread 1"
>
>3) several pushbutton controls for trying various combination of things.
>
> a) PushButton1 has this as an Action Event handler:
> Thread1.Run

This is correct.

> c) PushButton3 has an Action Event handler that does what
>Eric first tried:
> dim t as Thread1
> t = new thread1
> t.Run

This should not compile (assuming you don't also have a class named
Thread1). If it does, you've found a bug. But, the work-around for
this bug is simple: Don't Do That.

>1) What is PushButton3's Action Event handler causing to happen, if anything?

Who knows. It's undefined and shouldn't compile at all.

>2) I put a breakpoint on the "new" line of PushButton3's Action
>Event handler. When I step it, t does take on a value, and is a
>Thread1 object. The index of this control instance is -2147483648.
>What does that mean?

That's the magic value that means it's not part of a control array.

Best,
- Joe

Re: [RB List] Starting a Thread
Date: 05.02.05 00:00 (Fri, 04 Feb 2005 15:00:37 -0800)
From: Terry Ford

On 4-Feb-05, at 2:29 PM, Stuart Malin wrote:

> Is it a bug that (in the original version before giving Thread1 an
> index), that:
> dim t as Thread1
> t = new thread1
>
> neither functions as it *seems* it should NOR causes any compile time
> error NOR a runtime exception. It simply compiles and does not work.

That would be wonderful. A compiler that checks my code for misuse of
code. :)

I think the compiler is limited to checking syntax and
object/method/property existence. I agree that the compiler should have
objected to the fact that the Thread Control did not have an index
value assigned. That may be asking a lot as the code was correct, but
the nature of the control wrong.

A 'Bug report' perhaps?

Terry

PS. I read Joe's response while writing this response and am reminded
that Rb does a lot to help one write their software correctly, but It
can't do everything and has a few holes that are yet to be filled. :)

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

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

Re: [RB List] Starting a Thread
Date: 05.02.05 00:09 (Fri, 4 Feb 2005 18:09:30 -0500)
From: Stuart Malin

On Feb 4, 2005, at 5:43 PM, Joseph J. Strout wrote:

> At 5:29 PM -0500 2/4/05, Stuart Malin wrote:
>
>> 2) a thread instantiated as a control named Thread1 (it does NOT have
>> an index value set)
>> Thread1 has a run event that says:
>> staticText1.text = "I am Thread 1"
>>
>> 3) several pushbutton controls for trying various combination of
>> things.
>>
>> a) PushButton1 has this as an Action Event handler:
>> Thread1.Run
>
> This is correct.
>
>> c) PushButton3 has an Action Event handler that does what Eric first
>> tried:
>> dim t as Thread1
>> t = new thread1
>> t.Run
>
> This should not compile (assuming you don't also have a class named
> Thread1). If it does, you've found a bug. But, the work-around for
> this bug is simple: Don't Do That.
>
>> 1) What is PushButton3's Action Event handler causing to happen, if
>> anything?
>
> Who knows. It's undefined and shouldn't compile at all.

Thanks Joe -- you've cleared this up for me -- it is a bug.

It's dam hard trying to make sense of a bug when one doesn't know it is
a bug <lol!>

Bug has been reported:
http://www.realsoftware.com/feedback/viewreport.php?reportidìuhdrnd

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

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