Well, perhaps you've made the property private, and the code above is not within a method of that class? At any rate, it'll be something like that.

<bangHead>
ROTFL! It was worse than that. I put the method in the wrong class. </bangHead>

Thanks,

== Ross ==

----- Original Message ----- From: "Joseph J. Strout" <[EMAIL PROTECTED]>
To: "REALbasic NUG" <[email protected]>
Sent: Wednesday, April 12, 2006 3:53 PM
Subject: Re: Array as class property?


At 3:22 PM -0700 4/12/06, [EMAIL PROTECTED] wrote:

I really must be missing the obvious (sigh). I have a class called Product. I would like to have a class property that is a string array. I thought I could create a property like this:

Vendors() As String

That's correct (it makes an empty array).

...or maybe...

Vendors(0) As String

That's also correct (it makes an array presized to 1 element).

The editor lets me define it that way, but when I try to access the property, I get the error, "This method or property does not exist."

In my code, I'm just trying to do this:  p.Vendors(cnt) = "some value"

Well, perhaps you've made the property private, and the code above is not within a method of that class? At any rate, it'll be something like that.

Best,
- Joe

--

Joseph J. Strout
[EMAIL PROTECTED]
_______________________________________________
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>

Reply via email to