[MacRuby-devel] Frameworks Help

Shaun August shaun at eoslightmedia.com
Wed Oct 20 13:48:18 PDT 2010


Thanks Nick,

I appreciate the tutorial.

On Wed, Oct 20, 2010 at 1:44 PM, Nick Ludlam <nick at recoil.org> wrote:

> Thanks Shaun,
> I'm in the process of revising the tutorial from a couple of other people's
> feedback, so I'll take a look at this too.
>
> Nick
>
>
> On 20 Oct 2010, at 21:04, Shaun August wrote:
>
> Thanks Mario,
>
> I am digging into the tutorial right now and I realize a pretty important
> piece of information is missing. After adding the bundle target I need to
> create a "Copy Headers" folder in the TagLibBundle but the instructions
> don't say what to do:
>
> Adding our Bundle target
>
> The first thing we need to do is add a new Target to our project. Select
> “New Target…” from the Project menu, and select a Mac OS X Cocoa Loadable
> Bundle. Call this TagLibBundle. Find the new target icon, and select the
> project. Now from the Project menu, add a new
>
> Now we need to copy over the details of which files are used. Open up the
> “Copy Headers” folder inside the TagLib target. Shift-select every file in
> this folder, and drag it into the equivalent, empty folder in our new
> TagLibBundle Target. Repeat this step with the “Compile Sources” folder.
>
> Now from the project menu, add a new... From what I can see it is add a new
> copy headers build phase.
>
> I haven't dug in to making changes to the MacRuby site but perhaps someone
> who can would find the time to update the tutorial?
>
> Thanks,
>
> Shaun
>
>
> On Tue, Oct 19, 2010 at 10:12 PM, Mario Steele <mario at ruby-im.net> wrote:
>
>> Hello Shaun,
>>
>> On Wed, Oct 20, 2010 at 12:00 AM, Shaun August <shaun at eoslightmedia.com>wrote:
>>
>>> Hi Robert,
>>>
>>> Thanks! That make sense. All those cocoa classes have capitals and they
>>> work fine. I seem to be able to call from the framework but I am running
>>> into an undefined method 'extern'. I have also read somewhere that extern
>>> doesn't work with MacRuby. Is that correct? The framework I am dealing with
>>> is calling C functions and I am having trouble accessing them.
>>>
>>
>> extern is a macro for the ld library, to export an API Address in the
>> Dynamic library, that can be access dynamically at run time.  With
>> Objective-C, or more so specifically with MacRuby, you need to write a sort
>> of thin wrapper around C Functions in Objective C, in order to access said
>> Functions.  So if the framework that you are working with, doesn't expose
>> Objective C API Functions, you'll need to write a thin wrapper in order to
>> access them.  See the tutorial done by Nick Ludlam about wrapping the TagLib
>> C Library, in Objective C.  You can find it here:
>> http://www.macruby.org/documentation/reading-an-mp3-with-macruby.html  It's
>> best to read through the entire article, as it gives you information about
>> wrapping C Functions in Objective C, which is quite useful, when writing
>> your own wrapper.
>>
>> hth,
>>
>> Mario
>>
>>
>>> Thanks,
>>>
>>> Shaun
>>>
>>>
>>> On 2010-10-19, at 8:26 PM, Robert Rice wrote:
>>>
>>> > Hi Shaun:
>>> >
>>> > Lower case method names is only a convention. MacRuby will work fine
>>> using upper case, i.e., constant, method names.
>>> > I know because I only recently changed my project to conform to the
>>> convention.
>>> >
>>> > Bob Rice
>>> >
>>> >
>>> > On Oct 19, 2010, at 7:17 PM, Shaun August wrote:
>>> >
>>> >> Hi There,
>>> >>
>>> >> I am attempting to work with a framework provided by a USB device
>>> manufacturer and all of their method names start with capitols and I am
>>> wondering about the easiest way to access these methods through macruby. I
>>> remember reading somewhere about fixing the constants in Obj-C but I cannot
>>> locate the information.
>>> >>
>>> >> Does anyone have any suggestions as to how to remedy this? Should I
>>> rename every command in the framework?
>>> >>
>>> >> Thanks,
>>> >>
>>> >> Shaun
>>> >>
>>> >> _______________________________________________
>>> >> 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
>>>
>>
>>
>>
>> --
>> Mario Steele
>> Lieutenant Commander 3
>> XO - Geo 99
>> XO - STO IFT Fleet
>> http://www.trekfederation.com
>> http://geo99.ruby-im.net
>>
>>
>> _______________________________________________
>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20101020/c6c5ac8a/attachment.html>


More information about the MacRuby-devel mailing list