Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Default Object
Message
De
21/10/2014 13:17:42
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Allemagne
 
 
À
21/10/2014 13:13:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 8.1
Network:
SAMBA Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01609619
Message ID:
01609724
Vues:
42
>>>>>>Yes, only one. On this form there is only one. Enter from any other input object other then the grid works perfectly fine. :(
>>>>>>
>>>>>>Maybe you misunderstand. I have large containers and a lot of them. If I have the default object in the last one there is a lot of useless parsing. Also i parse all if there is no default object at all.
>>>>>>
>>>>>
>>>>>Maybe add a property to your form class to point to the default button. I'm not sure whether an assign method on the Default property will fire if you set it in the property sheet; my guess is not. But if you set it in the button's Init method instead, then an assign method should fire to populate the form property.
>>>>>
>>>>>Tamar
>>>>
>>>>Hi Tamar,
>>>>
>>>>yes, _Assign will not fire by properties set at design time (I think in class definition of a prg too, but this is not tested.) It need to be called like
>>>>
>>>>PROCEDURE INIT
>>>> THIS.Prop = THIS.Prop
>>>>ENDPROC
>>>>
>>>
>>>Easy enough to build that into the base classes.
>>>
>>>Tamar
>>
>>But it runs over and over. I have enough of this stuff anyway. :(
>>I think I like the idea of a design time info. But it needs a good place to kick in. Project hook to preprocess before the compile? And do al ot with incompiled classes in the IDE this is an other problem. Do you know a hook in save?
>>
>
>If you put the assign in the control's Init, it runs once. However, having seen the other suggestions on this thread, I actually think the best is something like this in the BaseClass:
>
>
>IF This.Default AND PEMStatus(ThisForm, "oDefault", 5)
>   ThisForm.oDefault = This
>ENDIF
>
>
>For every control except the one where Default is .T., that'll be a single property check. That's pretty lightweight.
>
>Tamar

Basically yes. A change the default sometimes, so I need the assign too.
In general I like to have a change at one place (the _Assign) but in this case I rethink. An IF + Set Prop would be much faster then IF + _ASSIGN + a CASE there + set prop.
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform