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 6: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: 418
Joined: Thu Apr 18, 2013 11:59 pm
Callsign: D-MIKE
Version: 2020.3.4
OS: Win10

Re: Is it possible to get a dialog refreshed ?  

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

Add <live>true</live> to the element (eg. slider).
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9544
Joined: Tue Jul 03, 2007 3:55 pm
Location: 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 5: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 6: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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Is it possible to get a dialog refreshed ?

Postby Philosopher » Fri Jul 12, 2013 6: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).
Philosopher
 
Posts: 1593
Joined: Sun Aug 12, 2012 7:29 pm

Re: Is it possible to get a dialog refreshed ?

Postby Hooray » Fri Jul 12, 2013 6: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: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU


Return to Development

Who is online

Users browsing this forum: No registered users and 6 guests