Re: IDLgrView::GetByName [message #46220 is a reply to message #46219] |
Tue, 08 November 2005 13:14  |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
Hi,
"IDLmastertobe" <shi_lee@hotmail.com> wrote in message
news:a6f3fee6b8f98956d9d1912f01028d97@localhost.talkaboutpro gramming.com...
> Hi, I am dealing with IDLgrView object named oView, oView holds a lot of
> other objects. I am trying to get access to those objects by using
> oView->GetByName function as follows:
>
> oView -> GetByName, oTop=oTop
> oTop -> GetByName, oGroup = oGroup
> oGroup->GetByName, oBox = oBox
> oBox -> SetProperty, thick=3
>
> oTop was added to oView and oGroup was added to oTop, maybe the chain
> GetByName structure is not necessary, but i received an error message:
>
> "Attempt to call undefined method: 'IDLGRVIEW::GETBYNAME'."
>
> why is GetByName not defined in IDLgrView oView?
>
> Does anyone know why? Thanks for your time.
It's defined, but it's a function, not a procedure, requiring a string to
match some object's Name property. If your oTop object was created with
Name='oTop' (and other objects named similarly), you could then do this:
oTop = oView -> GetByName('oTop')
oGroup = oTop -> GetByName('oGroup')
oBox = oGroup -> GetByName('oBox')
oBox -> SetProperty, thick=3
Online help on IDLgrView::GetByName is helpful here.
Cheers,
--
-Dick
Dick Jackson / dick@d-jackson.com
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / +1-403-242-7398 / Fax: 241-7392
|
|
|