Hi Chip: I tried that. I may have done something wrong, but I couldn't get it to work. I think the variables that I used woldn't retain their values outside the function that I defined them in, so I just decided to make them all global and the dialog and it's radial butons work perfectly. The hotkeys which existed in earlier versions of the app still work the same as they have always done, and they are local. Kevin Huber
On 9/3/11, Chip Orange <[email protected]> wrote: > Hi Kevin, > > My first thought was that you could store any settings you might change into > variables before you display your dialog; that should insure that you'd be > working with the desired .set file and not the winEyes.set file. > > When the user is using the dialog to make changes, yu could store the > results in these variables. > > When they're done, and if they click "ok", you could dismiss the dialog and > wait. you could wait for an amount of time, or there is an event which > fires each time a .set file is loaded; you could wait until this event > notifies you that the .set file you took the settings from has been > reloaded. > > Once done waiting, you could then apply any changes to the loaded .set file. > > What a weird problem; it just wouldn't have occurred to me that displaying a > dialog would change the loaded .set file. Can't think of any way around it > to prevent it from happening, so afraid you'll have to do this extra bit of > work. > > hth, > > Chip > > > -----Original Message----- > From: Kevin Huber [mailto:[email protected]] > Sent: Wednesday, August 31, 2011 4:14 PM > To: [email protected] > Subject: Re: creating a dialog with radio buttons > > Hi Chip and others: > Thanks for all your help with the radio buttons. > My SetOptions dialog in my ProofReading script is working now except for one > problem. > When the dialog loads, Wineyes.set becomes the active set file. > Therefore, when I change my proofreading settings from within the dialog, > they are changed in Wineyes.set, but not in the application I am working > with. > Is there any way to fix this, other than resetting the scope to Global? > Kevin Huber > On 8/17/11, Chip Orange <[email protected]> wrote: >> Hi Kevin, >> >> they really turn out to be exactly like working with a checkbox; that >> is, you work with each radio button as if it were a stand-alone >> control such as a checkbox. you don't have to do anything which >> references the other radio buttons in the group; WE will handle this for > you. >> >> Below is an example of my event handler declaration line, and part of >> the case statement where I handle one radio button; except for the >> actual event constant I'm testing against, you can't really tell that >> handling it is much different from handling a checkbox. >> >> you'll also need to initialize the particular radio button which is >> the default in the dialog creation portion (there, you would reference >> the control by it's name the Way Jeff did in his example for you; >> that is, you have to use the dialog object, and use it's controls >> property, which is a collection, pass in the name of the radio button >> you want to set to true, and you'll get back a radio button object >> which you can use to set it's .checked property to true). I'll add a >> bit of the dialog creation code down below as well to show this. >> >> >> Function preferencesDialogEventHandler(dObj, dEvent, dId, _ >> dControl) >> ' ... >> >> >> Select Case dId >> Case "table_headers_first_cell" >> ' above is the ID of the particular radio button I'm testing for; >> you'll have to have a CASE like this for each radio button >> If dEvent = radiobuttonClicked Then >> dControl.Checked = True ' this shifts the radio button > selection on >> the screen to this button >> preferencesDialogEventHandler = True ' and here you'd put > some code >> to deal with the radio button which is particular to your app >> End If >> >> Case Else >> ' now for the choices which are not related to a specific control >> If dEvent = dialogCreated Then >> ' initialize a particular radio button to be the default >> dObj.control("table_headers_off").Checked = True >> end if >> end select >> >> hth, >> >> Chip >> >> -----Original Message----- >> From: Kevin Huber [mailto:[email protected]] >> Sent: Wednesday, August 17, 2011 1:11 PM >> To: gw-scripting >> Subject: creating a dialog with radio buttons >> >> Hi Chip: >> I am trying to create a dialog in my ProofReading script in which the >> user can set each of the proofreading options to his/her preference. >> I have created the dialog using the UI Design App using a set of radio >> buttons for each proofreading feature, and it appears on the screen >> the way I had envisioned it. >> I am not sure, however, how to deal with Radio buttons in an event > handler. >> I looked at the class 14 examples and they are very helpful, but I >> need to find an example of an event handler which handles radio buttons. >> Can you, or anyone else, help me with this? >> Kevin Huber >> >> > >
