|
From: joakim v. <jo...@ve...> - 2004-04-02 20:26:01
|
I'm not shure I'm following you entirely.
The idea I had was that the loop that attaches holder variables
for one of the controllers in the panel copy we are attaching to
the parent dialog, could reside within the jppResourceDialog, rather than
within the client code.
For instance, with the mixer dialog as example, we have, say 6, volume
controllers,
and also 6 timbre controllers.
So client code could look like this:
long timbre[6];
long volume[6];
jppResourcePanel panel("mixerpanel");
jppResourceDialog dialog("mixerparent", panel, 6, parentWin);
dialog.AttachArray(timbre,"timbre");
dialog.AttachArray(timbre,"volume");
...which feels like a fairly compact description.
(It seemed to me that it was the implementation of this you were
describing below.)
/Joakim
Patrick Earl wrote:
>On Friday 02 April 2004 00:49, Joakim Verona wrote:
>
>
>>Yes, this seems very nice!
>>
>>How would the Attach function work in this case?
>>It would be neat if we could attach an array of values.
>>
>>
>
>Is there much of an advantage to attaching an array? In the case of
>my example, you could just stick the attach line in the example and
>assign it to a particular array index. Are there cases where you
>wouldn't loop to add the extra widgets? Or when the loop index
>probably wouldn't be numeric or sequentially numeric?
>
> Patrick
>
>
>
>>>jppResourceDialog dialog("myDialog", parentWin);
>>>for x in ["one", "two", "three"] {
>>> jppResoucePanel panel("myPanel");
>>> wxLabel *label = (wxLabel *) panel.FindWindowByName("myLabel");
>>> if(!label) cout << "You crazy!";
>>> label.SetText(x);
>>> dialog.AddToSizer("mySizer", panel);
>>>}
>>>
>>>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by: IBM Linux Tutorials
>Free Linux tutorial presented by Daniel Robbins, President and CEO of
>GenToo technologies. Learn everything from fundamentals to system
>administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
>_______________________________________________
>jazzplusplus-devel mailing list
>jaz...@li...
>https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel
>
>
|