From: Dave F. <dav...@co...> - 2004-04-03 11:33:02
|
On Saturday 03 April 2004 11:13 am, Patrick Earl wrote: > I was describing my idea of the client code. Your idea of attaching > arrays is interesting, but how would you handle the case where there > are two areas within the dialog that have looped stuff added to them? > I'm not saying it's difficult... I just haven't thought about it. Seems to me that you would do one of two things (possibly both?). You'd create a new sizer in that area and just loop through the array adding new elements to the sizer accordingly, or you'd put a panel or some scrollable widget, then a sizer, and then loop the array adding new elements to the sizer. The second option means it'll size with the dialog without forcing the dialog to be too big, possibly bigger than the screen. So your dialog would have this sort of tree (better set to use a fixed font for this): Dialog Panel Sizer SOme edit gadget Antoher edit gadget Scrollable widget // This is the problem I'm solving here ;) Sizer First array element Second array element Yet another widget Dave > Patrick > > On Friday 02 April 2004 13:25, joakim verona wrote: > > 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=c > > >lick _______________________________________________ > > >jazzplusplus-devel mailing list > > >jaz...@li... > > >https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel > > > > ------------------------------------------------------- > > 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=cli > >ck _______________________________________________ > > jazzplusplus-devel mailing list > > jaz...@li... > > https://lists.sourceforge.net/lists/listinfo/jazzplusplus-devel > > ------------------------------------------------------- > 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 -- Visit my website! http://www.davefancella.com/?event=em What is a magician but a practising theorist? -- Obi-Wan Kenobi |