Premise [download] Xbrowser_DSR_CL

  • Thread starter Thread starter chucklyons
  • Start date Start date
Motorola Premise
C

chucklyons

Guest
index.php
File Name: Xbrowser_DSR_CL
File Submitter: chucklyons
File Submitted: 24 May 2009
File Category: Premise
Author: chucklyons
Contact: chucklyons

Feel free to change the name!

This is a revised Xbrowser, based on Rob Brun's work. DSR was a modified version (I don't recall DSR's name) that modified the media screen to have a large single album cover when playing mp3s.

This new version includes a number of changes. I have added comments in the code (I hope) that describes some of the changes and additions.

Temperature - This will display temperature if you have bound a temperature device
Rain Fall - If you have bound a rain gauge, then this will show the daily amount of rain.
Color Picker - If there was one feature I absolutely wanted to get rid of, this was it. I merely commented it out in the code.
RSS Reader - This allows the use of the RSSFeeds module to display whatever feeds you have selected from the builder. Requires the RSSFeeds xdo.

Click here to download this file
 

Attachments

  • xbrowser_DSR_CL.png
    xbrowser_DSR_CL.png
    30.8 KB · Views: 32
FYI for new Premise users: Modifications may be required to get this module to work for you.

This enhanced version of the original Xbrowser module contains hard-coded references to Home objects that you may not have in your Premise Home. For example, the g_xbRenderToolbar function refers to a WS_Rain_Gauge object:

If home.WS_Rain_Gauge.Rain24HrInches > "0" then

If you don't have a Home.WS_Rain_Gauge object, Premise will stop execution at the offending line of code. Your options are to remove all references to the missing object or to change it to an object that does supply rainfall data.

The enhanced Xbrowser module also assumes you have the RSSFeeds module installed. The following line, in the g_xbisValidObjectType function, will fail if RSSFeeds is not present:

if obj.IsOfExplicitType("sys://Schema/Modules/RSSFeeds/Classes/RSSFeeds") then

If you don't have the RSSFeeds module installed, change the code in g_xbisValidObject from this:

Code:
'added this line to get RSS on the xb browser - chucklyons
	if obj.IsOfExplicitType("sys://Schema/Modules/RSSFeeds/Classes/RSSFeeds") then
		bIsValid = true
	else
		if g_xbIsXBEnabled(obj) then
			bIsValid = true
		End if
	end if
End If

to this:

Code:
'added this line to get RSS on the xb browser - chucklyons
	on error resume next
		bIsValid = obj.IsOfExplicitType("sys://Schema/Modules/RSSFeeds/Classes/RSSFeeds")
	on error goto 0
	if not bIsValid then
		bIsValid = g_xbIsXBEnabled(obj)
	end if
End If
 
123, yes you're are right..For RSS feeds, I thought I had made clear that there is/was a dependency.

I'll have the moderator kill the files until I have made them generic enough for others to use. (which is prob not going to happen anytime soon)
 
No need to kill 'em! The module is very useful and helps to introduce Premise users to the fine art of scripting! :icon_pai:
 

Similar threads

C
Replies
0
Views
914
chucklyons
C
C
Replies
0
Views
1K
chucklyons
C
C
Replies
2
Views
2K
chucklyons
C
Back
Top