Re: [MacRuby-devel] [MacRuby] #181: hotcocoa command with Macruby 0.3, patches attached

2009-01-04 Thread MacRuby
#181: hotcocoa command with Macruby 0.3, patches attached
+---
 Reporter:  sandor.szu...@… |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  critical|   Milestone:  MacRuby 0.3  
Component:  MacRuby |Keywords:   
+---

Comment(by sandor.szu...@…):

 The same issue appeares in MacRuby-Trunk (0.4).
 template.patch will fix it.

 I can not change the ticket's milestone to 0.4. Should I open a new ticket
 for this or do you will fix it like that?

-- 
Ticket URL: 
MacRuby 

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


Re: [MacRuby-devel] [MacRuby] #195: NSThread causes exception/crash?

2009-01-04 Thread MacRuby
#195: NSThread causes exception/crash?
+---
 Reporter:  rebo...@…   |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  blocker |   Milestone:   
Component:  MacRuby |Keywords:  NSThread 
+---

Comment(by eloy.de.en...@…):

 Could you please also provide the result/output?

-- 
Ticket URL: 
MacRuby 

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


[MacRuby-devel] how to use self-created frameworks?

2009-01-04 Thread peter royal

howdy!

i'm doing some network i/o with macruby, and wanted to use the CF  
API's so they play nicely with a run loop on a worker thread.


to that end, i found http://code.google.com/p/cocoaasyncsocket/ which  
is a nice delegate-based cocoa wrapper on said API's


however, i'm having trouble making use of them in macruby.

my initial naive attempt was to just throw the .h and .m files into my  
project. with this, i got an 'AsyncSocket' class in ruby, but the  
selectors defined in the header weren't available (and as such, it was  
unusable)


i then tried creating a private framework, following the instructions  
at:


http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Tasks/CreatingFrameworks.html#/ 
/apple_ref/doc/uid/20002258-106880-BAJJBIEF


this works, and i can now say: framework 'AsyncSocket' and it works  
fine. however, i run into the same problem, none of the selectors  
defined in the header are available.


i looked through the macruby source, and saw that when the 'framework'  
directive is encountered, in addition to adding the class, it looks  
for the BridgeSupport file. i had thought it was optional, but perhaps  
not?


so i tried generating a .bridgesupport file using:

gen_bridge_metadata -f AsyncSocket.framework -c -fobjc-gc-only (was  
dumping to stdout just for testing)


but then that process never finished. a control-c reveals:

C/usr/bin/gen_bridge_metadata:338:in ``': Interrupt
from /usr/bin/gen_bridge_metadata:338:in `do_cpp'
from /usr/bin/gen_bridge_metadata:45:in `path'
from /usr/bin/gen_bridge_metadata:1692:in `scan_headers'
from /usr/bin/gen_bridge_metadata:1690:in `map'
from /usr/bin/gen_bridge_metadata:1690:in `scan_headers'
from /usr/bin/gen_bridge_metadata:520:in `collect'
from /usr/bin/gen_bridge_metadata:1957
	from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ 
ruby/1.8/optparse.rb:785:in `initialize'

from /usr/bin/gen_bridge_metadata:1891:in `new'
from /usr/bin/gen_bridge_metadata:1891


and looking at that line in the source, its waiting on a cpp  
compilation, but that's failing with:


cc1: error: AsyncSocket.framework/Headers/AsyncSocket.h: not a directory

... which is valid, since its a header file, not a directory.

the command its trying to run is:

/usr/bin/cpp-4.0 -D__APPLE_CPP__ -include /usr/include/ 
AvailabilityMacros.h -F""   "AsyncSocket.framework/Headers/ 
AsyncSocket.h" 2>/tmp/.cpp.err


... before i keep barking up the BridgeSupport tree.. is that the  
right path? or is there a simpler way to use an Objective-C class  
that's not from an Apple-supplied framework easily?


thanks!!

-pete


--
(peter.royal|osi)@pobox.com - http://fotap.org/~osi



smime.p7s
Description: S/MIME cryptographic signature
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel