Android Question Value parameter of xCustomListView

Discussion in 'Android Questions' started by Albert Kallal, May 25, 2019.

  1. Albert Kallal

    Albert Kallal Member Licensed User

    I just went through Erel's custom list view example here:

    https://www.b4x.com/android/forum/t...-cross-platform-customlistview.84501/#content
    I should watch more of these - they are actually helpful! - group hug for the "tiny" bit of info where it is explained the defined controls are the "last" ones whenB4XView.loadlayout() is used - that tiny tid bit was important.

    The only question here is what is the Value parameter of the CustomerListView.Add(MyB4XView, "???")

    What is the 2nd object "value" for? (I'm ignoring it, and all is well - but I am missing what that value is for?) The circle below:

    I have this snip - it works all fine:

    [​IMG]

    I get this just fine - works oh so nice.

    [​IMG]

    Only part I don't grasp is the "object" parm of this:

    CustomListView1.Add(CreateItem(i), obj)

    Obj in above? Is that a byref return value of the object?

    Perhaps not important, but I think I should at least ask/grasp what that 2nd object value is used for?
    (can ignore this value parameter as I am? - it all seems to work rather well - beyond what could ask for!!! ).

    Regards,
    Albert D. Kallal
    Edmonton, Alberta, Canada
     
  2. MarkusR

    MarkusR Well-Known Member Licensed User

  3. Albert Kallal

    Albert Kallal Member Licensed User

    Ah, ok!
    Thank you so much. Any object I would want to save and keep for that "row" (panel).

    So, a row of data, a object/type with several values. A graphic status or image
    (Earl's example video did exactly that - declared a type - and thus was able to send "several" values along for the ride).

    In my case I am using the button tag - but allowing one to add any kind of object/type to that one conceptual row makes a ton of sense.
    (very nice ability)

    So, me much so happy I asked.

    Again, thank you kindly,
    Regards,
    Albert D. Kallal
    Edmonton, Alberta Canada
     
    MarkusR likes this.
  4. Mahares

    Mahares Well Known Member Licensed User

    Is this Kallal the World Famous Microsoft MVP. If so, welcome to the B4X forum. You are in with some great company in this forum. I hope you stick with it. You will discover many genius brains like yours.
     
    Erel, jimmyF and mangojack like this.
  5. Albert Kallal

    Albert Kallal Member Licensed User

    Well, I certainly been around the on-line community for quite some time.

    I was a Microsoft MVP awardee from 2003-2017 (for office + MS Access). I still maintain quite a presence in the Access community.

    Spend lots of time in vb.net/asp.net/sql server these days (and yes, some JavaScript too!) – but one reason I’m here is I wanted a dev tool with a minimal of markup, and wanted to avoid too much JavaScript).

    I have a strong personal belief that “major” portions of the layout and design process should not involve me writing much code.

    B4A has this nice balance between what you can do, and the amount of “wiring” up things, but does not hold one back in terms of features.
    Thank you kindly.

    I will say that my experience with B4A so far has been really wonderful. For a given amount of effort, what I accomplished so far is nothing short of amazing.


    I did not realize the breath of this product. I have to try hard NOT to find example code that gives so much on a silver platter.

    I had a SQLite database and some code up and running in just a few hours. Of course the data and tables come from MS-Access!

    If I ever get some time? I’m going to write a record set class for editing data in B4A. But, baby steps, baby steps!!

    And, the stunning performance of B4A at runtime is another surprise. That JIT (just in time compiler) + optimizations of the Android system is leveraged by B4A. So, in a funny way, I am entering this strange new Android world at a great time, and B4A is rather mature right now.

    My expectations were not high jumping on B4A. But, at every turn, my expectations have been exceeded.

    And the community here? Again, great, and right up my alley in terms of the help I received.

    And yes – it is me! ;-)

    Regards,
    Albert D. Kallal
    Edmonton, Alberta Canada
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    jimmyF likes this.
  7. jimmyF

    jimmyF Active Member Licensed User

    I will certainly be watching for this!

    Thank you for your contributions to the VB/Access community.
     
    Albert Kallal likes this.
  8. Albert Kallal

    Albert Kallal Member Licensed User

    Yes - a nice example. I had already had found and played with that example! (thank you).

    That example does have the "concept" of a bound data form (and a designer to boot).

    I am debating if I want the popup/modal form idea or not.
    (perhaps I look closer and not necessary have to popup that form --- I'm going full screen for edit forms).

    And I'm looking to place a "exit/return" button to previous always in upper left corner. (consistent motor memory - same position for exit/save button in "all" places).
    As I learn? - maybe a swipe right to return + exit too - but, Baby steps, Baby steps!!).

    I don't know if I need (or want) that level of abstraction right now. But, I do believe in flying the flag up the pole with pirate symbols on it!- That means use existing examples and to resist wanting to roll my own code. (Developers want to write code because writing code is easier then reading code!).

    However, for sure the push + pull of the data to the controls, and not having to write any SQL updates is a goal of mine by suggesting to build some kind of cursor (record set object) that has "update" ability. The goal is table updates without having to write sql updates. And after that does follow routines to data bind the controls without code.

    So far I don't expect too much work to push + pull data to/from controls and back to the table.
    That example is certainly a candidate in the running for at least reducing the code for "CRUD" operations.

    As I stated - buckets of choices here.

    B4A feels like I just walked into a ice cream store with a huge board listing out 250 flavors.

    And, I walk in? Well, I think I go with vanilla today! Vanilla not even listed on the big board of choices!!

    Mountains and mountains of choices! And I am going to pick just one??? Just one today? Is that all I get?

    Darn - this is hard to just pick one flavor!

    Again, thank you.

    Regards,
    Albert D. Kallal
    Edmonton, Alberta Canada
     
    Erel, mangojack and Peter Simpson like this.
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