[R] Balasan: Re: State "disabled" to "Normal" menu

From: Handayani Situmorang <handasitumorang_at_yahoo.co.id>
Date: Mon, 19 May 2008 12:00:53 +0700 (ICT)

Thank you very much for your advice,Jhon. I'm just trying to write some code. The logic of my code is if "Model" menu have been hit then "Evaluation" menu will active. I build the menus by "tkadd", and try to change the state by tkconfigure, but it didn't work. May be i must catch the ID or the session of "Model" menu so that i can change the state of "Evaluation" menu. But i have no idea how to do that. Thank you.       

John Fox <jfox_at_mcmaster.ca> wrote:
  Dear Handa,

It's very difficult for me to tell from your message what it is you're trying to do. Are you simply a user of the Rcmdr, or are you trying to write a plug-in?

If the former, Rcmdr menu items are disabled when they are for some reason inappropriate to the current context. For example, before there's an active data set, (almost) all of the statistical-analysis menu items are disabled; similarly, if your data set has no factors, then menus items for operations requiring factors, such as building contingency tables, are disabled.

If the latter, the next-to-last field in each line of the menu-definition file is (optionally) a quoted logical expression: if the expression evaluates to TRUE, then the corresponding menu item is activated; if FALSE, it is not. For example, for the two-way contingency table menu item, the activation field is "factorsP(2)", which evaluates to TRUE if there are at least two factors in the active data set.

I hope this helps,
John

On Sun, 18 May 2008 09:22:14 +0700 (ICT) Handayani Situmorang wrote:
> Hello all.
> is there a simple way to change the state of menu from "disabled"
> to "normal"? i have read from the Rcmdr code, but it's really
> difficult for me. I'm new for R. Thank you so much.
>
> Regard
> Handa
>
>
> ---------------------------------
> Yahoo! Toolbar kini dilengkapi dengan Search Assist. Download
> sekarang juga.
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
http://socserv.mcmaster.ca/jfox/        

 Yahoo! Toolbar kini dilengkapi dengan Search Assist. Download sekarang juga.

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 19 May 2008 - 05:13:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 19 May 2008 - 05:30:39 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive