Problem with Objective-C extension

Please report bugs.

Problem with Objective-C extension

Postby udo.killermann » Mon Jul 02, 2012 6:39 pm

Bernd,

I have created a project and included an Objective-C class. When I compile the project the compiler can't find my Objective-C class. When I insert an #import statement in Global.h (within XCode) the build completes successful. I don't understand this behavior. Please look at the attached project.

Kind regards
Udo
Attachments
responseCurve.zip
(112.54 KiB) Downloaded 322 times
--------------
MacBook (2GHz, 4 GByte) - Lion (10.7.3)
started Objective Basic coding in April 2010 - still enjoy it ;-)
udo.killermann
 
Posts: 247
Joined: Thu Apr 08, 2010 6:46 am
Location: Hannover, Germany

Re: Problem with Objective-C extension

Postby berndnoetscher » Fri Jul 06, 2012 8:33 am

udo.killermann wrote:Bernd,

I have created a project and included an Objective-C class. When I compile the project the compiler can't find my Objective-C class. When I insert an #import statement in Global.h (within XCode) the build completes successful. I don't understand this behavior. Please look at the attached project.

Kind regards
Udo


Hi Udo,

sorry for the delay, I will do it the next week, promissed. Nice weekend. :)
berndnoetscher
Site Admin
 
Posts: 280
Joined: Fri Feb 20, 2009 11:58 am

Re: Problem with Objective-C extension

Postby berndnoetscher » Mon Jul 09, 2012 9:09 am

Two probelms:

Your project does not have the class definition (file) for ukHelper and somehow there seems to be a problem with xcode integration, because if I change your class name to aukHelper it works, because it has a different alphabetical start point in the xcode file (it interferes with objbruntime I believe). You know the xcode xml file format is not easy to read/write to.

Will fix this soon.
Thanks for your example.
berndnoetscher
Site Admin
 
Posts: 280
Joined: Fri Feb 20, 2009 11:58 am

Re: Problem with Objective-C extension

Postby udo.killermann » Tue Jul 10, 2012 3:12 pm

Bernd,

I'll have a look and see if your work around works for me as well.

Thx
Udo
--------------
MacBook (2GHz, 4 GByte) - Lion (10.7.3)
started Objective Basic coding in April 2010 - still enjoy it ;-)
udo.killermann
 
Posts: 247
Joined: Thu Apr 08, 2010 6:46 am
Location: Hannover, Germany

Re: Problem with Objective-C extension

Postby berndnoetscher » Wed Jul 18, 2012 9:58 am

udo.killermann wrote:Bernd,

I have created a project and included an Objective-C class. When I compile the project the compiler can't find my Objective-C class. When I insert an #import statement in Global.h (within XCode) the build completes successful. I don't understand this behavior. Please look at the attached project.

Kind regards
Udo


Udo,

after I digged into it again, I know the issue. All works fine (if you add a objc class) all files are created and the xcode project is managed correclty, but objb cannot know when to use a import statement for a custom class (and it cannot know if it is a known Cocoa class or custom class). Therefore the developer has to decide. I will add a new command for the Declare Class statement which enabled explicitly import.
berndnoetscher
Site Admin
 
Posts: 280
Joined: Fri Feb 20, 2009 11:58 am

Re: Problem with Objective-C extension

Postby berndnoetscher » Wed Jul 18, 2012 11:40 am

Code: Select all
Declare Class "ukHelper" "explicitly do import"


This is the new trick to tell the compiler to create an import. Actually, it must not be "explicitly do import". It can any non-empty string. The class name is used: for the #import "classname".

Code: Select all
Declare Class "ukHelper" "blahblah"
berndnoetscher
Site Admin
 
Posts: 280
Joined: Fri Feb 20, 2009 11:58 am


Return to Bug Reports

Who is online

Users browsing this forum: No registered users and 0 guests