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/MacR... 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
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/MacR...
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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
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@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/MacR...
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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
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@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/MacR...
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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
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@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@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/MacR...
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@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
_______________________________________________ MacRuby-devel mailing list MacRuby-devel@lists.macosforge.org http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
Hi Robert, Thank you for bring up this. Would you give your insight on a similar issue? I have uploaded a demo project: https://github.com/siuying/MacRubyPXListView The core is RBListDelegate (https://github.com/siuying/MacRubyPXListView/blob/3ba0f925c2ef535a95fd5858f7...) which implements PXListViewDelegate (https://github.com/Perspx/PXListView/blob/master/Classes/PXListViewDelegate....) It just implement three require method and the expected output is as follow screen: http://dl.dropbox.com/u/164404/list_1.png But instead it would just crash: http://dl.dropbox.com/u/164404/list_2.png Extends this class from ListViewDelegate (https://github.com/siuying/MacRubyPXListView/blob/e394276c0499db54994239b861...) make it work without crash (https://github.com/siuying/MacRubyPXListView/blob/e394276c0499db54994239b861...) , but ListViewDelegate is just implementing those three methods! Thanks Francis Chong Ignition Soft http://ignition.hk/ 在 2011年7月19日 上午6:08 時, Robert Lowe 寫到:
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
I see the issue your having, I'm not sure why the objective-c delegate class and the macruby delegate class act differently. It appears to work when subclasses which is interesting. It's either a macruby bug or something in the headers. Regards, - Rob
participants (3)
-
Chong Francis
-
Daniel Westendorf
-
Robert Lowe