Board index FlightGear Development

Is it possible to get a dialog refreshed ?  Topic is solved

FlightGear is opensource, so you can be the developer. In the need for help on anything? We are here to help you.
Forum rules
Core development is discussed on the official FlightGear-Devel development mailing list.

Bugs can be reported in the bug tracker.

Is it possible to get a dialog refreshed ?

Postby mhab » Sat Jun 29, 2013 5:46 pm

So I made keyboard shortcuts which manipulate "pushback" while the "Pushback" dialog is open.
Actions work well.

Remaining problem is:
e.g. the slider in the dialog for controlling pushback-speed is not moved when the speed is altered through the new defined shortcut, although the text of the speed is displayed new and refreshed.
similar problem with the checkbox ... which is not updated if the change occurs through using the keyboard shortcut.

I tried to use dialog-close/dialog-open, but that is initializing the whole dialog instead of refreshing it.

Is it possible to refresh the dialog ?

Thanks Michael
mhab
 
Posts: 410
Joined: Thu Apr 18, 2013 10:59 pm
Callsign: D-MIKE
Version: 2019.1.1
OS: Win10

Re: Is it possible to get a dialog refreshed ?  

Postby Gijs » Sat Jun 29, 2013 6:23 pm

Add <live>true</live> to the element (eg. slider).
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9384
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Is it possible to get a dialog refreshed ?

Postby Hooray » Fri Jul 12, 2013 4:57 pm

there are also dedicated fgcommands for updating/refreshing the dialog/properties, something like "dialog-apply" or "dialog-update" IIRC.
Last edited by Hooray on Fri Jul 12, 2013 5:24 pm, edited 1 time in total.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11376
Joined: Tue Mar 25, 2008 8:40 am

Re: Is it possible to get a dialog refreshed ?

Postby Philosopher » Fri Jul 12, 2013 5:01 pm

Yep: dialog-apply takes the positions of sliders, text, and such and copies it to the property tree, and dialog-update does the opposite (updates the dialog from the property tree). You can also pass the specific name of an element (which uses an algorithm like Nasal's gui.findElementByName to find that element).
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Is it possible to get a dialog refreshed ?

Postby Hooray » Fri Jul 12, 2013 5:24 pm

right, I think it's something like <object-name>foo</object-name> - not sure if any of this is documented anywhere, should probably be mentioned in both, README.gui and README.commands
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11376
Joined: Tue Mar 25, 2008 8:40 am


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest