[MacRuby-devel] Implement PXSourceList in MacRuby

Daniel Westendorf daniel at prowestech.com
Mon Jul 18 16:04:46 PDT 2011


Thanks for the input. I had sent the message to this group hoping to
get just that type of wisdom. I had given up (trying to use MacRuby
w/PXSourceList) since I hadn't heard any such obvious comments.

I had thought that I had implemented that method (I had hacked around
a number of attempts), I must have neglected to add it to my Github
example. No one to blame but myself for such stupidity. :S Perhaps
I'll get those missing methods added back in and stumble upon my goof.

I never made the accusation that it was a problem with MacRuby, I was
sure it was my implementation. I was simply looking for a nudge in the
right direction to get it figured out, or some advice of someone who
had already figured it out.

Daniel

2011/7/18 Robert Lowe <rob at iblargz.com>:
> 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
>
> _______________________________________________
> 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