comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Recursive Function Program in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Recursive Function Program in IDL [message #46795 is a reply to message #46710] Wed, 14 December 2005 13:06 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Wed, 14 Dec 2005 09:02:17 -0700, David Fanning wrote:

> Folks,
>
> Does anyone have a handy recursive function that does something neat?
> Someone is asking, and I don't have time to work on this. He (apparently)
> can't get to the newsgroup.

How about one to get all the widget ID's on a given widget tree:

;; decend heirarchy of tlb .. return entire tree's widget_ids in 'list'
pro treedesc, curin,list
cur=curin ;ensure local copy of current widget
if cur ne 0 then begin
if n_elements(list) eq 0 then list=cur else list=[list,cur]
cur=widget_info(cur,/CHILD) ;descend one level
while cur ne 0 do begin ; find siblings... descend their subtrees
treedesc,cur,list ; recurs on sibling
cur=widget_info(cur,/SIBLING)
endwhile
endif
end

I think Mark rewrote this and stuck it in his library too.

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Pass by value and performance
Next Topic: Convert polylines to polygons

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 14:41:24 PDT 2025

Total time taken to generate the page: 0.88222 seconds