Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Finding All Textboxes in Form
Message
De
05/09/2005 11:13:31
 
 
À
05/09/2005 09:51:57
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 6
Divers
Thread ID:
01045035
Message ID:
01046789
Vues:
47
>Yes I can think of more, ie: Control, DataEnvironment ... You might never know what the next version of VFP would have as a container type class.
>Cetin
>

As I provided for Option/Command group I will add provisions 4 Control & DataEnvironment objects as well, by adding few more case statements.

We can talk about me overlooking or simply *deciding* not to include some object types (like those dummed formsets) but I don't see it as conceptual problem for this mechanisam.

On the other side It seem to me that you completely missed the point of what is this object all about. It does not matter HOW i am gonna drill down those objects, that is relatively easy thing to do. Point here is,
I wld say more in 'packaging', where you get one general purpose drilldown object having separate method that receives every and each object as parameter. So in first level of subclassing you can do what ever u want with it.
define class myObjectDrill as ObjectScanner

***We write specific purpose here
   procedure with_object  
      lparameters oObj
      if oObj....
         .
         .

enddefine

**and use it from anywhere we want.

local oRO
oRO=createobject('myObjectDrill')
oRO.scan_vfp()
* or
oRo.scan_containership(oObjectReference)
Hope this throws more light to what I am trying to achieve here.

Wish I was already with VFP9 so I wld include right away what ever else is there. I am planning an upgrade, but that will happen right after service pack :)

As for future VFP versions, (God I wish they happen) we will cross that bridge when we come to it. I appreciate your optimism :)

Cheers :)
Sergio





>>Why not ??
>>Number of baseclasses is limited and they are known upfront.
>>I simply prefer it this way. Makes code simplier.
>>
>>See how easy was to fix code below & add missing functionality u mentioned in yr previous mesage. (Drill down to include Command/Option Groups).
>>
>>I think that now only formsets are missing. I always hated & never used those... But I am gonna add them later today just to make it complete.
>>
>>Am I missing any other object that can contain objects available to VFP6 ?
>>All I can think of are form's datasessions.
>>
>>***Fix in order to include Command/Option Groups
>>
>>local oGPRO
>>oGPRO=createobject('ObjectScanner')
>>oGPRO.scan_vfp()
>>*oGPRO.scan_containtership(oFormReference)   &&valid call for
>>
>>
>>***App GPRO
>>define class ObjectScanner as shape
>>
>>    procedure scan_vfp
>>        local i,oObj
>>        i=1
>>        do while type('_vfp.objects(i)') <> 'U'
>>            oObj=_vfp.objects(i)
>>            do case
>>                case inlist(oObj.baseclass,'Form','Container','Toolbar')
>>                    this.scan_containership(oObj)
>>
>>                *Case it is formset do we bother handling that ?
>>
>>                *Case it is collection then what ?   (I am with VFP6)
>>
>>                *Anything else ?
>>
>>                otherwise
>>                    this.with_object(oObj)
>>
>>            endcase
>>            i=i+1
>>        enddo
>>
>>
>>    procedure scan_containership
>>        lparameters oParentContainer
>>        local i,oControl
>>        for each oControl in oParentContainer.controls
>>            do case
>>                case oControl.baseclass="Pageframe"
>>                    for i = 1 to  oControl.pagecount
>>                        this.scan_containership(oControl.pages(i))
>>                    next
>>
>>                case oControl.baseclass="Container"
>>                    this.scan_containership(oControl)
>>
>>                case oControl.baseclass="Grid"
>>                    for i = 1 to  oControl.columncount
>>                        this.scan_containership(oControl.columns(i))
>>                    next
>>
>>                *** Addition to include Commandgroups and Optiongroups
>>                case inlist(oControl.baseclass,'Commandgroup','Optiongroup')
>>                    for i = 1 to  oControl.buttoncount
>>                        this.with_object(oControl.buttons(i))
>>                    next
>>
>>                otherwise
>>                    this.with_object(oControl)
>>
>>            endcase
>>        next
>>        this.with_object(oParentContainer)
>>
>>
>>    procedure with_object
>>        lparameters oObj
>>        wait wind 'Scanning object [' + oObj.name + ']' timeout 0.5
>>
>>
>>enddefine
>>
>>
>>
>>Anyway as I said this code is just an open idea
>>so perhaps by people commenting on it, will spark up
>>creation of more functionality.
>>
>>Thks & Rgds++
>>Sergio
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform