• array of filenames

    From spaceman@21:1/162 to All on Saturday, January 07, 2023 04:01:18
    I am trying to create a custom file browse view - is there a way to create an array of the filenames + stats and then display them in a full menu view? Looking to create something more akin to a mystic file listing:

    # filename description ul-date ul-by

    1 filename.zip whateverandstuff 12-12-2002 spaceman
    And then have a text detail view on the lower third of the screen thats the detail view (populated keyed off whatever the current selection in the file list is?

    I didnt see an example/way to programatically populate a view array..?




    --- ENiGMA 1/2 v0.0.14-beta (linux; x64; 14.21.2)
    * Origin: midnight coffee (21:1/162)
  • From NuSkooler@21:1/121 to spaceman on Sunday, January 08, 2023 21:34:10

    On Saturday, January 7th spaceman was heard saying...
    I am trying to create a custom file browse view

    Sweeeet! I know a number of people are put off by the default enig file browser, so you may get real popular :D

    Twas Saturday, January 7th when spaceman said...
    # filename description ul-date ul-by
    1 filename.zip whateverandstuff 12-12-2002 spaceman

    I think what you'd want is a ListView with a custom 'itemFormat' / 'focusedItemFormat'. What that does is allow you to control the format of the list (array) of objects and reference their properties in the xxxxFormat, e.g.
    "|04{fileName:<20} {byteSize}" could expand to show the filename and byte size.

    There are examples of this all over the default theme/system.

    For the detail, you can treat it similar to how the default browser shows the file description. It's just a MultiLineTextView.

    There are some APIs you can find in the default browser to fetch the listings themselves.

    Hope that helps! I'm happy to help you if you get stuck :)




    --
    |08 ■ |12NuSkooler |06// |12Xibalba |08- |07"|06The place of fear|07"
    |08 ■ |03xibalba|08.|03l33t|08.|03codes |08(|0344510|08/|03telnet|08, |0344511|08/|03ssh|08)
    |08 ■ |03ENiGMA 1/2 WHQ |08| |03Phenom |08| |0367 |08| |03iMPURE |08| |03ACiDic
    --- ENiGMA 1/2 v0.0.14-beta (linux; x64; 16.16.0)
    * Origin: Xibalba -+- xibalba.l33t.codes:44510 (21:1/121)
  • From spaceman@21:1/162 to NuSkooler on Monday, January 09, 2023 10:13:53
    Right on - I'll give it a shot and see what happens :)

    thx!



    On 01/08/2023 8:34 pm NuSkooler said...
    Sweeeet! I know a number of people are put off by the default enig file browser, so you may get real popular :D
    I think what you'd want is a ListView with a custom 'itemFormat' / 'focusedItemFormat'. What that does is allow you to control the format of the list (array) of objects and reference their properties in the xxxxFormat, e.g. "{fileName:<20} {byteSize}" could expand to show the filename and byte size.



    --- ENiGMA 1/2 v0.0.14-beta (linux; x64; 14.21.2)
    * Origin: midnight coffee (21:1/162)