Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bindevents and classes
Message
From
09/11/2007 15:20:02
 
 
To
09/11/2007 14:37:12
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Database:
MS SQL Server
Miscellaneous
Thread ID:
01267991
Message ID:
01268118
Views:
21
>>The problem is not that simple, I did that already for one area, just overrode the inherited code by putting code in the object on the form. But with this one, it is more complex. I think I have not explain it enough, so, here goes:
>>
>>My form as a button which calls another form from a class by way of createobject(), within this class form, there is another class that is used for an object on that form. This lowest class has my problem code in the init of it.
>>
>>Going back over your answer, I am not sure what you are saying. And not sure how to ask an intelligent question about it. I have the name/reference of the form that is created with the createobject(), but can I get down to the object I need, before its init is fired?
>
>No, because it isn't created yet. You can just comment the code in the object's init if you don't want it to run - i.e. if it runs contrary to what you need and you know you'll have to overwrite its results anyway.
>
>You can have this code anywhere:
>
>
*-- FixMyCombo.prg
>lparameters toCombo
>LOCAL i
>addproperty(toCombo, "aWizFList[1]")
>=AFIELDS(toCombo.aWizFList)
>FOR m.i = FCOUNT() TO 1 STEP -1
>  IF INLIST(toCombo.aWizFList[m.i,2],"G","M","U")	&&Memo field
>    =ADEL(toCombo.aWizFList,m.i)
>    DIMENSION toCombo.aWizFList[MAX(1,ALEN(toCombo.aWizFList,1)-1), ALEN(toCombo.aWizFList, 2)]
>  ENDIF
>ENDFOR
>toCombo.RowSourceType = 5
>toCombo.RowSource = "this.aWizFList"
>toCombo.VALUE = toCombo.LIST[1]
>
>Now let's suppose your 2nd form is the createobject()ed form - oFrm2, and the combo in case is on it, oFrm2.oCbo5 (you'll have to supply actual variables, object names). You can simply
>
>FixMyCombo(oFrm2.oCbo5)
>
>somewhere between createobject()ing the form and ofrm2.show().

Okay, that makes sense. I will have to think about this over the weekend. Thank you for your help.
I may be back with more questions next week.

Have a great weekend.

Beth
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform