More indepth documentation?
More details needed on Object.Command
Wednesday, September 21, 2005 by VArterJr | Discussion: DesktopX Development
Take for instance Object.Command ... here's what the latest doc says:
Object.Command and Object.CommandParameters
Gets/sets the object command and parameters for Shortcut and URL object types.
OK. That's nice. Now what? So I have the need, let's say, to set the folder property for an object that is a pop-up menu of a folder. Right now I set it in the object properties (in DX) to the Programs folder. Now I want my users of the widget to be able to set a preference to a different folder. From reading the doc you would assume somehow you would use the Object.Command to issue that command since that particular property isn't exposed through the public interface of the object (from what I can find).
So ... any help on more detailed doc or how to do things like this would be helpful. I've seen another poster trying to ask this same question (setting shortcut folder) and the response was to read the manual basically but the manual doesn't seem to go that deep.
for any help,
Vince
Reply #2 Thursday, September 22, 2005 12:38 PM
If you've seen all that, sorry, but it sounded like you were only looking at the Developers Guide.
I'm a bit unclear on some of your other questions, but I think I can get one of them. When you've added a widget preference Widget.AddPreference("CustomPrefName") (Which, you are right, is very cool) you can use/manipulate the value of that preference with Widget.Preference("CustomPrefName").Value As in
Widget.Preference("Name").Value = "NewValue" to change it or,
"CertainVariable" = Widget.Preference("Name").Value to retrieve it.
Also, there is the Sub Widget_OnPreferencesChange which is called when someone changes a value in the Properties panel and clicks OK. You can use this to do things that need to be done when users adjust preferences. I have a size slider in one of my widgets. So in the Widget_OnPreferencesChange function I use Object.Width = Widget.Preference("CustomSize").Value and Object.Height = Widget.Preference("CustomSize").Value to make the changes.
hth, rr
Reply #3 Thursday, September 22, 2005 2:35 PM
Thanks again,
Vince
Reply #4 Thursday, September 22, 2005 3:46 PM
Set objShell = CreateObject("WScript.Shell")
mypath = "E:\Data"
torun = "explorer " & mypath
objShell.Run torun
But I'm not sure if that'd handle spaces well.
Reply #5 Thursday, September 22, 2005 7:26 PM
Thanks for the help. It is appreciated.
Vince
Reply #6 Thursday, September 22, 2005 7:27 PM

Vince
Please login to comment and/or vote for this skin.
Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:
- Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
- Access to a great community, with a massive database of many, many areas of interest.
- Access to contests & subscription offers like exclusive emails.
- It's simple, and FREE!







Reply #1 Wednesday, September 21, 2005 2:05 PM
Oh and does anyone know how to access those preferences when running under DX like it does on the exported widget?
Vince