From: mp on

"Jim Mack" <no-uce-ube(a)mdxi.com> wrote in message
news:l7OdnXrOkLUTFsDRnZ2dnUVZ_sydnZ2d(a)giganews.com...
> mp wrote:
>
> Did you try 'Friend'?
>
> --
> Jim Mack
> Twisted tees at http://www.cafepress.com/2050inc
> "We sew confusion"
>

yes, as i mentioned the collection.add still didn't like it

>> the other fix i've seen is declare the sub Friend rather than
>> Private but that didn't work either since the error is still trying
>> to put the udt into a collection
>

From: mp on

"Larry Serflaten" <serflaten(a)gmail.com> wrote in message
news:i3kbev$v14$1(a)news.eternal-september.org...
>
> "mp" <nospam(a)Thanks.com> wrote
>
>> initially i thought i'd try a udt since there were only 3 properties and
>> I
>> thought since it was all private in the same class i wouldn't get the
>> private/public compile error i get whenever I try to (mis-)use a udt.
>
> If you can keep it all private, you should not see a problem.
>
> EG: A UDT declared as Private in a class can be passed to
> Private routines within the class.
>
>
>> i have had almost no luck trying to use a simple udt if it has to be
>> passed
>> anywhere due to all the strange(to me) limitations (really the
>> limitations
>> of my knowledge)
>> it's just always been easier to create a class instead than try to figure
>> out what hoops to jump through to use a simpler(i would have thought)
>> construct.
>
> I find classes are the easier of the two as well. With a class you get to
> include a (sort of) constructor, (more like initialization...) and can
> control
> the Read/Write access of the variables.
>
> Classes can be passed hither and yon, and you have the otpion to use
> an array or collection, whichever fits the need.
>
> LFS
>
>
agreed, I have almost always ended up going back to a class whenever i've
tried to use a udt, thinking at first it would be simpler. every so often
though I see a situation i think ah a udt would work here...and i'm back to
discovering all the complications required (as noted in the above thread -
activex dlls, typelibs, etc )

in my simple apps it's never warranted the extra work involved to get there.
If i needed to optimize something that used lots of simple classes for which
udt's could substitute, it might be worth it in that case.

anyhow, I knew i'd enjoy and learn from the ensuing discussion, and wasn't
disappointed.
:-)
thanks to all for their insights
mark


First  |  Prev  | 
Pages: 1 2 3
Prev: Temp File -- got me stumped
Next: Cleanup remnants