Your code creates the menu that will run the cascade function.  The cascade 
function gets a name from the user to save, but you don't do anything with the 
name other than return it, and the code that calls cascade does nothing with 
the return value.  If you want the text in the text window saved, then you will 
need to add that functionality to the cascade function, first you will need to 
extract the text from the text widget, then using R commands and the filename 
you can save the information (see the cat command for one way of doing this).

--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
801.408.8111


> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> project.org] On Behalf Of justin Kameni
> Sent: Saturday, November 08, 2008 12:39 PM
> To: r-help@r-project.org
> Cc: [EMAIL PROTECTED]
> Subject: [R] Get Information
>
> I am a new commer in R. I am using the library tcltk, i need few
> information about it.
> so that, i wrote the following programme to save the file, but when i
> save the file, i do not find the file save, please help me, in order to
> continue my projet.
> this is the programme:
>
> tt  <- tktoplevel()
> txt <- tktext(tt)
> tkwm.title(tt,"Saisi des modalités") #intitule la fenêtre
> tkgrid(txt)
> tkmark.set(txt,"insert","0.0")
> topMenu <- tkmenu(tt)
> tkconfigure(tt,menu=topMenu)
> cascade =function ()
> {fileName=tclvalue(tkgetSaveFile(initialfile="modalite.txt",filetypes="
> {{JPEG Files} {.jpg .jpeg}} {{PDF File} {.pdf}} {{Text File} {.txt}}
> {{All files} *}"))
>                       return(fileName)
>                       }
> tkadd(topMenu,"command",label="Enregistrer",command=function ()
> cascade()) Please correct the programme i send it back. Please, i need
> the correction to continue my projet.
> Thanks in advance.
>
>
>  Ing KAMENI Justin
> Etudiant en Master en Statistique
> Option: Econométrie,
> Assurance et Finance
> Data Management et Data Mining
> Gsm: 0032487710413
> Route de Blocry 29/003
>
>
>
>
>         [[alternative HTML version deleted]]

______________________________________________
R-help@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.

Reply via email to