[MacRuby-devel] Implement PXSourceList in MacRuby

Robert Lowe rob at iblargz.com
Mon Jul 18 15:08:43 PDT 2011


So long and thanks for all the fish.

Your implementation is wrong, it has nothing to do with macruby.

You skipped a bunch of code which is required to make it function.

For instance all SourceListItems must have children.

When you port  Objective-C code ensure you aren't skipping code or using rubyism (they may do difference things), port the code first then tweak it.

Regards,
 - Rob


On 2011-07-18, at 5:15 PM, Daniel Westendorf wrote:

> Thanks for looking into this. I've given up and decided to just
> implement this in Objective-C instead of trying to muddle with
> MacRuby.
> 
> Daniel
> 
> 2011/7/12 Chong Francis <francis at ignition.hk>:
>> I encountered same issue, the methods:
>> - (NSInteger)sourceList:(PXSourceList*)aSourceList
>> badgeValueForItem:(id)item
>> 
>> - (NSUInteger)sourceList:(PXSourceList*)sourceList
>> numberOfChildrenOfItem:(id)item
>> 
>> is where the BAD_ACCESS happens.
>> If i implement those methods in Obj-C, subclass it in ruby and implement
>> other methods, it do not crash. No idea how the method return integer cause
>> this...
>> Regards
>> Francis Chong
>> Ignition Soft
>> http://ignition.hk/
>> 
>> 在 2011年7月3日 上午4:50 時, Daniel Westendorf 寫到:
>> 
>> Hi guys,
>> 
>> I'm trying to implement a PXSourclist (http://perspx.com/work/) in
>> MacRuby instead of re-inventing the wheel. The PXSourcelist demo
>> builds fine, but when I try to port the dataSource methods over to
>> MacRuby, the app tanks without much information. I'm wondering if
>> someone could point out what is probably obviously wrong, or give me
>> some pointers.
>> 
>> I'm trying to implement this in MacRuby:
>> https://github.com/Perspx/PXSourceList/blob/master/Classes/AppDelegate.m
>> 
>> Here is what I have so far:
>> https://github.com/danielwestendorf/MacRubyPXSourceListDemo/blob/master/MacRubyPXSourceListDemo/AppDelegate.rb
>> 
>> I've stripped it down to the bare minimum to try and figure this out,
>> but it errors out with "Program recieved signal: "EXC_BAD_ACCESS", and
>> I'm not sure what that means.
>> 
>> Can anyone provide any pointers as to what I'm doing wrong here?
>> 
>> Thanks,
>> 
>> Daniel
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> 
>> 
>> _______________________________________________
>> MacRuby-devel mailing list
>> MacRuby-devel at lists.macosforge.org
>> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>> 
>> 
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel



More information about the MacRuby-devel mailing list