|
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 |
#1
|
||||
|
||||
Must be doing something stupid, can't pass a variable to a new menu.
OK, trying to pass "TheVideoList" to a new menu from the Video - Browser menu. I had this working before, I added an attribute for it in a Panel parent to it's current one and the one I'm trying to pass from. For some reason I can't get it to work today though using the latest STV.
I've added a button to the bottom of the controls, so it's in Extra_Panel_1 (I think that's the right one). Can anybody point out the really simple thing that I can't seem to see? Thanks |
#2
|
||||
|
||||
Hi Stanger,
Have you tried using AddStaticContext("Name",Object) instead of placing an attribute higher in the tree? This has worked for me. HTH Quote:
Mike
__________________
"Everything doesn't exist. I'm thirsty." ...later... "No, it's real!!! I'm full." - Nikolaus (4yrs old) Last edited by MeInMaui; 01-23-2007 at 07:16 PM. |
#3
|
|||
|
|||
Quote:
Well, there's already another Attribute 'TheVideoList' defined in the 'DVDs Panel', so without debugging into it I would think that the value might get reset before you are trying to pass it to the other menu. Rename your new Attribute (e.g. 'ImportVideoList'), and add 'ImportVideoList = TheVideoList' to the two places where 'TheVideoList' gets initialized. Alternatively you could also just use the already existing 'SortedVideoList' (which also gets initialized with 'TheVideoList'), though it seems that this one can get set to other values too Dirk |
#4
|
||||
|
||||
Quote:
BTW: You'll also want to limit when your new Import button is available, because TheVideoList isn't valid for some browser views. It is really only used for the title & dvd list views. And, if you want to send the complete list of imported videos to your custom menu while using any browser view, just send AllVideoFiles instead... or filter it to contain what you want. - 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. |
#5
|
||||
|
||||
Quote:
Quote:
Quote:
Quote:
Fortunately flachbar to the rescue. Thanks again guys |
#6
|
||||
|
||||
Under the theory that "it's always better to post to an existing thread than to create a new one"...
I'm having some trouble with a regex and I'm puzzled. What I'm trying to do is replace characters in a title that are illegal in filenames. The following regex should do that: [^a-zA-Z0-9$()#_'`~@{}%! &-.] However when I do a: string.replaceAll("[^a-zA-Z0-9$()#_'`~@{}%! &-.]","") it removes "."s to. Now I know . in a regex matches any character, normally you'd \. it to get the period litteral, however "[^a-zA-Z0-9$()#_'`~@{}%! &-\.]" comes up as an invalid escape sequence. Am I missing something? Is it a bug (java)? Is there a better way to replace illegal filename characters? Do I just break down and not put "."s in my filenames? |
#7
|
||||
|
||||
Your problem is with the "&-." part. It's taking that to mean all character codes between "&" and "." inclusive. So if you want to keep hyphens, you going to have to find some way of expressing that outside of the square brackets.
__________________
-- Greg |
#8
|
||||
|
||||
OK, but wouldn't that still match . then? (or technically not . since it starts with the ^)
Ah well, moving the space and - to the end fixed it, ie: [^a-zA-Z0-9$()#_'`~@{}%!&. -] |
#9
|
||||
|
||||
Quote:
I use this when I have to get serious with regular expressions: http://tools.osherove.com/CoolTools/...5/Default.aspx Thought it might come in handy. There are other tools out there, too. This looks like a decent list: http://www.larkware.com/RegexTools.html . Lastly -- is it possible that your backslash is being interpreted as the Java string escape? Or are you double-backslashing (which I think you should be)? http://www.quepublishing.com/article...p?p=28697&rl=1 (see table 3.1) |
#10
|
||||
|
||||
Yes, good point. You must double-backslash all RE escapes in string literals to get them past the string-escape logic.
Edit: There are any number of Web-based RE testers as well. Just Google for "regular expression tester" and you'll find several.
__________________
-- Greg |
#11
|
||||
|
||||
Quote:
Anyway, problem and mystery solved now Quote:
...programming wise |
#12
|
||||
|
||||
Ga!!!!
I can't win. The source of this issue was I had a few imports that I couldn't figure out why Sage couldn't find them in DVD Profiler, turned out they had a . in the filename. OK, fix that, now it finds them, but.... Now it can't find a billion others that have .'s in the name, but apparently I "fixed" the filenames to work with my broken code... That brings up another point. You know how you google something and you don't quite spell it right and it gives you a suggestion? Anybody have an idea how to do that in java? |
#13
|
||||
|
||||
Hey, I'm not knocking regular expressions. They are tremendously valuable for parsing text. I just don't like to parse text!
Don't get me started on Perl, though. Well, actually, I guess I started that. What a shame of a language. |
#14
|
||||
|
||||
Quote:
|
#15
|
||||
|
||||
Perhaps I could have put more in my post
Thanks for the suggestion, I've been down that road, (fuzzy searching) and I don't recall finding anything helpful. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|