Re: [MacRuby-devel] A MacRuby-users group?

2009-05-24 Thread Paul Howson

On 23/05/2009, at 3:35 AM, Laurent Sansonetti wrote:

Any though? If most people agree to create a -users group I can ask  
for an official (macosforge.org) one.


If another list is created, could you please consider something a  
little more flexible than this kind of (old fashioned) mailing list?  
Something with an RSS feed would make it easier to integrate with  
other feed subscriptions. And maybe something with a better designed/ 
more modern web interface?


Paul Howson

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


Re: [MacRuby-devel] A MacRuby-users group?

2009-05-24 Thread Matt Aimonetti
Paul, I don't think there will be any other lists and we end up creating a
new one, that would be a macosforge which would have the same features as
the one currently used.

- Matt

On Sun, May 24, 2009 at 12:44 AM, Paul Howson wrote:

> On 23/05/2009, at 3:35 AM, Laurent Sansonetti wrote:
>
>  Any though? If most people agree to create a -users group I can ask for an
>> official (macosforge.org) one.
>>
>
> If another list is created, could you please consider something a little
> more flexible than this kind of (old fashioned) mailing list? Something with
> an RSS feed would make it easier to integrate with other feed subscriptions.
> And maybe something with a better designed/more modern web interface?
>
> Paul Howson
>
>
> ___
> MacRuby-devel mailing list
> [email protected]
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
___
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel


Re: [MacRuby-devel] Crash with NSUInteger in delegate method

2009-05-24 Thread Łukasz Adamczak
> MacRuby can deal with specialized delegate methods like this one, but you
> need to generate a bridgesupport file for the framework you're targeting.
> Most frameworks that ship with Mac OS X are already covered, but in your
> case you might want to manually cover ObjectiveFlickr too.

Wow. This is way better than I expected.

I didn't know bridgesupport was so well integrated with OS X.
After a few hours of hacking, ObjectiveFlickr now has BridgeSupport
and is MacRuby compliant :)
http://github.com/lukhnos/objectiveflickr

However, gen_bridge_metadata didn't work out-of-the box. I had to hack
it a little to get a good dump. Some of the headers were parsed
incorrectly. I guess I'll try to contact someone @
http://bridgesupport.macosforge.org about that.

Thanks again for the help!


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


Re: [MacRuby-devel] A MacRuby-users group?

2009-05-24 Thread Łukasz Adamczak
> Just to let everyone know, there is absolutely no problem posting anything
> related to MacRuby on this list. It's also true that there are more users
> discussions than core discussions here, but this might change once we get
> more people involved in the project. I think that the list traffic is still
> very light so I wonder if we need 2 separate lists.

Laurent, thanks for clearing that up.
For me personally this list has proven very helpful and I know I'm
getting quality answers here.
I was a little afraid it was a wrong place for my lowly problems, but
I'm not anymore.

I agree the idea of a separate list can be postponed until a later time.


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


[MacRuby-devel] Using AXObserverCreate with macruby

2009-05-24 Thread Benjamin Mollenhauer

Hello,

how can I use a ruby function as an parameter to AXObserverCreate?
extern AXError AXObserverCreate ( pid_t application,  
AXObserverCallback callback, AXObserverRef *outObserver);


It requires an AXObserverCallback, defined as

typedef void ( *AXObserverCallback)(
AXObserverRef observer,
AXUIElementRef element,
CFStringRef notification,
void *refcon);


http://developer.apple.com/documentation/Accessibility/Reference/AccessibilityLowlevel/AXUIElement%5Fh/CompositePage.html#/ 
/apple%5Fref/c/tdef/AXObserverCallback


I wrote a Obj.-C class (http://pastie.org/488213)  to to access those  
functions, but how could I use ruby code as a callback?


Any ideas?

Ben


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


Re: [MacRuby-devel] Crash with NSUInteger in delegate method

2009-05-24 Thread Laurent Sansonetti

Hi Łukasz,

On May 24, 2009, at 3:39 AM, Łukasz Adamczak wrote:

MacRuby can deal with specialized delegate methods like this one,  
but you
need to generate a bridgesupport file for the framework you're  
targeting.
Most frameworks that ship with Mac OS X are already covered, but in  
your

case you might want to manually cover ObjectiveFlickr too.


Wow. This is way better than I expected.

I didn't know bridgesupport was so well integrated with OS X.
After a few hours of hacking, ObjectiveFlickr now has BridgeSupport
and is MacRuby compliant :)
http://github.com/lukhnos/objectiveflickr

However, gen_bridge_metadata didn't work out-of-the box. I had to hack
it a little to get a good dump. Some of the headers were parsed
incorrectly. I guess I'll try to contact someone @
http://bridgesupport.macosforge.org about that.

Thanks again for the help!


Excellent!

