B4A Library CustomListView - A flexible list based on ScrollView

Discussion in 'Additional libraries, classes and official updates' started by Erel, Jul 15, 2012.

Thread Status:
Not open for further replies.
  1. ilan

    ilan Expert Licensed User

    But he is saying that in RELEASE mode it runs much slower. It's weird o_O
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Oops, missed that.

    Please start a new thread in the questions forum.
     
  3. fbritop

    fbritop Active Member Licensed User

    Erel,
    I think you understood all the way around. It runs faster in debug mode than in release mode. That's the wierd thing
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread in the questions forum.
     
  5. Erel

    Erel Administrator Staff Member Licensed User

    New version (1.70) was uploaded to the first post.
     
    jazzzzzzz and mangojack like this.
  6. rscheel

    rscheel Well-Known Member Licensed User

    How can I configure Custom Properties by code?
     
  7. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this question.
     
  8. LucaMs

    LucaMs Expert Licensed User

    [V. 1.70]

    I would add (um... I added to my version) GetDividerHeight (property or function).

    Also, I think that an exception handler for an "index out of bound" error should be added to:
    Code:
    'Returns the Panel stored at the specified index.
    Public Sub GetPanel(Index As Int) As Panel
        
    Dim p As Panel
        p = panels.Get(Index) 
    'this is the parent panel
        Return p.GetView(0)
    End Sub
    otherwise the app will crash.
     
  9. Erel

    Erel Administrator Staff Member Licensed User

    This is the desired result if you try to access an invalid index. If the developer would like for some reason to catch this error instead of fixing the code then it can be added in the developer's code.
     
    DonManfred likes this.
  10. LucaMs

    LucaMs Expert Licensed User

    I disagree but it is your view :)
     
  11. Erel

    Erel Administrator Staff Member Licensed User

    This is an important concept. Library developers (CLV is a library in this regard) should avoid catching exceptions whenever possible. This is the developer responsibility to decide how to handle errors.

    In this case it is a programming error so it is even more clear. If a developer tried to get an invalid panel then the code should help him fix this error. Returning a different panel (maybe the last one) will lead to other errors which will be more difficult to debug.
     
    mangojack and ilan like this.
  12. ilan

    ilan Expert Licensed User

    Without that error you would not get the correct result and not know why you dont get it. I agree with erel. The whole idea is not just to have an app without any crashes you want to have an app that does what you programmed it to do! Then u need to catch all errors and fix them.
     
  13. LucaMs

    LucaMs Expert Licensed User

    If you declare an array with N elements and then you try to access the N+1 element you get an out of bound error.
    This is the behavior of the Core library, I think (or I don't know from where you get the message :)).
    Don't you see a similitude?
     
  14. ilan

    ilan Expert Licensed User

    Open a chit chat thread and lets discuss it there. Here its not the right place.
     
    DonManfred likes this.
  15. LucaMs

    LucaMs Expert Licensed User

    494 posts about CLV and this is not the right place to talk about it? :eek:;)
     
  16. ilan

    ilan Expert Licensed User

    Its not related to CLV, its related to coding in general.
     
    DonManfred likes this.
  17. LucaMs

    LucaMs Expert Licensed User

    I do not know if it is my fault in my poor English or my natural tone (which obviously I can not reproduce) but it seems that if I dare to give a hint it is often mistaken for criticism!

    Mah!

    Critiques, among other things, help to improve.
     
  18. LucaMs

    LucaMs Expert Licensed User

    #488
     
  19. Erel

    Erel Administrator Staff Member Licensed User

    I don't see any problem with the posts above. It was a healthy discussion about exceptions and libraries.
     
    LucaMs likes this.
  20. LucaMs

    LucaMs Expert Licensed User

    This was not my intention, my was a suggestion about the CLV.
    I see many similarities between an "internal" array and any exceptions and elements of the CLV.

    I also have some doubts about the dividerHeight: what do I do, hang and suit? :)

    P.S. I don't know how to translate "taccio e mi adeguo?" (used google translate but I don't trust much this translation :))
     
Thread Status:
Not open for further replies.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice