Navigating the Jive source code

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cliveb
    Senior Member
    • Apr 2005
    • 2075

    Navigating the Jive source code

    Background: I added a comment to Bugzilla in support of an enhancement request. The reply came back that it was in consideration, but why not learn LUA and have a go myself?

    Well, I've started trying to do just that. LUA is an interesting language. Compact, elegant, and powerful. But on the downside, it seems to be one of those "write-only" languages. I'm having real trouble finding my way around the LUA source code in Jive. The documentation (in the jive/doc/html folder) is pretty sparse.

    [A specific example: in DefaultSkinApplet's "skin" function, it sets up "s.albumitem". I have searched the entire Jive source code (both LUA and C code), and absolutely nowhere is there a reference to "albumitem". But I know it affects the interface, because I've adjusted some values and observed the resulting changes. I can only conclude that perhaps the name "albumitem" is being constructed dynamically somewhere, but finding it seems an almost hopeless task].

    Are there any documents around that describe the overall structure of the Jive source code?
    Until recently: Transporter -> ATC SCM100A, now sold :-(
    House move forced change to: piCorePlayer(RPi2/HiFiBerry DIGI2 Pro) -> Meridian 218 -> Meridian M6
  • Fred
    Senior Member
    • Jun 2005
    • 610

    #2
    Originally posted by cliveb
    [A specific example: in DefaultSkinApplet's "skin" function, it sets up "s.albumitem"...
    You did not pick the most straightforward bit in the code The style thing is a simplified version of CSS and SlimBrowser is a complex machine.

    You can see "albumitem" being built in SlimBrowserApplet.lua, line 352. It's used when rendering the menu, line 1268 (making a decoratedLabel).
    The C code will look at the content of table s.albumitem (what you changed) to determine how to draw the bits.

    But on the downside, it seems to be one of those "write-only" languages. I'm having real trouble finding my way around the LUA source code in Jive. The documentation (in the jive/doc/html folder) is pretty sparse.
    Arguably, the sparse docs assumes some level of Lua knowledge. At least the docs exists, checked the ones for SqueezeCenter lately?
    Now, I agree what exists is mainly reference material and not walkthrough material. So the best option is to persevere and ask here if/when you hit any roadblock.

    HTH
    Fred

    Comment

    • cliveb
      Senior Member
      • Apr 2005
      • 2075

      #3
      Originally posted by Fred
      You did not pick the most straightforward bit in the code The style thing is a simplified version of CSS and SlimBrowser is a complex machine.
      Adding an applet was pretty easy, but I'm trying to figure out how to disable the display of artwork, which as far as I can tell requires dynamically modifying the skin as the options are changed (in a "SetupArtworkDisplay" applet).

      Originally posted by Fred
      You can see "albumitem" being built in SlimBrowserApplet.lua, line 352. It's used when rendering the menu, line 1268 (making a decoratedLabel).
      The C code will look at the content of table s.albumitem (what you changed) to determine how to draw the bits.
      OK, thanks for the pointers. Hopefully it will open up a few more routes for me to explore.
      Until recently: Transporter -> ATC SCM100A, now sold :-(
      House move forced change to: piCorePlayer(RPi2/HiFiBerry DIGI2 Pro) -> Meridian 218 -> Meridian M6

      Comment

      Working...