Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Passing data between layers
Message
From
24/07/2005 21:37:33
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01030083
Message ID:
01035584
Views:
17
Hi, Marcel.

>Thanks for the suggestion. I looked at the framework and the demo app, and I've learned quite a bit from it. I also got a subscription to UT magazine.

Glad to see it was useful for you.

>One Question though - I've been scratching my head on this and when I think I understand it, I come across something else that confuses me again. There are a lot of places where you pass and reference an nNivel(level?) variable. For Ex:
>
>
>		For Each colItem In .oUserTier.colTables
>			If colItem.Item( "nNivel" ) = 1
>				Select ( colItem.Item( "cCursor" ) )
>				lcPKValue = Alltrim( colItem.Item( "cCursor" ) + "." + colItem.Item( "cPKName" ) )
>				Exit
>			EndIf
>		EndFor
>
I know ther are parts of the framework where documentation is in Spanish, and I'm slowly changing this as I refactor the code, also. I did most of the design but not so much of the code, and this is why there is still so much Spanish there. You correctly guessed that nNivel is nLevel, and it is the hierarchy level you want to get from an entity.

In TierAdapter each entity could be formed by a parent cursor, n child cursors, n grand-childs, and so on as far as you want. In many scenarios, though, you just need the parent (for showing a list, for example, and that's why the GetAll method always uses nLevel=1), and sometimes you may need just the second or the third one. Playing with the level allows you to get over the wire always the least possible information you need.

Let me know if you have any other question, and I'll make sure to pass it on to the guys writing the articles to see if it needs t be more properly explained.

Regards,
Previous
Reply
Map
View

Click here to load this message in the networking platform