Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / November 2006



Tip: Looking for answers? Try searching our database.

Porting rfom CW8.3 to Xcode problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fonarix - 22 Nov 2006 09:32 GMT
Hi, There!

I've ported some sources of project to XCode, but when I trying to
launch in debbuger GetCursor returns NULL, I've learned that it
deprecated now...
I think this is a problem with resources - still using *.r files.
Is that code have to be refactored?
Can I use *.r files or I have to compile it to *.rsrc file or in
Interface Builder import it and get *.nib file.
Also I found that in App bundle there is no any *.r or *.rsrc files.

Thanks!!!
David Phillip Oster - 23 Nov 2006 06:49 GMT
> I've ported some sources of project to XCode, but when I trying to
> launch in debbuger GetCursor returns NULL, I've learned that it
[quoted text clipped - 4 lines]
> Interface Builder import it and get *.nib file.
> Also I found that in App bundle there is no any *.r or *.rsrc files.

No .rsrc in your bundle, well, that is your problem.

You can certainly add .r files to an Xcode project, and the default
build rule compiles them to .rsrc files in your bundle. you'll need to
get the path to the file within your bundle using Core Foundation, then
open your .rsrc files with FSOpenResFile, but then the old Resource
Manger calls will still work.
Fonarix - 23 Nov 2006 08:31 GMT
"""

> No .rsrc in your bundle, well, that is your problem.
>
[quoted text clipped - 3 lines]
> open your .rsrc files with FSOpenResFile, but then the old Resource
> Manger calls will still work.

I understood...
But when a add *.r file to poject, XCode doesn't add rsrc file to new
*.app.
In another project i found in "Project Info" Collection Rez.
But in current I have not it! I think collection "Rez" have to be added
automatic when *.r file added! But this doesn't happen.

Beforehand thanks!!!
Fonarix - 23 Nov 2006 08:46 GMT
I remebbered that I compiled *.r file with Rez manually, I added rsrc
file and problem with GetCursor desappear!!!

 Thanks!
Fonarix - 23 Nov 2006 16:38 GMT
I still in search...

When a add *.r file to poject, XCode doesn't add rsrc file to new
*.app.
In another project i found in "Project Info" Collection Rez.
But in current I have not it! I think collection "Rez" have to be added

automatic when *.r file added! But this doesn't happen.

I've written that I compiled it manually, but I have some targets, and
this resources have to be recompile for every current target!

Beforehand thanks!!!
Chris Hanson - 24 Nov 2006 07:04 GMT
> I still in search...
>
[quoted text clipped - 7 lines]
> I've written that I compiled it manually, but I have some targets, and
> this resources have to be recompile for every current target!

You'll need to add a "Build Resource Manager Resources" build phase to
the target that uses these Rez (*.r) files in your project.  Then add
your Rez files to this build phase by dragging them under it, and your
Rez files will be built as part of building your application.

At this point you will also have a Rez collection in your target and
project's build settings pane; collections that don't apply to a target
aren't shown in the target's build settings, and collections that don't
apply to any targets in your project aren't shown in the project's
build settings.

 -- Chris
Fonarix - 24 Nov 2006 17:44 GMT
"""

> > I still in search...
> >
[quoted text clipped - 20 lines]
>
>   -- Chris

I've done it!!!

Many thanks!!!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.