home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 2
Plugin Development
Questions on writing my first plugin
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="huha" data-source="post: 889601" data-attributes="member: 63847"><p>I am nearly done with tvwishlist, but i am running into a roadblock on the last task. I am trying to implement the "Pog" button, where I can "steal" from another screen information and transfer to TvWishlist.</p><p>I tried to modify the SlimTv DialogprogramActionsFull.xaml and added successfully another button.</p><p>This button should call a function in a different model (and later transfer via parameter the selected program from the EPG guide)</p><p> </p><p> </p><p> </p><p>[spoiler]</p><p><?xml version="1.0" encoding="utf-8"?></p><p><Include</p><p>xmlns="<a href="https://www.team-mediaportal.com/2008/mpf/directx" target="_blank">www.team-mediaportal.com/2008/mpf/directx</a>"</p><p>xmlns:x="<a href="http://schemas.microsoft.com/winfx/2006/xaml" target="_blank">http://schemas.microsoft.com/winfx/2006/xaml</a>"</p><p>Source="screens\simple_dialog_menu.xaml"</p><p>></p><p><Include.Resources></p><p><Service x:Key="ScreenManager" InterfaceName="ScreenManager"/></p><p> </p><p><!-- Dialog title --></p><p><ResourceWrapper x:Key="Dialog_Header_Text" Resource="[SlimTvClient.ChooseProgramAction]"/></p><p> </p><p><!-- SlimTvMultiChannelGuide model --></p><p><Model x:Key="SlimTvMultiChannelGuide" Id="5054408D-C2A9-451f-A702-E84AFCD29C10"/></p><p><Model x:Key="MyTestPluginSlimTv" Id="023c44f2-3329-4781-9b4a-c974444c0b0d"/></p><p> </p><p> </p><p><!-- Command --></p><p><CommandStencil x:Key="Execute_Command_Stencil"</p><p>Source="{StaticResource SlimTvMultiChannelGuide}" Path="ExecProgramAction"/></p><p> </p><p> </p><p><ControlTemplate x:Key="Contents_Template"></p><p> </p><p> </p><p><DockPanel Context="{Model Id=5054408D-C2A9-451f-A702-E84AFCD29C10}" LastChildFill="False"></p><p> </p><p><Grid HorizontalAlignment="Stretch"></p><p><Grid.ColumnDefinitions></p><p><ColumnDefinition Width="Auto"/></p><p> </p><p></Grid.ColumnDefinitions></p><p><Grid.RowDefinitions></p><p><RowDefinition Height="Auto"/></p><p><RowDefinition Height="*"/></p><p> </p><p></Grid.RowDefinitions></p><p><ListView Name="DialogMenu" Grid.Column="0" Grid.Row="0" ItemsSource="{Binding Source={StaticResource SlimTvMultiChannelGuide},Path=ProgramActions,Mode=OneTime}" Style="{ThemeResource MenuListViewStyle}"></p><p> </p><p></ListView></p><p> </p><p> </p><p><!--<Command Source="{Service ScreenManager}" Path="ShowDialog" Parameters="dialogWeatherSearchResult"/>--></p><p><!--<Command Path="SearchLocations" Parameters="{LateBoundValue BindingValue={Binding Path=SearchCity}}"/>--></p><p><!--Command="{Command Source={Service WorkflowManager},Path=NavigatePop,Parameters=1}"/>--></p><p><!--Command="{Command Source={Service WorkflowManager},Path=NavigatePush,Parameters={StaticResource EditShareNameStateId}}"/>--></p><p> </p><p><Button Style="{ThemeResource DialogButtonStyle}" Grid.Column="0" Grid.Row="1" Context="{Model Id=023c44f2-3329-4781-9b4a-c974444c0b0d}" Content="TvWish" HorizontalAlignment="Center"></p><p><Button.Command></p><p><CommandList></p><p><Command Source="{StaticResource MyTestPluginSlimTv}" Path="SlimTv"/></p><p><Command Source="{Service ScreenManager}" Path="CloseTopmostDialog"/></p><p></CommandList></p><p></Button.Command></p><p></Button></p><p> </p><p></Grid></p><p> </p><p></DockPanel></p><p></ControlTemplate></p><p></Include.Resources></p><p></Include></p><p>[/spoiler]</p><p> </p><p>I have modified the skin in the following way, that I defined first a second Model reference MyTestPluginSlimTV pointing to MyTestPlugin and defined then a button calling a function SlimTv() in my test plugin. The function in the MyTestPlugin model is simply to log the event</p><p> </p><p>public void SlimTv()</p><p>{</p><p>HelloString = "message from slimtv";</p><p>mylogger.Debug("SlimTv called");</p><p>}</p><p> </p><p>The error message is</p><p>[InputMgr ] [WARN ] - CommandBaseMarkupExtension: Could not find method, could not execute command ({Command Source=MyTestPlugin.Models.MyTestPlugin,Path=SlimTv})</p><p>It looks like it cannot find the actual instance of the model. The complete log file is attached. Any ideas how this can be done?</p></blockquote><p></p>
[QUOTE="huha, post: 889601, member: 63847"] I am nearly done with tvwishlist, but i am running into a roadblock on the last task. I am trying to implement the "Pog" button, where I can "steal" from another screen information and transfer to TvWishlist. I tried to modify the SlimTv DialogprogramActionsFull.xaml and added successfully another button. This button should call a function in a different model (and later transfer via parameter the selected program from the EPG guide) [spoiler] <?xml version="1.0" encoding="utf-8"?> <Include xmlns="[URL='https://www.team-mediaportal.com/2008/mpf/directx']www.team-mediaportal.com/2008/mpf/directx[/URL]" xmlns:x="[url]http://schemas.microsoft.com/winfx/2006/xaml[/url]" Source="screens\simple_dialog_menu.xaml" > <Include.Resources> <Service x:Key="ScreenManager" InterfaceName="ScreenManager"/> <!-- Dialog title --> <ResourceWrapper x:Key="Dialog_Header_Text" Resource="[SlimTvClient.ChooseProgramAction]"/> <!-- SlimTvMultiChannelGuide model --> <Model x:Key="SlimTvMultiChannelGuide" Id="5054408D-C2A9-451f-A702-E84AFCD29C10"/> <Model x:Key="MyTestPluginSlimTv" Id="023c44f2-3329-4781-9b4a-c974444c0b0d"/> <!-- Command --> <CommandStencil x:Key="Execute_Command_Stencil" Source="{StaticResource SlimTvMultiChannelGuide}" Path="ExecProgramAction"/> <ControlTemplate x:Key="Contents_Template"> <DockPanel Context="{Model Id=5054408D-C2A9-451f-A702-E84AFCD29C10}" LastChildFill="False"> <Grid HorizontalAlignment="Stretch"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto"/> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <ListView Name="DialogMenu" Grid.Column="0" Grid.Row="0" ItemsSource="{Binding Source={StaticResource SlimTvMultiChannelGuide},Path=ProgramActions,Mode=OneTime}" Style="{ThemeResource MenuListViewStyle}"> </ListView> <!--<Command Source="{Service ScreenManager}" Path="ShowDialog" Parameters="dialogWeatherSearchResult"/>--> <!--<Command Path="SearchLocations" Parameters="{LateBoundValue BindingValue={Binding Path=SearchCity}}"/>--> <!--Command="{Command Source={Service WorkflowManager},Path=NavigatePop,Parameters=1}"/>--> <!--Command="{Command Source={Service WorkflowManager},Path=NavigatePush,Parameters={StaticResource EditShareNameStateId}}"/>--> <Button Style="{ThemeResource DialogButtonStyle}" Grid.Column="0" Grid.Row="1" Context="{Model Id=023c44f2-3329-4781-9b4a-c974444c0b0d}" Content="TvWish" HorizontalAlignment="Center"> <Button.Command> <CommandList> <Command Source="{StaticResource MyTestPluginSlimTv}" Path="SlimTv"/> <Command Source="{Service ScreenManager}" Path="CloseTopmostDialog"/> </CommandList> </Button.Command> </Button> </Grid> </DockPanel> </ControlTemplate> </Include.Resources> </Include> [/spoiler] I have modified the skin in the following way, that I defined first a second Model reference MyTestPluginSlimTV pointing to MyTestPlugin and defined then a button calling a function SlimTv() in my test plugin. The function in the MyTestPlugin model is simply to log the event public void SlimTv() { HelloString = "message from slimtv"; mylogger.Debug("SlimTv called"); } The error message is [InputMgr ] [WARN ] - CommandBaseMarkupExtension: Could not find method, could not execute command ({Command Source=MyTestPlugin.Models.MyTestPlugin,Path=SlimTv}) It looks like it cannot find the actual instance of the model. The complete log file is attached. Any ideas how this can be done? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 2
Plugin Development
Questions on writing my first plugin
Contact us
RSS
Top
Bottom