Board index FlightGear Development Canvas

Backwards compatibility

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Backwards compatibility

Postby Hooray » Thu May 23, 2013 7:43 pm

Some things that we noticed in the original discussion: Subject: Flightgear plotter updated.

  • Dialog has become "Window" - without any migration path, maybe introduce an option to request a specific API for better portability ?
  • <canvas></canvas> sections are not yet documented in README.gui, which is why I added a tutorial to the wiki: http://wiki.flightgear.org/Howto:Adding ... GUI_dialog
  • PropertyList XML files that make use of the <canvas> widget should probably require a certain FG version ( >= 2.8) using a custom attribute or tag, which is checked during dialog instantiation or GUI re-initialization - otherwise, people may be using a <canvas> section without canvas support, so a SG_LOG() warning would make sense
  • for troubleshooting purposes, it may be helpful to expose the supported canvas API versions through the property tree and show the info in the about dialog

Also, Tom: I think it would actually be a great idea to add an optional canvas region to the Nasal console - that would allow people to directly play with it and run examples, without having to create their own dialogs. That would actually be a great opportunity to also ship your various canvas examples as part of the base package: as canvas demos that can be tested and adapted by people, directly inside the simulator - without having to edit Nasal/XML files using a separate editor.
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: 11427
Joined: Tue Mar 25, 2008 8:40 am

Re: Backwards compatibility

Postby Hooray » Fri May 24, 2013 6:46 pm

Hooray wrote in Thu May 23, 2013 7:43 pm:[*] <canvas></canvas> sections are not yet documented in README.gui


This is also fixed in the commit mentioned at: https://gitorious.org/fg/flightgear/com ... f42090c992
https://gitorious.org/~hooray/fg/hooray ... as-loglist
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: 11427
Joined: Tue Mar 25, 2008 8:40 am

Re: Backwards compatibility

Postby TheTom » Sun May 26, 2013 8:13 pm

Hooray wrote in Thu May 23, 2013 7:43 pm:Dialog has become "Window" - without any migration path, maybe introduce an option to request a specific API for better portability ?

What kind of migration part do you expect? There is just one single step required: replace "Dialog" with "Window". As this part of the Canvas system is highly experimental I do not want to introduce different APIs even before a first "stable" version of it.

Hooray wrote in Thu May 23, 2013 7:43 pm:PropertyList XML files that make use of the <canvas> widget should probably require a certain FG version ( >= 2.8) using a custom attribute or tag, which is checked during dialog instantiation or GUI re-initialization - otherwise, people may be using a <canvas> section without canvas support, so a SG_LOG() warning would make sense

How should that work? If we add the check now canvas support is already available, so checking for it does not change anything. Older, already released versions of FlightGear which do not support the canvas can not be changed anymore so we are not able to add checks anymore...
TheTom
 
Posts: 321
Joined: Sun Oct 09, 2011 10:20 am

Re: Backwards compatibility

Postby Hooray » Sun May 26, 2013 8:14 pm

I was obviously NOT referring to "forward compatibility" - but just to start adding such a version attribute now :D
Believe it or not, I wasn't expecting to change every released version :lol:
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: 11427
Joined: Tue Mar 25, 2008 8:40 am


Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest