Re: [MacRuby-devel] how to access OpenDirectory C constants from MacRuby?

2010-04-07 Thread russell muetzelfeldt
On 07/04/2010, at 4:48 PM, russell muetzelfeldt wrote:

> Is there some way of getting access to these constants, or do I need to find 
> and use their literal values instead?

On further investigation it looks like just defining the constants in ruby 
myself will do. Some of them exist in CFOpenDirectoryConstants.h as enum items 
which I can easily enough pull across, but others are defined like this -

/*!
@const  kODRecordTypeUsers
@abstract   Identifies user records.
@discussion Identifies user records.
*/
CF_EXPORT
const ODRecordType kODRecordTypeUsers;


which I assume is a CF_EXPORT macro doing some preprocessor magic to fill in a 
value for kODRecordTypeUsers... does anyone know how to work out the actual 
value of this constant (and others defined in the same way)?


cheers

Russell

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


[MacRuby-devel] Size of the apps

2010-04-07 Thread Daniel Lopes
Hello, this is my first post here and I am new in the Apple Dev/MacRuby. I
don't know if this the right mailing list, I don't found any other in the
MacRuby site related to questions about development. So, if this mail isn't
appropriate here please let me know. Some days ago, in a sample app, I tried
to embed the MacRuby Framework to distribute the app as a standalone package
but the size of the app became huge. There is some effort to make the
embedded framework smaller or any tip/tricks that I should do to get small
apps? Or all my apps will have 34mb? (It's not a big problem, just to know).

Thanks.

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Daniel Lopes  -  Area Criações
Design, Websites e Sistemas Web

http://www.areacriacoes.com.br/
http://www.cifrascash.com/
http://pomodo.areacriacoes.com.br/
http://egenial.com.br/cursorails

twitter: @danielvlopes
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
55 (31) 3077-4560  /  55 (31) 8808-8748  /  55 (31) 8737-7501
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


[MacRuby-devel] [MacRuby] #650: Issues with passing procs/methods to #map

2010-04-07 Thread MacRuby
#650: Issues with passing procs/methods to #map
+---
 Reporter:  pthom...@…  |   Owner:  lsansone...@…
 Type:  defect  |  Status:  new  
 Priority:  major   |   Milestone:   
Component:  MacRuby |Keywords:   
+---
 {{{
 %w{rubygems hotcocoa}.each { |i| require i }
 }}}

 This works fine on MacRuby. However,
 {{{
 %w{rubygems hotcocoa}.each(&method(:require))
 }}}
 does not work on MacRuby (it says that HotCocoa cannot be loaded), though
 this pattern works on 1.9.

-- 
Ticket URL: 
MacRuby 

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


[MacRuby-devel] are framework extern variables visible in Mac Ruby? (was: Re: how to access OpenDirectory C constants from MacRuby?)

2010-04-07 Thread russell muetzelfeldt
On 07/04/2010, at 5:56 PM, russell muetzelfeldt wrote:
> /*!
>@const  kODRecordTypeUsers
>@abstract   Identifies user records.
>@discussion Identifies user records.
> */
> CF_EXPORT
> const ODRecordType kODRecordTypeUsers;
> 
> 
> which I assume is a CF_EXPORT macro doing some preprocessor magic to fill in 
> a value for kODRecordTypeUsers... does anyone know how to work out the actual 
> value of this constant (and others defined in the same way)?

turns out these items aren't actually constants but are rather static variables 
defined in the framework dylib objects - for example, kODAttributeTypeUniqueID 
is actually an NSString pointer referencing a static 
@"dsAttrTypeStandard:UniqueID" in 
CFOpenDirectory.framework/Versions/A/CFOpenDirectory

is there any way in MacRuby to access these variables defined in a loaded 
framework?


cheers

Russell

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