The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

RE: xAP Desktop Displays



Hi James

Thanks for the clarification.

I have been looking at the example / template desktops on you website.
The only one I can find that accesses the xAP Variables from a script that
is called from an event is the News Scroller (to open the web pages).
As far as I can see this desktop also has the same problem as I am having.
When the image is pressed to open the web page the default user profile
directory is opened ("" path).

When the xAP Variables are read, "" is always returned.

For example

y=xap.getxAPVar(DisplayName, "test")
msgbox y

If it is called from the click event of an image then the message box
always
shows "".
If it is called from the change property of a xAP Variable then the
contents
of the appropriate variable are show.


I have tried the Global variables again but when I run the below code from
the pressing of an image or a xAP Variable change

Sub Main()

x=xap.SetGlobal("Test","Test")
msgbox x

x=xap.GetGlobal("Test")
msgbox x

End Sub

The first message box always shows "False" and the second always
"".

I am using the latest version of Desktop.

Paul

-----Original Message-----
From: xAP_developer@xxxxxxx [mailto:xAP_developer@xxxxxxx]
On Behalf Of James
Sent: 22 May 2005 11:48
To: xAP_developer@xxxxxxx
Subject: Re: [xAP_developer] xAP Desktop Displays

Hi Paul,

SetxAPVar and GetxAPVar let you access and set the data associated with a
display. These are the same as the xAPvar= line in a display.txt file.
They are also independent for each display hence why you have to pass the
DisplayName to these functions. These will be available to use in events
you
will just need to make sure that the DisplayName is correct.
If you have any queries to the actual displayname you can always use the
GetDisplayByName(DisplyTextNam) function and pass to it the name as
displayed in the Desktop gui. eg. "Audio Controller mk2" and it
will return
"Display07"

SetGlobal/GetGlobal are global across all displays and are simply  a text
tag to reference the variable and the variable.  I think what you are doing
here is correct, if you set a global and the global is already there then
it
returns True if however the variable didn't exist it will be created and
the
value updated, then it would return False. So the True/False shouldn't be
thought of as success/fail rather updated/new

Also it's worth checking you have the latest Desktop as alot of the script
functions were extended in later builds, there's a check for updates option
in the tray menu.









xAP_Development Main Index | xAP_Development Thread Index | xAP_Development Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.