>From the GUI development PDF:
"ID An identifier for the widget. A default identifier is provided for each widget, so you can easily identify it in the list of widgets. This identifier is used to access this widget programmatically, and to register event handlers with the widget. You may change the default name" Okay, I set the ID for widgets in the specs I use to define the contents of each tab in a TabControl. I cannot seem to figure out how to programmatically address each widget. When I inspect the TabControl and drill down into the individual widgets I cannot seem to find any evidence that the ID I specified is anywhere in the structure. I'm baffled. Any help appreciated. :-) -Carl Gundel http://www.libertybasic.com http://www.runbasic.com _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
I think the TabControl example parcel that comes with VW needs to be
fleshed out more. The only thing it adds to the three tabs in the example are static labels. Could someone at Cincom please spend 10 minutes and flesh this out so that there are editable fields in the tabs that set/get values on some sort of model? Thanks, -Carl Gundel http://www.libertybasic.com http://www.runbasic.com On Mon, Feb 27, 2012 at 1:27 AM, Carl Gundel <[hidden email]> wrote: > From the GUI development PDF: > > "ID > An identifier for the widget. A default identifier is provided for > each widget, so you can easily identify it in the list of widgets. > This identifier is used to access this widget programmatically, and > to register event handlers with the widget. You may change the > default name" > > Okay, I set the ID for widgets in the specs I use to define the > contents of each tab in a TabControl. I cannot seem to figure out how > to programmatically address each widget. When I inspect the > TabControl and drill down into the individual widgets I cannot seem to > find any evidence that the ID I specified is anywhere in the > structure. > > I'm baffled. Any help appreciated. :-) > > -Carl Gundel > http://www.libertybasic.com > http://www.runbasic.com _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Okay, let me restate just to clarify what I'm talking about. I have
no trouble at all using the painter to create a window with a tab control, and painting the windowSpecs needed for each tab in the window. What I'm struggling with is populating the widgets that are in each tab, and then getting the values out of those widgets and back into my application. It would be so very helpful if the TabControl example parcel went so far as to add some fields,checkboxes, etc. to the tabs and then set their values some toy model, and then put the values from the widgets back into the model as they are modified, or when the window is accepted, or closed. I would expect this to be easy to do, and it probably is once you know how, but I am really confounded. Thanks. -Carl Gundel http://www.libertybasic.com http://www.runbasic.com On Mon, Feb 27, 2012 at 12:35 PM, Carl Gundel <[hidden email]> wrote: > I think the TabControl example parcel that comes with VW needs to be > fleshed out more. The only thing it adds to the three tabs in the > example are static labels. Could someone at Cincom please spend 10 > minutes and flesh this out so that there are editable fields in the > tabs that set/get values on some sort of model? > > Thanks, > > -Carl Gundel > http://www.libertybasic.com > http://www.runbasic.com > > On Mon, Feb 27, 2012 at 1:27 AM, Carl Gundel <[hidden email]> wrote: >> From the GUI development PDF: >> >> "ID >> An identifier for the widget. A default identifier is provided for >> each widget, so you can easily identify it in the list of widgets. >> This identifier is used to access this widget programmatically, and >> to register event handlers with the widget. You may change the >> default name" >> >> Okay, I set the ID for widgets in the specs I use to define the >> contents of each tab in a TabControl. I cannot seem to figure out how >> to programmatically address each widget. When I inspect the >> TabControl and drill down into the individual widgets I cannot seem to >> find any evidence that the ID I specified is anywhere in the >> structure. >> >> I'm baffled. Any help appreciated. :-) >> >> -Carl Gundel >> http://www.libertybasic.com >> http://www.runbasic.com _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
On Mon, Feb 27, 2012 at 1:29 PM, Carl Gundel <[hidden email]> wrote:
Okay, let me restate just to clarify what I'm talking about. I have There may be a better way -- but this is what I did to make it work. When switching tabs, I get an event sent thats used to set the canvas for the current tab. I use the form: (self builder componentAt: #myTabControl) widget client: self spec: #nameOfTabCanvas the #client:spec: method returns a new builder for the components in the spec. I just hold onto that in an instance var and use it when I want to get at the controls. For getting and setting domain values, I make heavy use of aspects. So input fields have an aspect something like: 'selectedEvironment name' and then 'selectedEnvironment host'. Hopefuly that makes sense _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Thank you. That was all I needed. :-)
-Carl On Mon, Feb 27, 2012 at 5:35 PM, Jon Paynter <[hidden email]> wrote: > On Mon, Feb 27, 2012 at 1:29 PM, Carl Gundel <[hidden email]> wrote: >> >> Okay, let me restate just to clarify what I'm talking about. I have >> no trouble at all using the painter to create a window with a tab >> control, and painting the windowSpecs needed for each tab in the >> window. What I'm struggling with is populating the widgets that are >> in each tab, and then getting the values out of those widgets and back >> into my application. It would be so very helpful if the TabControl >> example parcel went so far as to add some fields,checkboxes, etc. to >> the tabs and then set their values some toy model, and then put the >> values from the widgets back into the model as they are modified, or >> when the window is accepted, or closed. I would expect this to be >> easy to do, and it probably is once you know how, but I am really >> confounded. > > > There may be a better way -- but this is what I did to make it work. > When switching tabs, I get an event sent thats used to set the canvas for > the current tab. I use the form: > (self builder componentAt: #myTabControl) widget client: self spec: > #nameOfTabCanvas > > the #client:spec: method returns a new builder for the components in the > spec. I just hold onto that in an instance var and use it when I want to > get at the controls. For getting and setting domain values, I make heavy > use of aspects. So input fields have an aspect something like: > 'selectedEvironment name' and then 'selectedEnvironment host'. > > Hopefuly that makes sense > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Carl Gundel-2
Carl
Use the existing system tools as examples. The ProcessMonitorClient is a simple one. Terry =========================================================== Terry Raymond Crafted Smalltalk 80 Lazywood Ln. Tiverton, RI 02878 (401) 624-4517 [hidden email] =========================================================== > -----Original Message----- > From: [hidden email] [mailto:[hidden email]] On > Behalf Of Carl Gundel > Sent: Monday, February 27, 2012 12:36 PM > To: vwnc > Subject: Re: [vwnc] Accessing TabControl widgets programmatically? > > I think the TabControl example parcel that comes with VW needs to be > fleshed out more. The only thing it adds to the three tabs in the example are > static labels. Could someone at Cincom please spend 10 minutes and flesh > this out so that there are editable fields in the tabs that set/get values on > some sort of model? > > Thanks, > > -Carl Gundel > http://www.libertybasic.com > http://www.runbasic.com > > On Mon, Feb 27, 2012 at 1:27 AM, Carl Gundel <[hidden email]> > wrote: > > From the GUI development PDF: > > > > "ID > > An identifier for the widget. A default identifier is provided for > > each widget, so you can easily identify it in the list of widgets. > > This identifier is used to access this widget programmatically, and to > > register event handlers with the widget. You may change the default > > name" > > > > Okay, I set the ID for widgets in the specs I use to define the > > contents of each tab in a TabControl. I cannot seem to figure out how > > to programmatically address each widget. When I inspect the > > TabControl and drill down into the individual widgets I cannot seem to > > find any evidence that the ID I specified is anywhere in the > > structure. > > > > I'm baffled. Any help appreciated. :-) > > > > -Carl Gundel > > http://www.libertybasic.com > > http://www.runbasic.com > > _______________________________________________ > vwnc mailing list > [hidden email] > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Terry, thanks. I did try digging around in the image but what I found was wasn't particularly clear to me. It did not occur to me that each time I installed a new canvas that I would also get a new uibuilder (thanks again to Jon) and that this is what I needed. It turned out to be really simple, of course.
If the PDF docs were fleshed out just a little bit more it would be a good thing. -Carl Gundel Liberty BASIC for Windows - http://www.libertybasic.com Run BASIC, easy web programming - http://www.runbasic.com On Feb 27, 2012, at 7:06 PM, "Terry Raymond" <[hidden email]> wrote: > Carl > > Use the existing system tools as examples. The ProcessMonitorClient is a > simple one. > > Terry > > =========================================================== > Terry Raymond > Crafted Smalltalk > 80 Lazywood Ln. > Tiverton, RI 02878 > (401) 624-4517 [hidden email] > =========================================================== > >> -----Original Message----- >> From: [hidden email] [mailto:[hidden email]] On >> Behalf Of Carl Gundel >> Sent: Monday, February 27, 2012 12:36 PM >> To: vwnc >> Subject: Re: [vwnc] Accessing TabControl widgets programmatically? >> >> I think the TabControl example parcel that comes with VW needs to be >> fleshed out more. The only thing it adds to the three tabs in the example > are >> static labels. Could someone at Cincom please spend 10 minutes and flesh >> this out so that there are editable fields in the tabs that set/get values > on >> some sort of model? >> >> Thanks, >> >> -Carl Gundel >> http://www.libertybasic.com >> http://www.runbasic.com >> >> On Mon, Feb 27, 2012 at 1:27 AM, Carl Gundel <[hidden email]> >> wrote: >>> From the GUI development PDF: >>> >>> "ID >>> An identifier for the widget. A default identifier is provided for >>> each widget, so you can easily identify it in the list of widgets. >>> This identifier is used to access this widget programmatically, and to >>> register event handlers with the widget. You may change the default >>> name" >>> >>> Okay, I set the ID for widgets in the specs I use to define the >>> contents of each tab in a TabControl. I cannot seem to figure out how >>> to programmatically address each widget. When I inspect the >>> TabControl and drill down into the individual widgets I cannot seem to >>> find any evidence that the ID I specified is anywhere in the >>> structure. >>> >>> I'm baffled. Any help appreciated. :-) >>> >>> -Carl Gundel >>> http://www.libertybasic.com >>> http://www.runbasic.com >> >> _______________________________________________ >> vwnc mailing list >> [hidden email] >> http://lists.cs.uiuc.edu/mailman/listinfo/vwnc > > _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |