Broken Dynamic textbox label text using onfocus?
#1
I can't find the answer anywhere but I can't believe it isn't possible, I am looking to update my "plot" textbox after the tmdb helper plugin finishes loading. When a button id is active/rolled over and an say an actor or button ID is rolled over or moused over, I'm looking for the onfocus to just do something stupid simple like update it with a string like "test me" just to see if I can do it. All searches seem to come up empty.

If the tmdb helper could call my person.xml and use onback, this wouldn't be a necessary ask, but I can't make that work either... so I've figured out how the onfocus works, so when the tmdb first opens, the plot is shown, my thought is to roll over id 101, and just have it update the plot with "test me".

Is this possible? It seems like updating the "label" of a textbox should be a fairly simple task. I just can't figure out the syntax of something so simple on how to do it via xml since I'm not doing anything script based.

Here is what the code looks like:

xml:

                <!-- Plot -->
                <control type="textbox" id="1000">
                    <top>644</top>
                    <bottom>125</bottom>
                    <include>AutoScrollPlot</include>
                    <label fallback="19055">$INFO[Container(10051).ListItem.Plot]</label>
                </control>

(Calls the actor panels, but using the theory the onfocus should be able to send the label update to the textbox, so that is the thought)
Original code before mod: 

xml:

<onup condition="Container(9000).HasFocus(101)">SetFocus(10052)</onup> Show Cast Panel ** Control/Button/Container ** -->

What I think should work but doesn't:

xml:

<onup condition="Container(9000).HasFocus(101)"><setlabel>1000, $INFO[Container(10051).ListItem.Property(Revenue)]</setlabel></onup>

So I guess the question is, can a textbox be updated after the initial load of the xml i.e. after the fact? 

If not, then I don't relish where this is going to go....
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#2
Not entirely sure what you want to do but the code you provided definitely wouldn't work.

Perhaps you want to SetProperty <onup> and then call the property from a variable.

So something like:
xml:
<onup>SetProperty(my_prop,my_prop_value,Home)</onup>

Then call it from $VAR[MyVariableName]:
xml:
<variable name="MyVariableName">
<value condition="!String.IsEmpty(Window(Home).Property(my_prop))">$INFO[Window(Home).Property(my_prop)]</value>
<value>$INFO[Container(10051).ListItem.Plot]</value>
</variable>
Reply
#3
I've got a majority of the recommended working, but I've been beating my head against the wall about how to move to the next layer. Since you have Madnox, when you are in TMDB info under the old script, your in script-embuary-video.xml and say click on an actor or crew, the script drops out the window and loads script-embuary-person.xml with similar layout just updated info based on the clicked actor data etc., I assume the onback brings you back to script-embuary-video.xml which is what is keeping track of where it is (which would make sense).

Under the tmdb helper recommended, I have the "equivalent" of script-embuary-video.xml but there is no way I can "call" script-embuary-person.xml that I have found (and if I could, that would solve all my whoas and I wouldn't need any of the above, tell me how and I'll buy you 2 coffees). So my thoughts are now that I have the equivalent running, when I hover over the active actor (as an example), I would update the plot with the bio, the poster with the actor image, and activate some of the elements script-embuary-person.xml would show i.e. icons like born, location etc... and when unfocused, get rid of all that and revert it back to the original values of the entry point of the movie... at least that is the "thought".... it's the execution I'm having issues with.

I've read the wiki front and back and after multiple trials and errors realized onclick can't be used hence I can't call the person.xml, and kodi doesn't let you call other windows because it complains about modal window being open or something... so I'm trying to keep the user experience relatively close as possible... I just am unclear as how to do it as the scripting handled the multiple levels and control and calling or multiple xml files where the recommended option here seems to be flat and single level.... unless I'm missing something? Is there another way to do this without tearing up the entire way the skin operates? 

I don't want to have this area suddenly be trashed because it is programmatically difficult, I just need to find the right way to do it which I assume is there, it is just unclear and utterly frustrating.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#4
The info action will call DialogVideoInfo and you can use String.IsEqual(ListItem.Property(item.type),person) to show what you need to.

Here is my plot variable that I use to show biography instead of the plot when TMDbH is showing it's person "dialog".
Reply
#5
(2024-08-04, 17:51)mikeSiLVO Wrote: The info action will call DialogVideoInfo and you can use String.IsEqual(ListItem.Property(item.type),person) to show what you need to.

Here is my plot variable that I use to show biography instead of the plot when TMDbH is showing it's person "dialog".

When DialogVideoInfo is showing info for a person then ListItem.Plot is set to the same data as ListItem.Property(Biography) so there's no need to use a variable to choose between them, you can just use ListItem.Plot.
Reply
#6
Did that change? I think I remember plot being empty when I added it over a year ago but not sure...

