On Tuesday 26 August 2008 04:01:07 pm Paul McNett wrote:
> johnf wrote:
> > On Tuesday 26 August 2008 03:36:24 pm Paul McNett wrote:
> >> johnf wrote:
> >>> Sorry I can't answer your question.  However, I do have a question.  As
> >>> I read what you are saying the "self.scan" routine is somehow aware of
> >>> the children records associated with the data being scanned?  Sort like
> >>> a "set relation" in VFP.  Is this correct?
> >>
> >> They have a dabo parent/child relationship, formed by:
> >>
> >> bizSubopenings.addChild(bizPanels)
> >> bizPanels.addChild(bizRails)
> >> bizPanels.addChild(bizStiles)
> >
> > thanks but I guess (know) I wasn't very clear.  In fact re-reading the
> > email makes me wonder why I used those words.  What I'm really asking is
> > when I "self.scan(somefunction) it will effect the children of the parent
> > by appling the "somefunction" to not only the parent but the children
> > too.  I think that's better said.
>
> I'm still confused about your question. Are you simply wondering why my
> bizSubopening.scan() routine wants to query values from the child and
> grandchild records?
>
> Paul

>From the doc string
"""Iterate over all records and apply the passed function to each.
Set self.exitScan to True to exit the scan on the next iteration.
If self.ScanRestorePosition is True, the position of the current
record in the recordset is restored after the iteration. If
self.ScanReverse is True, the records are processed in reverse order."""

I thought that scan just iterated over all the rows of a single bizobj (in 
this case the bizSubopenings) and it was possible to apply a function on each 
of the rows.  I think you are saying that it is also possible to scan 
bizSubopening applying a function to each row of bizSubopening and applying 
the same function to the children and grand children.  

Let's say I have global var and I have a function that uses a field from 
bizSubopening like "amount" and in my function I add the fields like
self.globalTotal = self.globalTotal + amount.  Would the function be applied 
to the children too?




-- 
John Fabiani


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to