Board index FlightGear Development Canvas

Deleting a element from a group

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.

Deleting a element from a group

Postby Necolatis » Wed Jul 23, 2014 4:32 pm

Is path.del() enough, or is some other measure needed to permanently delete and remove a canvas element from its group?
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2045
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Deleting a element from a group

Postby Hooray » Wed Jul 23, 2014 4:56 pm

like you say, invoking the .del() destructor should usually do the trick - unless there's more going on behind the scenes (which is for example the case with the MapStructure framework, which also makes use of caching and some other layers introducing abstraction/indirection). If in doubt, just use the property browser and watch/monitor the corresponding tree while working with it via the Nasal console.
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: 11437
Joined: Tue Mar 25, 2008 8:40 am


Return to Canvas

Who is online

Users browsing this forum: No registered users and 1 guest