Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find object in pageframe
Message
From
21/10/2003 10:54:47
 
 
To
21/10/2003 10:49:14
Victor Verheij
International Film Festival Rotterdam
Rotterdam, Netherlands
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00840669
Message ID:
00840670
Views:
25
Why does the doThing() need to be called from the form's Init()?
Where does the nvalue come from?

It would simplify things quite a bit if the listbox's doThing() could be called from the its own Init(). Then it wouldn't matter where in the object hierarchy it is.

>Hello.
>
>Can anyone help me with this.
>
>I've created a listbox class (lstSpecial) with a doThing() method.
>On the init event of the form containing this listbox i want to call the listbox's doThing() method.
>
>Because i want to make things as generic as i'm able to, I can't be sure where the listbox is going to be put on the form and how things are named on the form. In most cases it will be on a page in a pageframe.
>
>How can i invoke the dothing() method and check for the existence off the lstSpecial listbox class?
>
>thnx. Victor
>
>p.s. below is the code i've come up with so far wich results in an error "controls is not an object"
>
>nControlsOnFrm = thisform.controlcount
>for nFrmCounter = 1 to nControlsOnFrm
> if thisform.controls(nFrmCounter).class = 'Iffpageframe'
> nControlsOnPgf = thisform.controls(nFrmCounter).pagecount
> for nPgfCounter = 1 to nControlsOnPgf
> nControlsOnPag = thisform.controls(nFrmCounter).pages ;
>(nPgfCounter).controls
> for nPagCounter = 1 to nControlsOnPag
> if thisform.controls(nPagCounter).class = 'lstNAWGegevens'
> thisform.controls(nPagCounter).doThing(nValue)
> endif
> exit
> endfor
> endfor
> endif
>endfor
Insanity: Doing the same thing over and over and expecting different results.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform