gWidgets return multiple selections

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

gWidgets return multiple selections

LCOG2
HI all,
  I am learning the gWidgets package and have not been able to pass or find a solution for my problem.  I want to create a dialogue box that pops up and asks the user to check some boxes and then store responses for each selection.  I can do this for a single selection but when I try multiple responses i get errors and I am not sure where I am going wrong.  

The thing I think i don;t understand is how to handle storing the multiple results selected?  Do I need to do this in the handler or after?

Some sample code:

#Load libraries
library(gWidgets)
library(RGtk2)


#Construct handler
Handler1 <- function(h,...){  
        label <- h$obj[]
        Selected. <<-  Selected. <<-Selected.[Selected.!=label]
       
}

#Open window
Window1 <- gwindow("Select Daily Descriptors") #Create list to store results Days. <- c("Day1","Day2","Day3") Outputs. <- rep(NA, length(Days.))
names(Outputs.) <- Days.
SelectionOptions. <- c("Bicycle Event1", "Construction Nearby","Path
Closure")


#Build column for every day
for(day in Days.){
        BigDataGroup <- ggroup(cont=Window1, horizontal = FALSE)
        Input1Group <-  gframe(day, container = Window1, horizontal=FALSE)
        Selected. <- SelectionOptions.
        #Create check box for each selection type
        for(select in SelectionOptions. ){
                gcheckbox(select,
                        container=Input1Group,
            checked=FALSE,
            handler= Handler1)
        }
        Outputs.[day] <- Selected.
}


Thanks in advance

Josh
Reply | Threaded
Open this post in threaded view
|

Re: gWidgets return multiple selections

GregChapman
I think you may have posted to the wrong forum.

This one is for Nabble support only.
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.
Reply | Threaded
Open this post in threaded view
|

RE: gWidgets return multiple selections

LCOG2

HI Greg,

  The gWidgets package is an R package.  Are you suggesting there is another Nabble R sub-forum more appropriate for this topic? 

 

Thanks

 

Josh

 

From: GregChapman [via Nabble Support] [mailto:[hidden email]]
Sent: Friday, November 21, 2014 1:56 AM
To: ROLL Josh F
Subject: Re: gWidgets return multiple selections

 

I think you may have posted to the wrong forum.

This one is for Nabble support only.

Just a Volunteer Nabble Helper - because the nice folk at Nabble have helped me!

 


If you reply to this email, your message will be added to the discussion below:

http://support.nabble.com/gWidgets-return-multiple-selections-tp7592770p7592792.html

To unsubscribe from gWidgets return multiple selections, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

RE: gWidgets return multiple selections

GregChapman
LCOG2 wrote
The gWidgets package is an R package.  Are you suggesting there is another Nabble R sub-forum more appropriate for this topic?
Yes, but it won't be a sub-forum of Nabble Support.

You need to use visit this forum and look for the link at "Powered by Nabble" at the bottom of the page then do a search at the Nabble home page for an approprite forum that Nabble hosts. There plenty of results for "gWidgets".
Volunteer Helper - but recommending that users move off the platform!
Once the admin for GregHelp now deleted.