Inner Class Relationship

  • Thread starter James Edward Gray II
  • Start date
T

Tobias Luetke

Try the windows one click installer


I'm almost afraid to ask but could the fact that I'm using Ruby 1.9 cause
this problem? And if so is reinstalling 1.8.3 a simple matter of just
unzipping/overwriting my current directories, etc?

One more thought... I have two separate installations of Rails. The active
installation is at --> C:\cs\www\rails\ ...the non-active installation is at
--> C:\cs\ruby\rails

When I modified the header files (replaced the #!/usr/local/bin (or whatever
it is) with my C: path --> C:\cs\ruby\bin) that wouldn't cause a problem
like this would it?




-----Original Message-----
From: James Britt [mailto:[email protected]]
Sent: Saturday, November 20, 2004 9:13 PM
To: ruby-talk ML
Subject: Re: Error trying to get going with Rails Todo tutorial...

Abraham said:
Sure!

It is:

rails Todo

So including the path: C:\cs\www>rails Todo

Well, that seems pretty straightforward ...

I tried it on my Win2K box, and half-expected the capitalized name to cause
a problem, but all the directories and code is created without any errors
that I can see.

I'm using rake and rails installed via rubygems, all recently updated.

Maybe someone else knows the problem?

James
 
M

Mauricio Fernández

I know this is a retarded problem, but somehow I managed to set things up
such that I get an error when running "Rails Todo". Rather than creating the
directory structure (etc) I just get an error:

C:/cs/ruby/bin/rails:9:in 'system': Exec format error - rake fresh_rpa_rails
(Errno::ENOEXEC)
from C:/cs/ruby/bin/rails:9

Does anyone recognize the above and know what I need to do about it? I
appreciate your help very much!

Could you try to edit C:/cs/ruby/bin/rails and change line 9 to
system %{rake.bat fresh_rpa_rails}
?
 
L

Laurent Julliard

James said:
Yes.

Even if I separate the two classes, my questions remain unchanged:
What's a good way to allow one type of object to send private-ish
messages to another type of object?

As for details: My outer class is a server. My inner class is a
connection for that server. When a connection ends, I need a way to
notify the Server object to remove it from it's maintenance list.
That's the message I'm wanting to hide from the outside world.

Thanks for the suggestions.

James Edward Gray II

James,

What you need is FreeBase. FreeBAse is a databus written by Rich
Kilmer that we extensively use in the FreeRIDE project (Ruby IDE). It
allows any Ruby object to publish nodes in a tree -like hierarchy and
other Ruby object to listen to what's happening to these nodes.

It's a sort of a meeting point for Roby object doesn't know or doesn't
want to know about each other. You can get Freebase from the FreeRIDE
source code. It's a self contain piece of code that we haven't touched
for moths so it is farly stable.

The source file is at:
http://rubyforge.org/frs/download.php/1641/freeride-0.8.0.tar.gz
extract it and take the freebase directory from there.

I have cc'ed Rich Kilmer as I know he was thinking of packaging
Freebase separately but I could not find it.

Laurent
 
B

Bill Kelly

From: "James Edward Gray II said:
My desire was to find
a way around using a PUBLIC method in the outer class. It's really a
message that only the inner class should be able to send.

How about,

outer.send:)private_method_in_outer, foo, bar)

or

outer.instance_eval { private_method_in_outer(foo, bar) }

?

Technically anybody can call private methods that way, but
they have to go out of their way to do so.


Regards,

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,161
Messages
2,570,892
Members
47,430
Latest member
7dog123

Latest Threads

Top