Re: [MacRuby-devel] [MacRuby] #141: Building MacRuby 0.3 - Rake fails during openssl compilation

2008-12-22 Thread MacRuby
#141: Building MacRuby 0.3 - Rake fails during openssl compilation
+---
 Reporter:  nucleus_...@…   |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  blocker |   Milestone:   
Component:  MacRuby |Keywords:   
+---

Comment(by nucleus_...@…):

 Oh I am sorry, I don't read mac-dev. So thanks Jordan for that tip. Is
 there a default MacRuby shipping with a vanilla Mac OS X?
 Otherwise I won't have a MacRuby.framework yet. This is my first try of
 building MacRuby...

 And I am using ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-
 darwin9.0]

 {{{

 which ruby
 /usr/bin/ruby

 }}}

 But that thread about Ruby 1.9.1 Preview has had me on the lookout for
 other readline.h files and I seem to have another readline installation in
 /usr/local/include even though I am not quite sure how it got there.

 Anyway, searching for the function "filename_completion_function" yields

 {{{
 extern char *rl_filename_completion_function PARAMS((const char *, int));
 }}}

 in the custom readline.h and not


 {{{
 char*filename_completion_function(const char *, int);
 }}}

 which it was expecting judging by looking at the default readline that
 ships with Mac OS X...

 So is there a way to tell the build program not to use the readline from

 {{{
 /usr/local/include/readline/*.*
 }}}

 but the one from

 {{{
 /usr/include/readline/readline.h -> ../editline/readline.h
 }}}

 by using a command line switch?
 Of course I could always just delete the custom readline and try to build
 again but I wouldn't know what else I might break by doing that.

 André

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Exposing c structs and functions

2008-12-22 Thread Jim Getzen

Laurent,

OK, it has taken me awhile to get back to this issue again, but yes,  
you were exactly right, I needed to look at the newer BridgeSupport  
format in /System/Library/Frameworks...


It works great now. Thanks for the help!

Jim



Hi Jim,

You're probably looking at an old BridgeSupport file. function_retval
and function_arg do not exist anymore since a very long time, and were
replaced by retval and arg.

You should be able to get the latest Foundation bridgesupport file
from here:

 /System/Library/Frameworks/Foundation.framework/Resources/
BridgeSupport/Foundation.bridgesupport

Back to your new problem, I think your struct element is also wrong
(uses the old definition). I would look at the Foundation file and try
to mimic it. Also, you can generate the file by using
gen_bridge_metadata (from the command line) if your code is a
framework or a shared library. Finally, if you opt by writing the file
by yourself, it is always good to run an XML validation pass (the DTD
location is part of your XML declaration).

Laurent


___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #141: Building MacRuby 0.3 - Rake fails during openssl compilation

2008-12-22 Thread Sandor Szücs


On 22.12.2008, at 12:25, MacRuby wrote:

So is there a way to tell the build program not to use the readline  
from


{{{
/usr/local/include/readline/*.*
}}}

but the one from

{{{
/usr/include/readline/readline.h -> ../editline/readline.h
}}}

by using a command line switch?


-I/srcdir

$ man make
or
$ make --help

will help you in the future.

regards, Sandor Szücs
--



___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #185: Redefining singleton methods on multiple objects at the same place

2008-12-22 Thread MacRuby
#185: Redefining singleton methods on multiple objects at the same place
+---
 Reporter:  vincent.isamb...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  major   |   Milestone:   
Component:  MacRuby |Keywords:   
+---
 The following code causes a warning. The problem is when 2 different
 objects have a method defined on their singleton class at the same place.
 {{{
 def func(obj)
   def obj.a
 p self.description
 p self.class.ancestors
 super
   end
 end

 class A
   def a
   end
 end

 o1 = A.new
 o2 = A.new
 func(o1)
 func(o2)
 puts 'o1'
 o1.a
 puts 'o2'
 o2.a
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #186: Difference between NSObject and Object?

2008-12-22 Thread MacRuby
#186: Difference between NSObject and Object?
+---
 Reporter:  vincent.isamb...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  critical|   Milestone:   
Component:  MacRuby |Keywords:   
+---
 In MacRuby, NSObject and Object are supposed to be the same. However, the
 following code does not work with NSObject (but does with Object):
 {{{
 class NSObject # works if NSObject is changed to Object
   def self.func
   end
 end

 Class.func
 }}}

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] [MacRuby] #186: Difference between NSObject and Object?

2008-12-22 Thread MacRuby
#186: Difference between NSObject and Object?
+---
 Reporter:  vincent.isamb...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  critical|   Milestone:   
Component:  MacRuby |Keywords:   
+---

Comment(by vincent.isamb...@…):

 Note that if you do "NSObject = Object" or "framework 'Cocoa'" before
 running the code above, everything works fine.

-- 
Ticket URL: 
MacRuby 

___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel