Hi Ed
I am not able to download as yet.
<i><font color="#663300"> So far the forum has been up and running smoothly for a few days, and the response and participation of the community has been outstanding for such a new venture. So I'm not too nervous about travelling to a client's site for the next week and leaving the site on auto-pilot for that time. I'll still be checking in regularly, but won't have the access to the 'net that I do in my office, so don't be surprised if responses take a little longer than usual.
Also, I am posting a beta copy of <B><FONT SIZE=+2 COLOR="#990099">eBizObj v2.0</FONT></B>, which adds quite a few new functions. Probably the biggest change you'll notice is that the zip file contains a program called "eDataEnv.PRG", which should be placed in the COMMONx0LIBS directory. It is contains the definition of a new class of cursor object called "<B>eDistinctDynamicViewCursor</B>". As that rather long name suggests, it is a subclass of the standard cDynamicViewCursor with one twist: it assures that the cursor created will have a unique alias and be based on a unique view.
Why is that important? Well, let's say you have a standard Phone class, which you use to display telephone numbers in your apps. Currently, if you need to use more than one such Phone object per form, you'd have to define two separate views of your Phone table which would most likely be identical except for the name of the view. That way the two Phone objects could reflect, say, a home and a work phone on the same form. If you had a lot of phones (home, work fax, cell, pager, data, weekend, etc.), that involved creating a lot of repetitive views.
If you based the cursor class on eDistinctDynamicViewCursor instead, you'd now only have to create one view and call it something like "lv_Phone". Each phone bizobj would then use a single DE class definition, which would look like
<CODE>DEFINE CLASS PhoneBizobjEnvironment AS <app>Environment FUNCTION LoadCursors() DIMENSION this.aCursors[1] this.aCursors[1] = 'v_Phone' ENDFUNC ENDDEFINE </CODE>
and the cursor definition would be:
<CODE>DEFINE CLASS v_Phone AS eDistinctDynamicViewCursor cCursorSource = 'v_Phone' ENDDEFINE </CODE>
Now you can drop dozens of phone objects on your form, and they will each use a distinct alias and a distinct view. If you'd like to know how, check out the code in eDataEnv.PRG.
Another change is actually a bit of a retro move: in the dark days of cBizObj <g>, you dropped a child on a parent, and by its physical association the relationship was established. When eBizObj was written, you had to specify the name of the parent bizobj in the cParentBizobj property. This began to be a pain when creating bizobjs which consisted of a bunch of small bizobjs put together, so I added the following: if a bizobj's cParentBizobj property is empty, the first container of that bizobj which is also an eBizObj will be marked as its parent at runtime. There is a new logical property called <B>lNoAutoParent</B> which prevents this from happening; its default is set to .T., killing this automatic behavior, so that it won't break any existing objects. The upshot of this is you can just drop bizobjs on other bizobjs and have the child relationship automatically established. Note: this will work even if the child is buried a few levels deep, such as in a container on a page of a pageframe of its parent.
One other little convenience is that you can type in the name of the bizobj's DataEnvironment class right in the builder rather than having to drill into the oDELoader object and setting it there. Not a big deal, but I find it a lot easier.
There are a few other changes, which are documented in the Copyright() method of eBizObj. If you'd like to try out this new version, you can DL it by <A HREF="dlfile.fcgi?which=ebizbeta.zip"><B>clicking here</B></A>. This is a 5.0 version; if you use it in 3.0 you'll have to recompile it. As with any beta, please keep in mind that there may still be bugs, so keep a copy of the old cBizEd classlib as a backup, and please let me know of any problems you run across.</font></i>
Regards Bhavbhuti ©2002 Bhavbhuti Nathwani |