Regardless, it's still a good example to show how to use or exclude info when the item.type is person. Like hiding runtime or adding age, as an example.
Reply
#7
(2024-08-04, 18:42)mikeSiLVO Wrote: Did that change?
Not sure, I use ListItem.Plot and it seems to always give me the same info as ListItem.Property(Biography).

Sure it's a good example to learn from but in my final code I like to use as few conditionals as possible, I use low powered devices so every little optimisation helps Smile
Reply
#8
Ah I see, it is starting to make sense, it seems everything needs to be $var based to do dynamics, or at least that is the way it "feels" anyway.

So I did this:

xml:

    <variable name="VideoInfoPlotVar">
        <value condition="String.IsEqual(ListItem.Property(item.type),person)">$INFO[ListItem.Property(Biography)]</value>
        <!-- <value condition="System.AddonIsEnabled(script.skin.info.service) + String.IsEqual(ListItem.DBTYPE,set) + Skin.HasSetting(SetInfoPlotToggle) + !String.IsEmpty(Window(Home).Property(SkinInfo.Set.Movies.Plot))">$INFO[Window(Home).Property(SkinInfo.Set.Movies.Plot)]</value> -->
        <!-- <value condition="Skin.HasSetting(VideoInfoPlotToggle) + !String.IsEmpty(ListItem.PlotOutline)">$INFO[ListItem.PlotOutline]</value> -->
        <value condition="!String.IsEmpty(ListItem.Plot)">$INFO[ListItem.Plot]</value>
        <value>$LOCALIZE[19055]</value>
    </variable>

xml:

                <!-- Plot -->
                <control type="textbox" id="1000">
                    <top>644</top>
                    <bottom>125</bottom>
                    <include>AutoScrollPlot</include>
                    <label fallback="19055">$VAR[VideoInfoPlotVar]</label>
                </control>

And it "works"............ "almost". It is following a persistence problem I was seeing in the tmdb.helper thread with the MPAA flag. What is happening, when the page loads, the plot is present as it should be, the second I move the mouse, it defaults to "no information found"... but if I hover over the actor, the biography does show up, so that is a great start.

I can't sort out the persistence issue as to why it falls into a default mode when the mouse is moved and it isn't something I can remove as the entire skin is mouse driven, so I need to figure out how to handle whatever that issue is. I've added a quick video for reference.

http://www.kittmaster.com/imagedump/kodi...iable.html
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#9
If you post the script-tmdbhelper-recommendations.xml file, I'll take a look when I can.

Also the complete RunScript you're using to call the recommendations dialog.

Scratch that, try adding the below to the RunScript;
Code:
,winprop_plot=$VAR[VideoInfoPlotVar]

Then add the below to VideoInfoPlotVar above the last value:
xml:
<value condition="!String.IsEmpty(Window.Property(plot))">$INFO[Window.Property(plot)]</value>
Above this line ↓
xml:
<value>$LOCALIZE[19055]</value>
Reply
#10
(2024-08-05, 22:19)mikeSiLVO Wrote: If you post the script-tmdbhelper-recommendations.xml file, I'll take a look when I can.

Also the complete RunScript you're using to call the recommendations dialog.

Scratch that, try adding the below to the RunScript;
Code:
,winprop_plot=$VAR[VideoInfoPlotVar]

Then add the below to VideoInfoPlotVar above the last value:
xml:
<value condition="!String.IsEmpty(Window.Property(plot))">$INFO[Window.Property(plot)]</value>
Above this line ↓
xml:
<value>$LOCALIZE[19055]</value>

I didn't want to muddy the waters and I know the last time I upped to your repo it was a mess, so I created a separate repo on mine with a snapshot as of 5 minutes ago of exactly what is on my system now here:

https://github.com/kittmaster/DevOnlyCol.../tree/main

Things to note:

The script values are in Includes_InfoDialogs.xml @line 2215, the call is in the same file at line 203

The hidden lists are located in Custom_1191_TMDbHelperRecommended.xml and mirror the embuary script locations so that I can "lift" as much of the original code to keep as much in tact without corrupting the user flow. If you go into TMDB info, you will see a lot of it is operational and a lot of it has just come together in the last few days.

The code comments may be a off, so I wouldn't go by much of that, and TV shows and music are still todos as I've been trying to get movies running.

But anyway, that is how I've gotten to this point.

Thanks!
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#11
It wasn't a mess, you just needed to make a new branch, base it on master then either delete all files and copy/paste or overwrite if nothing was deleted or renamed.

Try the above mentioned solution and see if that works.

