new object ?

new object ?

Post by Tee Siu B » Fri, 07 Apr 2000 04:00:00



hello,

       i've a code that not very understand, the code is this
    person = new object ( )
    person.name= " test"
    person.age= "28"

    what object is this person be ? is it a form or what  ? thanks.

danny

 
 
 

new object ?

Post by Albert Bohlmeije » Fri, 07 Apr 2000 04:00:00




Quote:>hello,

>       i've a code that not very understand, the code is this
>    person = new object ( )
>    person.name= " test"
>    person.age= "28"

>    what object is this person be ? is it a form or what  ? thanks.

>danny

something in the first line is wrong.......
person=CreateObject('classname','class', parameters...)

than i suggest you name it oPerson

after the last line an oPerson.show() should be added to show up the
thing (make it visible)

Albert

Albert Bohlmeijer
06900 Yan, Kedah MALAYSIA

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQBVAwUBNHqANMlbTSm9v83hAQETrAH+KHSeF/rTZN0+DZyPbqClDrklMDOomefg
/0Qcxi3r3EensOvNZZu12CcpTu5J3duV3jhzRQlUnU2kvHiSOkIJjw==
=Ntt5
-----END PGP SIGNATURE-----

 
 
 

new object ?

Post by Anders Altber » Fri, 07 Apr 2000 04:00:00


That is Visual Basic code most likely.
-Anders



Quote:> hello,

>        i've a code that not very understand, the code is this
>     person = new object ( )
>     person.name= " test"
>     person.age= "28"

>     what object is this person be ? is it a form or what  ? thanks.

> danny

 
 
 

new object ?

Post by Andrew » Fri, 07 Apr 2000 04:00:00


You err,

Quote:> something in the first line is wrong.......
> person=CreateObject('classname','class', parameters...)

> than i suggest you name it oPerson

> after the last line an oPerson.show() should be added to show up the
> thing (make it visible)

CreateObject takes only Classname and init parameters.
NewObject takes classname and classlibrary.
AddObject takes ObjectName and Class.

Andrew R.