Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Building object name and calling it
Message
From
04/03/2017 06:28:39
 
 
To
04/03/2017 00:24:27
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Application:
Desktop
Miscellaneous
Thread ID:
01648762
Message ID:
01648772
Views:
34
>Sorry if I offend rules and regulations here by asking this, but Thomas, seeing as you understand what I am doing - If I have say 4 records in the table, and make 4 line objects visible, my next problem is to make each visible line object display the data in it's record in the table. Any suggestions how to achieve that? EG: Object1 to display record 1 data, Object2 to display record 2 data, etc.
>
>Many thanks!

I'd go top before the loop, in loop scatter to the line object (which I is not a vfp line object but some container representing the line of record data) or a sub (data) object, set visible, skip

but since I have no idea what controls are there / how data binding is accomplished, this is shooting in the dark without some code you already have. From architectural POV I'd probably create a base "line class", which has a designated data subobject and all repeating controls on it. on the form I'd pseudo-subclass this classs with the recno-names and set in the loop a temporary object pointer for fast and generic handling or pass current active line object to a method which can do all work on the supplied instance parameter.


loLineNo = eval(thisform.Dayjobsline" + ALLTRIM(STR(x)) )

or

thisform.BldLinePerRec(eval(thisform.Dayjobsline" + ALLTRIM(STR(x)) ) )

procedure BldLinePerRec(toLineNo )

Scatter Name toLineNo.oData [additive]
toLineNo.visible = .t.
skip

As there are quite a few ways to code that which are "good enough" I'd ask you to either sketch your current approach / work done or use one of the vcx/scx to prg tools and give current code samples.
Previous
Reply
Map
View

Click here to load this message in the networking platform