Re: Programming Challenge: Reordering and Renumbering Control definitions

new topic     » goto parent     » topic index » view thread      » older message » newer message

Pete Lomax wrote:

> Hi all,
>
> I am hoping someone will enjoy a little challenge, though bear in mind
> this will be closed source.  I am aware that I am being a little
> cheeky asking for help...

I disagree, I don't consider it cheeky for several reasons. smile

> I think it is an interesting problem anyway.
>
> The problem is that Euphoria has no forward definitions, so all
> parents must be defined before all child controls. Normally not a
> problem, but if I want to allow a control, in a long list, to change
> parent, I have to reorder, and renumber. Controls can be deeply
> nested, but are held in a flat list. Something recursive is probably
> required.

I don't think that I've understood the situation completely ...
But maybe a Topological Sort would be helpful:
http://www.brpreiss.com/books/opus4/html/page557.html#SECTION0017330000000000000000

Recently I wrote a little Eu function that does Topological Sorting.
If you want, I can (try to) translate the comments to English, and then
post it here.

<big snip>

Regards,
   Juergen

PS: Happy Easter to all (for whom it has a meaning)!

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu