Easy A
Would you like to react to this message? Create an account in a few clicks or log in to continue.


 
HomeHome  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  

Share
 

 Tk help me!

View previous topic View next topic Go down 
AuthorMessage
Database
Member
Member
Database

Posts : 318
Join date : 2012-03-04

Tk help me! Empty
PostSubject: Tk help me!   Tk help me! EmptyFri Jul 27, 2012 11:18 pm

How can I use Tk with Ruby?

I tried the statement:
require 'tk'

But it gives me this error:
LoadError: no such file to load -- tk

Do I have to install tk for it to work?
Back to top Go down
Database
Member
Member
Database

Posts : 318
Join date : 2012-03-04

Tk help me! Empty
PostSubject: Re: Tk help me!   Tk help me! EmptyFri Jul 27, 2012 11:19 pm

Database wrote:
How can I use Tk with Ruby?

I tried the statement:
require 'tk'

But it gives me this error:
LoadError: no such file to load -- tk

Do I have to install tk for it to work?

ofcourse... its like do i have to install word before i can open a word document
Back to top Go down
Database
Member
Member
Database

Posts : 318
Join date : 2012-03-04

Tk help me! Empty
PostSubject: Re: Tk help me!   Tk help me! EmptyFri Jul 27, 2012 11:19 pm

Database wrote:
How can I use Tk with Ruby?

I tried the statement:
require 'tk'

But it gives me this error:
LoadError: no such file to load -- tk

Do I have to install tk for it to work?

ook also to this:

http://members.chello.nl/k.vangelder/ruby/learntk/

best regards
Back to top Go down
Database
Member
Member
Database

Posts : 318
Join date : 2012-03-04

Tk help me! Empty
PostSubject: Re: Tk help me!   Tk help me! EmptyFri Jul 27, 2012 11:19 pm

Ok. I dowloaded tk. Where do I put the file?


I put it in the ruby folder. I typed ./configure, then make but got this error:
compiling readline
gcc -I. -I../../.ext/include/i686-darwin8.11.1 -I../.././include -I../.././ext/readline -DRUBY_EXTCONF_H=\"extconf.h\" -fno-common -g -O2 -pipe -fno-common -o readline.o -c readline.c
readline.c: In function 'filename_completion_proc_call':
readline.c:659: error: 'filename_completion_function' undeclared (first use in this function)
readline.c:659: error: (Each undeclared identifier is reported only once
readline.c:659: error: for each function it appears in.)
readline.c:659: warning: assignment makes pointer from integer without a cast
readline.c: In function 'username_completion_proc_call':
readline.c:684: error: 'username_completion_function' undeclared (first use in this function)
readline.c:684: warning: assignment makes pointer from integer without a cast
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1
Back to top Go down
Database
Member
Member
Database

Posts : 318
Join date : 2012-03-04

Tk help me! Empty
PostSubject: Re: Tk help me!   Tk help me! EmptyFri Jul 27, 2012 11:19 pm

Database wrote:
Ok. I dowloaded tk. Where do I put the file?


I put it in the ruby folder. I typed ./configure, then make but got this error:
compiling readline
gcc -I. -I../../.ext/include/i686-darwin8.11.1 -I../.././include -I../.././ext/readline -DRUBY_EXTCONF_H=\"extconf.h\" -fno-common -g -O2 -pipe -fno-common -o readline.o -c readline.c
readline.c: In function 'filename_completion_proc_call':
readline.c:659: error: 'filename_completion_function' undeclared (first use in this function)
readline.c:659: error: (Each undeclared identifier is reported only once
readline.c:659: error: for each function it appears in.)
readline.c:659: warning: assignment makes pointer from integer without a cast
readline.c: In function 'username_completion_proc_call':
readline.c:684: error: 'username_completion_function' undeclared (first use in this function)
readline.c:684: warning: assignment makes pointer from integer without a cast
make[1]: *** [readline.o] Error 1
make: *** [all] Error 1

- seems you don't have the proper headers. Do you run on mac?
- tk work with tcl, do you have tcl installed?

best regards
Back to top Go down
Database
Member
Member
Database

Posts : 318
Join date : 2012-03-04

Tk help me! Empty
PostSubject: Re: Tk help me!   Tk help me! EmptyFri Jul 27, 2012 11:20 pm

Yeah, I'm on a mac. Where can I get the proper headers?

Where can I get tcl from?



Thanks.
Back to top Go down
Database
Member
Member
Database

Posts : 318
Join date : 2012-03-04

Tk help me! Empty
PostSubject: Re: Tk help me!   Tk help me! EmptyFri Jul 27, 2012 11:20 pm

Database wrote:
Yeah, I'm on a mac. Where can I get the proper headers?

Where can I get tcl from?



Thanks.

usualy they come with tcl and tk but some come with system libs.

Quote :

Where can I get tcl from?
same place you get tk.

Sorry, I have no experience with this on mac, I don't think that my answers could help in this case.

best regards
Back to top Go down
Database
Member
Member
Database

Posts : 318
Join date : 2012-03-04

Tk help me! Empty
PostSubject: Re: Tk help me!   Tk help me! EmptyFri Jul 27, 2012 11:20 pm

Ok, thanks.


How do I install tk/tcl after I have downloaded it?
Back to top Go down
Database
Member
Member
Database

Posts : 318
Join date : 2012-03-04

Tk help me! Empty
PostSubject: Re: Tk help me!   Tk help me! EmptyFri Jul 27, 2012 11:20 pm

Database wrote:
Yeah, I'm on a mac. Where can I get the proper headers?

Where can I get tcl from?



Thanks.

Few years ago I use this for a multiplatform project and I was happy:

http://www.activestate.com/Products/activetcl/

PS: seems to be a problem with readline and ruby 1.8.6 on mac.

http://wincent.com/knowledge-base/Bu...Mac_OS_X_Tiger

best regards
Back to top Go down
Sponsored content




Tk help me! Empty
PostSubject: Re: Tk help me!   Tk help me! Empty

Back to top Go down
 

Tk help me!

View previous topic View next topic Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Easy A :: Tk help me! Edit-trash Useless :: Trash-