Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Project Builder Questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Project Builder Questions



First, your folder hierarchy needs to match your package naming. The lazy
method some tools (such as CodeWarrior) supported doesn't work in PB (and
there are those who would argue PB works "correctly" and the others
shouldn't allow the "lazy" hierarchy. So, if your package is
com.mother.MyApp your need folders com/mother/MyApp instead of "MySources".

Second, try something like this for accessing the bundled resources (from
Gerard Ziemski posted within the last few days):

private Image initImage(String imageName)
{
URL imageURL = getClass().getResource(imageName);

return new javax.swing.ImageIcon(imageURL).getImage();
}

Sorry for not detailing it more but it's being asked every few days... There
are several alternatives to the above.

And if you want to see what PB is doing, use Terminal.app to cd into the
.app package then go to Contents/Resources/Java. Run "jar -tf" on your jar
file and you can see how PB packaged it up.

Ron
_______________________
Ronald Guest
Pepsan & Associates, Inc. Creating Pathways to Excellence
email@hidden
http://www.pepsan.com
_______________________

He Rises by Lifting Others - Robert G. Ingersoll


References: 
 >Project Builder Questions (From: Bob Barnes <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.