|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#21
|
||||
|
||||
I've uploaded version 0.3 of these tools to the Downloads area.
Key changes include: * I've added an STVI Tools plugin for automating STVI creation. Those of you familiar with flachbar's import utilities will recognize some of the concepts here, such as encoding widget references as path strings. However I've tried to take it a step further by automating the export process as well as the import process. Basically the idea is that you gather up all your exportable code into a set of exportable menus, adjust primary references to include only your own code in those menus, and then run the exporter, which automatically encodes references into and out of the exported code and generates the necessary calls under STVImported to fix them back up again at import time. Detailed instructions are in the Javadocs. Note that this is a separate plugin from the original Tools plugin (even though it lives in the same JAR), so if you want to experiment with it, you'll need to enable it first in the Plugins > Manage... dialog. * There's a new group of editing commands on the Tools menu for copying and pasting widgets. Flachbar's Paste Before and Paste After commands are here, as well as the Shift Block Up and Shift Block Down commands that I proposed earlier. (I managed to figure out how to do Paste Before/After without needing to know about the marquee selection, by calling the built-in Paste command as a subroutine, gathering up all the widgets it pasted in, and then moving them to where you really want them.) * In support of Paste Before/After I've exposed a new StudioAPI method called InvokeMenuCommand, which lets you invoke any existing menu command by name. This seemed like a cleaner option than exposing the MenuItemFind functionality directly. * The Search and Replace dialogs now have dropdown lists of recently used strings. There are a couple more minor additions as well; see the version history in the included Javadocs for details. Click here to download (or use the link in the original post).
__________________
-- Greg |
#22
|
|||
|
|||
Quote:
Quote:
Quote:
I think this can automate 80-90% of all tedious STVi creation work. You've outdone yourself once again, this is fantastic stuff... Dirk |
#23
|
||||
|
||||
Greg: you are awesome! I just wish I had more time to do STVI creation
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki |
#24
|
||||
|
||||
Thanks for the additional functionality.
One bug though... I noticed a glitch that isn't in the previous version. After deleting widget(s) via the keyboard's Del key, no widget has focus. Using up/down afterwards sets focus on the top-most widget. When the plugin isn't loaded at startup, or in the older version, focus would go to the next widget after deletion. - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#25
|
||||
|
||||
Quote:
__________________
-- Greg |
#26
|
||||
|
||||
Greg,
One question and then a comment. With the export as STVi functionality, do we need to include anything special with the STVi for others to use it? Do they need to have your Studio Tools installed? Oh, and would it be possible for the Export STVi to default to the current STV directory instead of the SageTV directory? Very cool BTW |
#27
|
||||
|
||||
Quote:
Quote:
__________________
-- Greg |
#28
|
||||
|
||||
Quote:
__________________
-- Greg |
#29
|
||||
|
||||
Quote:
|
#30
|
||||
|
||||
I'm having a bit of trouble with the Export to STVI function
I get a "String index out of range: -1" message and the following log Code:
Wed 1/24 14:11:01.133 Exception in thread "AWT-EventQueue-0" Wed 1/24 14:11:01.134 at gkusnick.sagetv.studio.Tools.FSameParentCoref(Tools.java:352) Wed 1/24 14:11:01.134 at gkusnick.sagetv.studio.Tools.menuSelected(Tools.java:335) Wed 1/24 14:11:01.134 at javax.swing.JMenu.fireMenuSelected(Unknown Source) Wed 1/24 14:11:01.134 at javax.swing.JMenu$MenuChangeListener.stateChanged(Unknown Source) Wed 1/24 14:11:01.135 at javax.swing.DefaultButtonModel.fireStateChanged(Unknown Source) Wed 1/24 14:11:01.135 at javax.swing.DefaultButtonModel.setSelected(Unknown Source) Wed 1/24 14:11:01.135 at javax.swing.JMenu.setSelected(Unknown Source) Wed 1/24 14:11:01.135 at javax.swing.JMenu.menuSelectionChanged(Unknown Source) Wed 1/24 14:11:01.136 at javax.swing.MenuSelectionManager.setSelectedPath(Unknown Source) Wed 1/24 14:11:01.136 at javax.swing.plaf.basic.BasicMenuUI$Handler.mouseEntered(Unknown Source) Wed 1/24 14:11:01.136 at java.awt.Component.processMouseEvent(Unknown Source) Wed 1/24 14:11:01.136 at javax.swing.JComponent.processMouseEvent(Unknown Source) Wed 1/24 14:11:01.136 at java.awt.Component.processEvent(Unknown Source) Wed 1/24 14:11:01.136 at java.awt.Container.processEvent(Unknown Source) Wed 1/24 14:11:01.137 at java.awt.Component.dispatchEventImpl(Unknown Source) Wed 1/24 14:11:01.137 at java.awt.Container.dispatchEventImpl(Unknown Source) Wed 1/24 14:11:01.137 at java.awt.Component.dispatchEvent(Unknown Source) Wed 1/24 14:11:01.137 at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) Wed 1/24 14:11:01.137 at java.awt.LightweightDispatcher.trackMouseEnterExit(Unknown Source) Wed 1/24 14:11:01.137 at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) Wed 1/24 14:11:01.138 at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) Wed 1/24 14:11:01.138 at java.awt.Container.dispatchEventImpl(Unknown Source) Wed 1/24 14:11:01.138 at java.awt.Window.dispatchEventImpl(Unknown Source) Wed 1/24 14:11:01.139 at java.awt.Component.dispatchEvent(Unknown Source) Wed 1/24 14:11:01.139 at java.awt.EventQueue.dispatchEvent(Unknown Source) Wed 1/24 14:11:01.139 at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source) Wed 1/24 14:11:01.139 at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) Wed 1/24 14:11:01.140 at java.awt.EventDispatchThread.pumpEvents(Unknown Source) Wed 1/24 14:11:01.140 at java.awt.EventDispatchThread.pumpEvents(Unknown Source) Wed 1/24 14:11:01.140 at java.awt.EventDispatchThread.run(Unknown Source) Any ideas? John |
#31
|
||||
|
||||
I'm not seeing anything obviously wrong with the code at that point, which by the way has nothing to do with Export As STVI; it's in the code that enables/disables right-click menu items for the GK Tools menu.
Can you give me a bit more info on what you're doing to trigger this problem?
__________________
-- Greg |
#32
|
||||
|
||||
Greg, I'm not doing anything exciting. Just selecting a menu item and doing an Export as STVI. I choose a filename and click OK.
I get the "String index out of range: -1" message box and no file written. I've tried from a number of different STV's As for the Exception in thread log. Looking it it following your right mouse hint. I'm getting that when I do a right click and highlight Plugins / GK Tools. I think I may have tried the Export to STVI previously with Select Safe SubTree which is why I got the two errors together. John |
#33
|
||||
|
||||
Well, I managed to get FSameParentCoref to fail with a null reference exception when right-clicking a menu widget (i.e. one with no parent). I've fixed that for version 0.3.1, although it should be fairly harmless.
I still don't see that this has anything to do with Export As STVI, so whatever problem you're having there must be a separate issue and that call stack you found in the log is a red herring. Are you saying you can't get Export to work at all, or just for some menus? If the latter, which ones? (So far I haven't found a menu it doesn't work on.) Also what version of Java are you using? I'm on version 1.6.0-b105, although it should work with 1.5.x as well. (1.4.x versions won't work because of some missing Java runtime stuff.)
__________________
-- Greg |
#34
|
||||
|
||||
Greg, you might have missed it in my earlier post.
running Java (build 1.5.0_10-b03) Does anyone else have it working with Java 1.5? You're right, the exception and the "String index out of range: -1" are separate issues and just coincidental when I was playing with the plugins. I cannot get any menu to Export to STVI. I've tried Export to STVI on different menus out of different STVs. Every time I get the message box "String index out of range: -1" Is there any other logs I can look at? John |
#35
|
||||
|
||||
Whoops, sorry for not seeing the Java version in your earlier post.
There's only one debug log (sagetv_0.txt or sagetvclient_0.txt as the case may be), but you should have seen something along these lines in there: Code:
{ gkusnick.sagetv.studio.STVI.ExportAsSTVI { gkusnick.sagetv.studio.STVI.ExstDoExportDialog { gkusnick.sagetv.studio.MRUCombo.constructor { gkusnick.sagetv.studio.MRUCombo.constructor } gkusnick.sagetv.studio.MRUCombo.constructor } gkusnick.sagetv.studio.MRUCombo.constructor { gkusnick.sagetv.studio.MRUCombo.constructor } gkusnick.sagetv.studio.MRUCombo.constructor { gkusnick.sagetv.studio.STVI.windowOpened } gkusnick.sagetv.studio.STVI.windowOpened { gkusnick.sagetv.studio.MRUCombo.getText } gkusnick.sagetv.studio.MRUCombo.getText: "C:\Temp\ExportTest.stvi" { gkusnick.sagetv.studio.MRUCombo.getText } gkusnick.sagetv.studio.MRUCombo.getText: "Version 1.0" { gkusnick.sagetv.studio.MRUCombo.Save { gkusnick.sagetv.studio.MRUCombo.getText } gkusnick.sagetv.studio.MRUCombo.getText: "C:\Temp\ExportTest.stvi" szValue: "C:\Temp\ExportTest.stvi" szList: "C:\Temp\ExportTest.stvi" } gkusnick.sagetv.studio.MRUCombo.Save { gkusnick.sagetv.studio.MRUCombo.Save { gkusnick.sagetv.studio.MRUCombo.getText } gkusnick.sagetv.studio.MRUCombo.getText: "Version 1.0" szValue: "Version 1.0" szList: "Version 1.0" szList: "Version 0.1" } gkusnick.sagetv.studio.MRUCombo.Save { gkusnick.sagetv.studio.Hook.GetSelectedWidgets } gkusnick.sagetv.studio.Hook.GetSelectedWidgets: [default:null|Menu:Test] { gkusnick.sagetv.studio.STVI.Exst.constructor(C:\Temp\ExportTest.stvi, "Version 1.0", "GKusnick") } gkusnick.sagetv.studio.STVI.Exst.constructor } gkusnick.sagetv.studio.STVI.ExstDoExportDialog { gkusnick.sagetv.studio.STVI.ExportSubtree(Menu: Test) { gkusnick.sagetv.studio.STVI.ElemFromWidget(Menu: Test) } gkusnick.sagetv.studio.STVI.ElemFromWidget { gkusnick.sagetv.studio.STVI.AppendElem(Action) } gkusnick.sagetv.studio.STVI.AppendElem { gkusnick.sagetv.studio.STVI.AppendElem(Action) } gkusnick.sagetv.studio.STVI.AppendElem { gkusnick.sagetv.studio.STVI.AppendElem(Action) } gkusnick.sagetv.studio.STVI.AppendElem { gkusnick.sagetv.studio.STVI.AppendElem(Action) } gkusnick.sagetv.studio.STVI.AppendElem } gkusnick.sagetv.studio.STVI.ExportSubtree { gkusnick.sagetv.studio.STVI.AppendElem(Menu) } gkusnick.sagetv.studio.STVI.AppendElem { gkusnick.sagetv.studio.STVI.ElemCreateImportHook { gkusnick.sagetv.studio.STVI.AppendElem(Action) } gkusnick.sagetv.studio.STVI.AppendElem } gkusnick.sagetv.studio.STVI.ElemCreateImportHook { gkusnick.sagetv.studio.STVI.AppendElem(Hook) } gkusnick.sagetv.studio.STVI.AppendElem } gkusnick.sagetv.studio.STVI.ExportAsSTVI
__________________
-- Greg |
#36
|
||||
|
||||
Here's a log. Hope it helps
Code:
{ gkusnick.sagetv.studio.STVI.ExportAsSTVI { gkusnick.sagetv.studio.STVI.ExstDoExportDialog { gkusnick.sagetv.studio.MRUCombo.constructor { gkusnick.sagetv.studio.MRUCombo.constructor } gkusnick.sagetv.studio.MRUCombo.constructor } gkusnick.sagetv.studio.MRUCombo.constructor { gkusnick.sagetv.studio.MRUCombo.constructor } gkusnick.sagetv.studio.MRUCombo.constructor { gkusnick.sagetv.studio.STVI.windowOpened } gkusnick.sagetv.studio.STVI.windowOpened { gkusnick.sagetv.studio.MRUCombo.getText } gkusnick.sagetv.studio.MRUCombo.getText: "C:\Program Files\SageTV\SageTV\STVs\SageTV3\test99bv" { gkusnick.sagetv.studio.MRUCombo.getText } gkusnick.sagetv.studio.MRUCombo.getText: "1" { gkusnick.sagetv.studio.MRUCombo.Save { gkusnick.sagetv.studio.MRUCombo.getText } gkusnick.sagetv.studio.MRUCombo.getText: "C:\Program Files\SageTV\SageTV\STVs\SageTV3\test99bv" szValue: "C:\Program Files\SageTV\SageTV\STVs\SageTV3\test99bv" szList: "C:\Program Files\SageTV\SageTV\STVs\SageTV3\test99bv" szList: "testcomp" szList: "test" } gkusnick.sagetv.studio.MRUCombo.Save { gkusnick.sagetv.studio.MRUCombo.Save { gkusnick.sagetv.studio.MRUCombo.getText } gkusnick.sagetv.studio.MRUCombo.getText: "1" szValue: "1" szList: "1" szList: "1.0" } gkusnick.sagetv.studio.MRUCombo.Save { gkusnick.sagetv.studio.Hook.GetSelectedWidgets } gkusnick.sagetv.studio.Hook.GetSelectedWidgets: [default:Menu:ConfigurationWizardSetVideoPlaybackConfig|Menu:Configuration Wizard - Set Video Playback Config] { gkusnick.sagetv.studio.STVI.Exst.constructor(C:\Program Files\SageTV\SageTV\STVs\SageTV3\test99bv, "1", "") } gkusnick.sagetv.studio.STVI.ExstDoExportDialog Exception chain: java.lang.StringIndexOutOfBoundsException: String index out of range: -1 Stack trace: java.lang.String.substring [null line -1] gkusnick.util.StringUtil.SzNameSansExtFromFile [StringUtil.java line 53] gkusnick.sagetv.studio.STVI$Exst.<init> [STVI.java line 657] gkusnick.sagetv.studio.STVI.ExstDoExportDialog [STVI.java line 472] gkusnick.sagetv.studio.STVI.ExportAsSTVI [STVI.java line 363] gkusnick.sagetv.studio.STVI.access$000 [STVI.java line 122] } gkusnick.sagetv.studio.STVI.ExportAsSTVI |
#37
|
||||
|
||||
OK, now we have the right exception call stack. The problem is in one of my string utilities, which is expecting filenames to end with ".stvi", and the one you typed doesn't. (Unlike Windows, the Java file chooser dialog apparently doesn't supply a default extension if you neglect to type one.)
Sorry for the stupid bug. I'll fix it for 0.3.1, and in the meantime be sure to type complete filenames that end with ".stvi".
__________________
-- Greg |
#38
|
||||
|
||||
Thanks Greg, Bad assumption on my part about the extension. All working now.
John |
#39
|
||||
|
||||
OK, I've uploaded version 0.3.1 with the various bug fixes mentioned above (post-Delete selection, right-click on menu exception, STVI default extension).
I've also added a new feature to ProcessImport in the STVI tools: if your STVI tries to insert code under a hook that doesn't exist, the hook will be created automatically. This is so that multiple STVIs can share a hook that may or may not exist already, without each of them explicitly creating a new instance of the hook (which would be bad). See the STVI Javadocs for details on how to use this feature.
__________________
-- Greg |
#40
|
||||
|
||||
Greg,
I think I found a bug, for reasons beyond the scope of this thread, I have a menu linking to itself. It appears that when I export this menu with the Export as STVi feature, a new, empty menu is created for that link, instead of retaining the link to the right menu. You can download the STVi here: http://forums.sage.tv/forums/downloa...do=file&id=158 When I exported it, there was a second (empty) "Library Import View" and the link under the "if False" was liked to the empty menu instead of the real one. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|