Also feel free to use that repo, you can't mess anything up that I couldn't fix. Even if you deleted everything or totally borked it up. I could still fix it :)

EDIT: I also added plot and poster to the tmdbh_test branch HERE
Reply
#12
(2024-08-05, 23:46)mikeSiLVO Wrote: It wasn't a mess, you just needed to make a new branch, base it on master then either delete all files and copy/paste or overwrite if nothing was deleted or renamed.

Try the above mentioned solution and see if that works.

Also feel free to use that repo, you can't mess anything up that I couldn't fix. Even if you deleted everything or totally borked it up. I could still fix it Smile

EDIT: I also added plot and poster to the tmdbh_test branch HERE
I am actively working on this now, but notice one major clusterF... 

Inside of Includes_InfoDialogs.xml there are 2 instances of: VideoInfoPlotVar @line 2007 and @Line2259

So that I am looking to merge those two things with your suggestion and what I have and see where it lands and remove what works/doesn't, unless you find something before I do.

I added the winprop line to the script line, and I see you added a poster version also..... on top of it all, this is one thing that I truly do NOT understand..... what exactly is this doing? Why is it needed? I did see you had something similar in your script in your skin, I have read the wiki, but I don't understand the mechanism of what it does or why it is needed.

The other question at some point I was going to ask is this... and outside the scope of issue right now... jurialmunkey mentions "isupdating" is not working in this mode and use something else.... and I noticed that my old script uses it and an | statement in a few lines... I assume to "wait" for things to load..... he mentions there is a way to "replace it"... but my thought was... I see the buttons "loading" as the hidden lists are parsed until they completely finish... I assume there is a way to "delay" the entire page to render out until all of that stuff completely loads up and then allow the user to see the page (while the circle spins > isbusy.xml) I think... ? Anyway, at some point, will be looking to see if there is a way or if I should implement something like that to improve user experience....but that is down the road and just setting the table for a possible question for later on.

Working on this for the next 4 hours til bed, hopefully can resolve the double hit and get it sorted. I have a few other odds and ends but IMHO, I think it's coming along, open to suggestions and critiques, so don't let my roughness if perceived via frustration hold anything back... Wink  All of this is much appreciated to say the least.

Greetz,
Chris
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply
#13
Delete the 2259 one and use the 2007 one but add the line I mentioned above after adding the win props to the RunScript line.


xml:
<variable name="VideoInfoPlotVar">
<value condition="Skin.HasSetting(VideoInfoPlotOutline) + !String.IsEmpty(Container.ListItem.PlotOutline)">$INFO[Container.ListItem.PlotOutline]</value>
<value condition="!String.IsEmpty(Container.ListItem.Plot)">$INFO[Container.ListItem.Plot]</value>
<value condition="ControlGroup(9001).HasFocus + !Control.HasFocus(50)">$LOCALIZE[31348]</value>
<value condition="Skin.HasSetting(VideoInfoPlotOutline) + !String.IsEmpty(ListItem.PlotOutline)">$INFO[ListItem.PlotOutline]</value>
<value condition="!String.IsEmpty(ListItem.Plot)">$INFO[ListItem.Plot]</value>
<value condition="!String.IsEmpty(Window.Property(plot))">$INFO[Window.Property(plot)]</value>
<value>$LOCALIZE[31348]</value>
</variable>
Reply
#14
The winprop addition is to add things to the recommendations dialog that aren't populated. The only things you have access to are what you ask for in the containers you pick between the || so cast, crew, similar, etc... None of which is the original movie.

As for the other question, you just want to show a busy image while everything loads?
Reply
#15
(2024-08-06, 01:55)mikeSiLVO Wrote: As for the other question, you just want to show a busy image while everything loads?

Would that make logical sense to do?

The other thing I need to sort out is when I hover over the actor/crew, is the ability to "click" the image, because it loads back to DialogVideoInfo.xml and all partial images and messed up presentation. So that needs to be removed somehow.

The plot thing is partially working, it seems 'half' of the text disappears when you move the mouse... but the first "line" of the plot remains. I'm going back to verify my work, but that is what I'm seeing thus far.
Kodi: Nexus v20.5 | Skin Dev: Madnox Omega/Nexus: v20.01.02 | Madnox ForumRoot | Madnox Repov1.0.09 | Mr. V'sSource | Kodi Texture Tool (Takeover): v3.0.1 | Batch Texture Resize (Irfanview): Tutorial
Working On
: Replacing Embruary >> TMDB Helper || Start: 6/3/2024 End: God knows || Status Complete: Movies: 80% TV Shows: 40% Music: 20%
Reply

Logout Mark Read Team Forum Stats Members Help
Dynamic textbox label text using onfocus?0