Xojo Conferences
MBSOct2019CologneDE

Setting properties (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: [OFF] Old Apple II Game
Next thread: Re: REALbasic-NUG Digest #6108


Re: AddShapeFromString method on OS X   -   Sean Conley
  Setting properties   -   Todd Geist
   Re: Setting properties   -   Mr. Weasel Willits
    Re: Setting properties   -   Todd Geist
   Re: Setting properties   -   john roberts
   Re: Setting properties   -   Will Leshner
   Re: Setting properties   -   Mike Benonis

Setting properties
Date: 06.05.02 01:08 (Sun, 05 May 2002 18:08:10 -0600)
From: Todd Geist
Hello everyone,

I have what I am sure us very simple question but I can't figure it out. I
am very new to RB.

I have a window called "wTask" that has a property I created called "ID". I
cannot figure out to set that property from the button that instantiates the
window.

For example if I want to open a new wTask Window and set the ID Property to
3 I thought this would work but it does not.

dim w as window
w = new wTask
w.ID = "3"

What am I missing? This is very frustrating. I just want to pass some
values from window to another in an object oriented fashion.

Thanks

Todd



---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Setting properties
Date: 06.05.02 01:12 (Sun, 05 May 2002 17:12:43 -0700)
From: Mr. Weasel Willits
On 5/5/02 5:08 PM, the NSA intercepted the following message from "Todd
Geist" <<email address removed>>:

> For example if I want to open a new wTask Window and set the ID Property to
> 3 I thought this would work but it does not.
>
> dim w as window
> w = new wTask
> w.ID = "3"
>
> What am I missing? This is very frustrating. I just want to pass some
> values from window to another in an object oriented fashion.

w (type window) doesn't have an ID property. Your window (wTask) is a
subclass of the Window class. You need to create an instance of the wTask
window subclass and set the id of it.

dim w as wTask
w = new wTask
w.ID = "3"


---------------- Seth Willits ----------------
Not everything that can be counted counts,
and not everything that counts can be counted.
-Albert Einstein
----- http://freaksoftware.tripod.com/ -------



---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Setting properties
Date: 06.05.02 01:27 (Sun, 05 May 2002 18:27:26 -0600)
From: Todd Geist
On 5/5/02 6:12 PM, "Mr. Weasel Willits" <<email address removed>> wrote:

> w (type window) doesn't have an ID property. Your window (wTask) is a
> subclass of the Window class. You need to create an instance of the wTask
> window subclass and set the id of it.
>
> dim w as wTask
> w = new wTask
> w.ID = "3"

Thanks for the replies guys. I got it.

Todd

Re: Setting properties
Date: 06.05.02 01:16 (Sun, 05 May 2002 20:16:07 -0400)
From: john roberts
on 5/5/02 8:08 PM, Todd Geist at <email address removed> wrote:

> dim w as window
> w = new wTask
> w.ID = "3"
>
> What am I missing? This is very frustrating. I just want to pass some
> values from window to another in an object oriented fashion.

If ID is a string then

dim w as wTask
w = new wTask
w.ID= "3"

if ID is an integer or a double then

dim w as wTask
w = new wTask
w.ID= 3

should suffice.

John

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Setting properties
Date: 06.05.02 01:17 (Sun, 5 May 2002 17:17:37 -0700)
From: Will Leshner
Probably because w is dim'd to be a generic window. Try dim-ing to a
wTask (wTaskWindow or whatever your window is called) like this:

dim w as wTask
w = new wTask
w.ID = "3"

That should work.

On Sunday, May 5, 2002, at 05:08 PM, Todd Geist wrote:

> Hello everyone,
>
> I have what I am sure us very simple question but I can't figure it
> out. I
> am very new to RB.
>
> I have a window called "wTask" that has a property I created called
> "ID". I
> cannot figure out to set that property from the button that
> instantiates the
> window.
>
> For example if I want to open a new wTask Window and set the ID
> Property to
> 3 I thought this would work but it does not.
>
> dim w as window
> w = new wTask
> w.ID = "3"
>
> What am I missing? This is very frustrating. I just want to pass some
> values from window to another in an object oriented fashion.
>
> Thanks
>
> Todd
>
> ---
> Subscribe to the digest:
> <mailto:<email address removed>>
> Unsubscribe:
> <mailto:<email address removed>>

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>

Re: Setting properties
Date: 06.05.02 01:21 (Sun, 05 May 2002 20:21:18 -0400)
From: Mike Benonis
on 5/5/02 8:08 PM, Todd Geist at <email address removed> wrote:

> dim w as window
> w = new wTask
> w.ID = "3"
>
> What am I missing? This is very frustrating. I just want to pass some
> values from window to another in an object oriented fashion.

It's easy to overlook this. When you define W as Window, REALbasic knows
nothing of the properties in wTask, but only of the properties in the Window
class. What you need to do is tell REALbasic that W is a wTask window
instead, like this:

Dim W As wTask
W=New wTask
W.ID="3"

This way it knows what an ID property is.

Oh, and welcome to the REALbasic community!

-Mike

---
Subscribe to the digest:
<mailto:<email address removed>>
Unsubscribe:
<mailto:<email address removed>>