Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#184 Allow collection\\\'s \\\"appendAll\\\" method to accept a supplier

v3.2.0
closed
David Ashley
Classes (154)
5
2012-08-14
2007-06-04
No

A supplier is an iteration over a collection. As such it should be usable as an argument for the "appendAll". In this case an optional second argument should indicate whether to use the supplier's index value (=default) or the supplier's item value for the append operation.

Hence:

 appendAll(supplier[, [Index=default|Item])

Discussion

  • Rick McGuire
    Rick McGuire
    2007-06-04

    Logged In: YES
    user_id=1125291
    Originator: NO

    Committed revision 428.

    Adding an option to appendAll that would just be specific to the supplier case is not a good solution to this problem. It's more appropriate for the supplier class to be able to extract the values and/or indexes from the supplier as an array, which can then be provided to the appendAll context. The new methods are ALLITEMS and ALLINDEXES. These methods will perform the supplier iteration and accumulate all of the ITEM and INDEX items in arrays. From that point, the AVAILABLE method will return false. The accumulation is done from the current supplier position, so it is possible to skip over leading items in the supplier.

     
  • Logged In: YES
    user_id=662126
    Originator: YES

    Yes, that is much better, just great! Thank you very much! (The reference card just has been updated to reflect this addition.)

     
  • Rick McGuire
    Rick McGuire
    2007-06-05

    Logged In: YES
    user_id=1125291
    Originator: NO

    Grrr, for some reason, when you add a comment to one of these in the "Pending" state, it seems to reset the state to "Open". No record of the state change in the update history either.

     
  • Rick McGuire
    Rick McGuire
    2007-06-20

    Logged In: YES
    user_id=1125291
    Originator: NO

    This RFE just adds a SUPPLIER method to the supplier class. This method merely returns a reference to itself. This is useful for methods such as APPENDALL which will work with any object that can return a SUPPLIER object.

     
  • Rick McGuire
    Rick McGuire
    2007-06-20

    Logged In: YES
    user_id=1125291
    Originator: NO

    Oops, SUPPLIER was added for a different RFE, but these are related.

    The SUPPLIER class has two new methods added, ALLITEMS and ALLINDEXES. ALLITEMS will return an array of all item values from the current supplier position to the end. ALLINDEXES will do the same for the index values. Once either ALLITEMS or ALLINDEXES have been called, the AVAILABLE method on the target supplier will return .false for the supplier.

     


Anonymous


Cancel   Add attachments