XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently 2017年 Sep 22日 21:38

All times are UTC - 8 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: 2013年 Aug 6日 09:02 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 556
I have saved a number of settings to a preference.ini file and when the preferences are changed I wish to force the widget to reload (when the save button is pressed) so that the widget will restart with all new settings. So, is it possible to force a restart in code? (not from the menu).


Last edited by yereverluvinuncleber on 2017年 Jun 28日 05:49, edited 2 times in total.

Top
 Profile  
 
PostPosted: 2013年 Sep 22日 23:06 
Offline
User avatar

Joined: 2013年 Mar 8日 22:27
Posts: 357
widget.cmd("!Reload");

_________________
Life is a myriad game... Just play it!


Top
 Profile  
 
PostPosted: 2013年 Sep 23日 11:58 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 556
Thanks very much, will try and test and report back.


Top
 Profile  
 
PostPosted: 2013年 Nov 25日 07:19 
Offline

Joined: 2013年 Oct 26日 08:17
Posts: 362
digigamer wrote:
widget.cmd("!Reload");


there is not any !Reload command in the Autocomplete List.
Also when i use this command i don't see any effect.

am i doing wrong?
or is there another option?

just to note:
i want to Reload one of widget window from the code


Top
 Profile  
 
PostPosted: 2014年 Oct 12日 07:06 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 556
BUMP

This didn't work for me either.

I need a way to reload a widget from the menu. At the moment I am creating a menu option that calls a routine that runs widget.cmd("!Reload");

It does nothing. Does anyone have a method for reloading a widget from code?


Top
 Profile  
 
PostPosted: 2014年 Oct 13日 01:06 
Offline
User avatar

Joined: 2014年 Oct 13日 01:04
Posts: 13
PUSH

I would also like to reload the widget from the press of a button.
Currently it seems to me, when the system is put to sleep, after waking up certain information does not refresh.
eg.: weather information (in general), which can't be fixed by "update weather" alone, the widget has to be refreshed

_________________
-- TheYinas --
on DeviantArt: http://yinas.deviantart.com/


Top
 Profile  
 
PostPosted: 2014年 Oct 13日 06:53 
Offline
User avatar

Joined: 2012年 Dec 5日 17:52
Posts: 4545
Just click everywhere ON the widget and press "F5". Works like the windows refresh.. ;)

_________________
Image
...and remember: don't take life too seriously...
My profile on Deviantart: http://jimking.deviantart.com/


Top
 Profile  
 
PostPosted: 2014年 Oct 13日 08:01 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 556
That's really useful information Jim. Good to know - we must document that somewhere, I am getting more involved in Xwidget now so will try to help there soon.

I do need to be able to do this in code though. All my previous widget engines have a simple "Reload Widget" which exists to sort out widgets that are malfunctioning through getting confused, communication, thread, memory issues all sorted by a 'reload widget'. I reckon the function might be in there somewhere I just don't know whether or where.


Top
 Profile  
 
PostPosted: 2014年 Oct 25日 18:38 
Offline

Joined: 2013年 Oct 26日 08:17
Posts: 362
jimking wrote:
Just click everywhere ON the widget and press "F5". Works like the windows refresh.. ;)

i didn't know this...
it hadn't been pointed anywhere,
thanks

=============
yereverluvinuncleber wrote:
I do need to be able to do this in code though. All my previous widget engines have a simple "Reload Widget" which exists to sort out widgets that are malfunctioning through getting confused, communication, thread, memory issues all sorted by a 'reload widget'. I reckon the function might be in there somewhere I just don't know whether or where.

i don't know if the Reload command going to be available in next version or not...


but as a temporary solution:
you can send keyboard input in code by using ActiveX objects,
so you can send F5 to your widget through code:

example:
Code:
wsc=new ActiveXObject("WScript.Shell")
widget.ForceToFround()
wsc.SendKeys("{f5}")

Comment:
1. 1st line will create activex object
2. 2nd line will make the widget to TopMost and Set Focus to it
3. 3rd line will send F5 key


Note:
make sure you set the focus to your widget before sending key to it (as i have done it in 2nd line),
to prevent sending key incorrectly to other programs


Top
 Profile  
 
PostPosted: 2014年 Oct 25日 20:30 
Offline

Joined: 2012年 Jun 18日 00:07
Posts: 268
Thank you hamid and jimking great to know :mrgreen:


Top
 Profile  
 
PostPosted: 2014年 Oct 26日 04:33 
Offline
User avatar

Joined: 2013年 Jul 29日 09:13
Posts: 556
Thanks for the input everyone.

I have a workaround

Reopening the post as a bug so it can be added to the list.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group