Regarding the BridgeSupport hack, I'm in fact the author & maintainer  
of this project too. So feel free to send me your patch and I will  
integrate it in the next possible Mac OS X version.


To be honest I do not like the way gen_bridge_metadata is implemented  
and I plan to re-write it using clang in the future.


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


Re: [MacRuby-devel] Using AXObserverCreate with macruby

2009-05-24 Thread Laurent Sansonetti

Hi Benjamin,

On May 24, 2009, at 10:05 AM, Benjamin Mollenhauer wrote:


Hello,

how can I use a ruby function as an parameter to AXObserverCreate?
extern AXError AXObserverCreate ( pid_t application,  
AXObserverCallback callback, AXObserverRef *outObserver);


It requires an AXObserverCallback, defined as

typedef void ( *AXObserverCallback)(
   AXObserverRef observer,
   AXUIElementRef element,
   CFStringRef notification,
   void *refcon);


http://developer.apple.com/documentation/Accessibility/Reference/AccessibilityLowlevel/AXUIElement%5Fh/CompositePage.html#/ 
/apple%5Fref/c/tdef/AXObserverCallback


I wrote a Obj.-C class (http://pastie.org/488213)  to to access  
those functions, but how could I use ruby code as a callback?


C function pointers are (as of trunk) not supported yet. But they will  
be supported in 0.5 in the same way RubyCocoa does (accepting Proc  
objects). In the meantime it's surely safer to use an intermediate  
Objective-C class.


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


Re: [MacRuby-devel] A MacRuby-users group?

2009-05-24 Thread Charles Oliver Nutter

Laurent Sansonetti wrote:

Hi Łukasz,

This mailing-list was usually created for all people developing with 
MacRuby, not necessarily people developing MacRuby itself. But I can 
understand that the group name is ambiguous.


Just to let everyone know, there is absolutely no problem posting 
anything related to MacRuby on this list. It's also true that there are 
more users discussions than core discussions here, but this might change 
once we get more people involved in the project. I think that the list 
traffic is still very light so I wonder if we need 2 separate lists.


Any though? If most people agree to create a -users group I can ask for 
an official (macosforge.org) one.


Bleh...most projects I'm on have separate dev and user lists, and I hate 
it (including JRuby). Half the time people aren't sure which list to 
post to, and none of those projects (nor MacRuby) have enough traffic to 
really need separate lists.


I'd say keep it all on one list for as long as possible.

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


Re: [MacRuby-devel] [MacRuby] #257: Conversion to JSON works , But JSON parsing fails in MacRuby 0.4

2009-05-24 Thread MacRuby
#257: Conversion to JSON works , But JSON parsing fails in MacRuby 0.4
---+
 Reporter:  nex...@…   |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  blocker|   Milestone:   
Component:  MacRuby|Keywords:  json 
---+

Comment(by d...@…):

 The attached patch (json.diff) fixes json parsing for me.  The portions
 wrapped in if objc could be extracted into a method but I wasn't sure how
 close we were trying to keep the code to the original ruby?

 {{{
 titania:trunk dj2$ macirb
 >> a = {:foo => 1, :bar => 2}
 => {:foo=>1, :bar=>2}
 >> require 'json'
 => true
 >> JSON.parse(a.to_json)
 => {"foo"=>1, "bar"=>2}
 >> quit
 }}}

-- 
Ticket URL: 
MacRuby 

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


Re: [MacRuby-devel] [MacRuby] #148: Trying to load the JSON library crashes

2009-05-24 Thread MacRuby
#148: Trying to load the JSON library crashes
---+
 Reporter:  wootest+macr...@…  |   Owner:  lsansone...@…
 Type:  defect |  Status:  new  
 Priority:  major  |   Milestone:   
Component:  MacRuby|Keywords:   
---+

Comment(by d...@…):

 require 'json' appears to work with the current SVN head.

-- 
Ticket URL: 
MacRuby 

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


[MacRuby-devel] [MacRuby] #262: require 'json/pure' crashes macruby due to missing encoding function

2009-05-24 Thread MacRuby
#262: require 'json/pure' crashes macruby due to missing encoding function
-+--
 Reporter:  d...@…|   Owner:  lsansone...@…
 Type:  defect   |  Status:  new  
 Priority:  major|   Milestone:   
Component:  MacRuby  |Keywords:   
-+--
 >> require 'json/pure'
 dyld: lazy symbol binding failed: Symbol not found: _rb_enc_find_index
   Referenced from:
 /Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1
 /universal-darwin9.0/iconv.bundle
   Expected in: flat namespace

 dyld: Symbol not found: _rb_enc_find_index
   Referenced from:
 /Library/Frameworks/MacRuby.framework/Versions/0.4/usr/lib/ruby/1.9.1
 /universal-darwin9.0/iconv.bundle
   Expected in: flat namespace

 Trace/BPT trap

-- 
Ticket URL: 
MacRuby 

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