On Jul 29, 2006, at 2:23 AM, Koen van Hees wrote:

Not getting replies on my question made me doubt my question,
 so I found a solution. I think.
It works very well, but I feel I'll have to revisit this
when I get better at this programming thing.

First of all, please *do not cross-post* to both lists. You might find yourself booted off of the lists as REAL really frowns upon it.

Also many won't answer now as they agree.

Since you are obviously learning the basics, the Getting Started list is best to stick with.

Another thing you should be aware of is that Container controls are a *pro-only* feature and relatively new at that. This limits the list a bit more.

I took the disclosuretriangles out of the containers, thus solving
the stupid problem I had created. Now I can trigger the right
behavior using the triangle's action handler.

Correct.

And this code I put in every triangle, but with only the code
applying to itself and those controls below it.

The obvious disadvantages are:
- I have to know the amount of controls beforehand

Not necessarily. You can keep track of how many groups you have in a variable and use a sub-classed disclosure triangle control array to keep a single copy of any similar code in methods of the sub-class.

- this is a lot of code and there's no method I can refer to in
every triangle instead of putting something very similar in every
triangle handler

Each Disclosure Triangle has an index which you can use to identify which one is clicked on.

If you have any comments, please feel free! Thanks.

Do simple tests to learn how to use control arrays and sub-classes before trying the all at once final approach.

The control array is the most important as the methods can be in the window as well in many cases.

Search the archives (in the footer) for control arrays and you will find lots of information. Look in both GS and NUG as one is older than the other (NUG).

Terry

PS. Try to stick to one thread rather than a new subject each time.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to