PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → WD18 : Using properties in a class ??
WD18 : Using properties in a class ??
Iniciado por guest, 05,ene. 2015 22:24 - 2 respuestas
Publicado el 05,enero 2015 - 22:24
I am property challenged ...

How do I use properties to display a complete address from individual parts line street, city, state ?
This is what I tried but not working <a class="ExternalLink" rel="nofollow" target="_blank" href="http://screencast.com/t/t1U9S6KYli">http://screencast.com/t/t1U9S6KYli</a>?
Publicado el 06,enero 2015 - 07:52
Hi Dan
I must confess I never use the Windev assignment option; I could never understand it or even the point of it! Unless I'm missing something,it just seems to make something that is inherently simple rather messy.

Having said that, your code looks pretty right to me; I would just put your assignment code in the procedure section and forget about the separate value section.

Cheers

David
Publicado el 06,enero 2015 - 08:04
HI DanM,

you are using the SET function of the property to create your return string or poperty value, which i think is the wrong place to do it.

this function is usally used to assign a value to the property like e.g:

MyInvoiceClass._pBillToAdress = "Microsoft" + CR + "15010 NE 36th Street" + CR + " Redmond, WA 98052"


if you don´t assign a value to that property, the function will not be triggered.

If the other class variables you are using to create the string are already available in the inital process of the class, you could create the string directly there or create you owne MyAfterInitialize function and do the magic there.

Hope that helps,
Sascha