[Solved] Dialog won't close
#1
i'm calling a custom dialog with a button:
Code:
<onclick condition="IsEmpty(Skin.String(MusicPin.1.Label))">ActivateWindow(3100)</onclick>

but this dialog won't close after selecting something:

Code:
<window id="3100" type="dialog">
    <defaultcontrol always="true">300</defaultcontrol>
    <allowoverlay>yes</allowoverlay>
    <backgroundcolor>0</backgroundcolor>
    <coordinates>
        <origin x="0" y="210" />
    </coordinates>
    <controls>

        <!--<include>GlobalOverlay</include>-->

        

            <control type="image">
                <posx>0</posx>
                <posy>0</posy>
                <width>1280</width>
                <height>300</height>
                <texture>white.png</texture>
            </control>
            
            <control type="grouplist">
            
                <posx>20</posx>
                <posy>20</posy>
                <width>880</width>
                <itemgap>10</itemgap>
                <orientation>vertical</orientation>
                

                <control type="label">
                    <description>Heading</description>
                    <posx>20</posx>
                    <label>Wählen Sie einen Inhaltstyp...</label>
                    <width>840</width>
                    <font>DialogHeadline</font>
                    <textcolor>Accent</textcolor>
                    
                </control>

                <control type="label">
                    <description>Line 1</description>
                    <posx>20</posx>
                    <posy>72</posy>
                    <label>Der aktuelle Pin wird gelöscht!</label>
                    <width>590</width>
                    <scroll>true</scroll>
                    <textcolor>Accent</textcolor>
                    
                </control>

                <control type="label">
                    <description>Line 2</description>
                    <posx>20</posx>
                    <posy>104</posy>
                    <label>-</label>
                    <width>590</width>
                    <scroll>true</scroll>
                    <textcolor>Accent</textcolor>
                    
                </control>

                <control type="label">
                    <description>Line 3</description>
                    <posx>20</posx>
                    <posy>136</posy>
                    <label>-</label>
                    <width>590</width>
                    <scroll>true</scroll>
                    
                </control>
            </control>
            
            <control type="list" id="300">
                <posx>780</posx>
                <posy>140</posy>
                <width>400</width>
                <height>200</height>
                
                <itemgap>20</itemgap>
                <orientation>horizontal</orientation>
                
                <itemlayout width="200" height="200">
                    <control type="image">
                        <width>150</width>
                        <height>150</height>
                        <texture>$VAR[AccentColor]</texture>
                    </control>
                    <control type="image">
                        <width>150</width>
                        <height>150</height>
                        <texture>$INFO[ListItem.Icon]</texture>
                    </control>
                    <control type="label">
                        <width>150</width>
                        <height>25</height>
                        <posx>5</posx>
                        <posy>125</posy>
                        <label>$INFO[ListItem.Label]</label>
                        <textcolor>White</textcolor>
                    </control>
                </itemlayout>
                <focusedlayout width="200" height="200">
                    <control type="image">
                        <width>150</width>
                        <height>150</height>
                        <texture>$VAR[AccentColor_Light]</texture>
                    </control>
                    <control type="image">
                        <width>150</width>
                        <height>150</height>
                        <texture>$INFO[ListItem.Icon]</texture>
                    </control>
                    <control type="label">
                        <width>150</width>
                        <height>25</height>
                        <posx>5</posx>
                        <posy>125</posy>
                        <label>$INFO[ListItem.Label]</label>
                        <textcolor>White</textcolor>
                    </control>
                </focusedlayout>
                <content>
                    <item id="1">
                        <label>Addons</label>
                        <icon>icons/addons_white.png</icon>
                        <onclick>Skin.Reset(MusicPin.1.Label)</onclick>
                        <onclick>Skin.Reset(MusicPin.1.Icon)</onclick>
                        <onclick>Skin.Reset(MusicPin.1.Path)</onclick>
                        <onclick>Dialog.Close(3100,true)</onclick>
                        <onclick>Skin.SetAddon(MusicPin.1.Label,xbmc.python.pluginsource)</onclick>
                        
                    </item>
                    <item id="2">
                        <label>Favoriten</label>
                        <icon>icons/bookmarks_white.png</icon>
                        <onclick>Skin.Reset(MusicPin.1.Label)</onclick>
                        <onclick>Dialog.Close(3100,true)</onclick>
                        <onclick>RunScript(script.favourites,property=MusicPin.1)</onclick>
                        
                    </item>
                </content>
                
            </control>

        

    </controls>

</window>

and i don't understand why! suggestions?
Reply
#2
Try <onclick>PreviousMenu</onclick> instead.

Edit: Instead of the id (which doesn't work on custom dialogs), use the filename, e.g. MyDialog.xml.
Image
Reply
#3
(2012-10-02, 19:52)`Black Wrote: Try <onclick>PreviousMenu</onclick> instead.

Edit: Instead of the id (which doesn't work on custom dialogs), use the filename, e.g. MyDialog.xml.

the id works for custom dialogs. remove the ",true" parameter.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#4
yes, ids are working... but not filenames and <onclick>PreviousMenu</onclick> also didn't worked... strange

there was another control with id 3100... sorry for this stupid mistake and thanks for the heads up

Reply
#5
(2012-10-02, 21:44)phil65 Wrote:
(2012-10-02, 19:52)`Black Wrote: Try <onclick>PreviousMenu</onclick> instead.

Edit: Instead of the id (which doesn't work on custom dialogs), use the filename, e.g. MyDialog.xml.

the id works for custom dialogs. remove the ",true" parameter.

You're right, got that mixed up with the add-on windows/dialogs which have no id so you have to use the filename there. Smile
Image
Reply

Logout Mark Read Team Forum Stats Members Help
[Solved] Dialog won't close0