WWDC2001 Session 701
Transcript
Kind: captions Language: en welcome good afternoon what these lights are horrible there's a lot of you here today and I'm hoping that you have a good time listening to listening to this discussion the development tools are the key development tools are what will make Mac os10 successful will make your application successful and will get us all to the place that we want to be so without further ado I want to introduce Dave Payne the manager of the development environment team thanks Kathy all right it's great okay go ahead and get started so what we're going to take a look at today is the power of project builder what you can do with it how to do it so we'll go through a number of things basically walking through all the features of project builder for creating editing and navigating your projects take a look at source code management from within project builder configuring building and debugging your targets for building products and then so a lot of what we're gonna do really is kind of walking through a lot of the features make sure that you know what exists maybe for those of you who've used it it's some review for some of that in this particular session more than most or more than hardly any in this conference we are going to be talking a little bit about future stuff we will discuss what's new in project builder on the developer tool CD that you received when you registered or when you walked in this morning and then as I mentioned we'll talk about the future of project builder to show sort of where we're going with this so let's go ahead and get started on what is project builder so project builder is our integrated development environment for Mac OS 10 from Apple with this we build all of Mac OS 10 Carbon applications such as the finder help viewer Sherlock are built with project builder cocoa applications our favorite project builder itself is built with project builder interface builder male the web objects tools a lot of very heavy use of cocoa within Apple there's a full Java to environments that you can develop with project builder and now on the May 2001 developer tools CD you also have the ability to develop web objects five applications so that's a lot of what we've been doing for that you can develop the UNIX tools so such as daemons server processes I might want to build tools that then you access from graphical applications you can build kernel extensions and device drivers so really the whole spectrum of everything that you can do with Mac OS 10 you can do it from project builder but a lot of times you don't create source from scratch so there's a number of ways that you can get source code into project builder from other places and I'll talk a little bit more about that later on so project builder is really the centerpiece of our development environment strategy at Apple that's your development hub we've been working very heavily with a lot of other teams with an apple to ensure the project builder integrates well with those other applications that others are working on so if we're in for instance we interface with the interface builder which is our user interface construction tool for cocoa and carbon applications you can hear a lot about that in the next session in this hall new again on the May 2001 developer tools CD we integrate with web objects builder an EO modeler and the web objects team we'll be showing that off in a lot of their sessions throughout the course of the week we also interact with the file merge tool for graphical comparison of files and with a lot of the performance tools such as object alec and Malak debug so we have integration with some of these at this points we intend to have further integration with others as we move on in the future plus there's some other things that were teams that were working with that aren't yet depicted on this list so sometimes in the email lists and other places people ask me so can I really use project builder for my big applications and the answer is emphatically yes we use project builder for over 250 projects that feed into Mac OS 10 within Apple they are across the board from applications to frameworks plug-ins for all the you know screen savers and system preference panels all of our device drivers everything else goes through project builder so it's really in very heavy usage and that's great for us we really try to establish tight feedback loops with those teams so that if they have a problem we send people over we work with them to ensure that we can solve those problems and get developers past that and that helps us deliver a better product for all of you as well project builder also really facilitates team development it's pretty rare that you have on a major application just one person working on it so of course as you would expect there's preferences for the application but something kind of innovative every developer on a project has their own user settings for that particular project that's stored within the project files directory it's one of our wrapped directories so each of you has a separate file there which means that with our integration with source code control you can actually check the files and your settings files into CVS you can delete the whole project off the disk then and then six months later if you have to come back and do some maintenance then all of your user settings are still there so there's editor settings build settings and debugger settings are all stored on a per user basis and we'll take a look at some of those as we go through here so before I get too into the meat of the product itself I'd like to talk a little bit about the evolution of project builder how where are we and how did we get here so we kicked this project off two years ago in February of 1999 the first code was written the first lines of code there were two engineers on the product at that point it's been my pleasure to build the team over the past couple of years transitioning people from our older project builder wo older IDE on to this and hiring new people internally Steve near off mentioned this morning on our tools overview that we're continuing to heavily invest in tools now we've actually had five new engineers join the team since February of this year there's other new employees out in the audience hi welcome so I'm really looking forward to you know the power of this team what we can do moving forward in February of 2000 we started rolling it out with an apple we had been using it before that but now we start asking other people to use it the March 2000 version that you gots on the 2001 you got on the developer tools CD and the original Mac O's 10 is our version 1.0 it's a fully usable product you can use it for all your development but again we've got our first update here in May 2001 the primary addition there is the addition of the web objects 5 supports but there's a number of other general-purpose fixes as well and we are going to be doing new improvements new releases on a regular basis for the product so you should see things coming out well for us ok so now let's go ahead and start taking a look into the product itself with creating editing and navigating projects so to help me do that I'd like to bring on stage Mike Farris who now works for me as the manager of the project builder team itself so just I have the project builder team the compiler team debugger and performance tools and a QA and integration team so Mike and I have been working together for a while we're gonna do a walk through the features of project builder so the way we're gonna do this if we can go ahead and have demo on the other screen now for those of you sitting in the far wings of the audience you may want to move in because we are gonna do slides on one screen and demo and the other so let's take a look the overall use of interface first so we've got a project window open here on the left side of the window are the project structure panes so this is where we keep information that's stored on disk about the structure of your product so the groups and files outline is the first shown below that we've got bookmarks for navigating through your project then targets to represent your build products and then breakpoints for debugging on the right side of the window we've got editor panes with a navigation bar at the top of each editor pane we'll talk a lot more about that at the top of the window we've got a toolbar that's now a configurable toolbar just as in the finder and in mail and many of you want to may want to take advantage of that in your products as well this is using facilities provided to us by cocoa we'll be providing additional icons to add more facilities to let you customize your toolbar as you'd like over time and if you bring down the tool panes here above the editor panes we've got tools for project wide find for build outputs for the console output and input and output when you're running your products and for the debugger so how do we create a new project in project builder so if we go up to the file menu and bring up the new project menu item and we can see that the new product new project dialog comes up it's got a lot of different project types listed here so applications bundles frameworks kernel extensions and i/o kit drivers tools really everything that you want to do on Mac os10 within each of these we have different subsets of these as well so you can do carbon applications or based Carbon applications you can do cocoa applications or document based cocoa apps effused in the NS document model so sometimes we get the list the questions on the list of Gia this is my first experience with it I want to create a C++ based tool how would I do that well maybe the C++ tool item is a good choice but let's go ahead and create a document based cocoa application and that gives us a new project now a new project that the template for that is just a template and that provides us with template source code files so a few files in this case one class main source file some resources again all templates provides a build target and in general for most of these things there's one target that you would build from it you can add any additional targets that you want later in the case the web objects projects sometimes they have more than one target a client and a server I'm in addition we provide references to the frameworks and libraries that you'll need to find the headers for your frameworks for that project type and link with so in this case we'll be linking with the cocoa framework other frameworks that you'll want to look at would be the foundation and app kit frameworks that make up cocoa so he get direct access but again this is all a template for a new project and you can configure it as you will be on that I mentioned that you can get source code into project builder in other ways so if we go up to the file menu again we've got the import project menu item that gives us the ability to import either code warrior projects if you've saved that out to XML or PB dot project files from our previous version of project builder what we now call project builder wo4 which is now slated for web objects 5 - sorry web objects for dot 5.1 development with the old product the new one handles web objects 5 when you import this Korea the group and files hierarchy and it brings in any targets that you had in your previous environment but you may need to configure those targets a bit to get them to build properly in addition you can drag folders of existing source code in from the finder so if you have open source projects for example that you'd like to work with in project builder you can just drag that code in so taking a closer look at our groups and files outline here we can see that this is just a user definable grouping of files if you have experience with our previous version of project builder this is much more flexible now this is the files here or completely independent of the physical location on the disk it's independent of any particular restrictions of the build system so you can reorient this however you want you can move files around just by dragging you can select groups or files and just delete them if you wish you can select multiple files and put them into a new group through the project group menu item hey you can go back and ungroup it again so you can also add new files to projects and we're add new frameworks so link against new frameworks to add a new file you can either go to the project menu and use add file or add frameworks but you can also drag in from the finder so in this case we'll take an icon file and drag it into our resources group here in our project now when you add a file it asks you do you want to copy this item into the group or into your project hierarchy so if it's somewhere else on your system typically you'd probably want to say yes it also asks you what targets you want to add the file to so in this case we only have one target if we add more you can choose to add it to multiple targets right at that point okay so among the other things that groups and files outline gives you access to is you can navigate down into your frameworks if you'd like to take a look at what headers do I have available to me in this framework so this is one of the mechanisms for getting to frame or two headers there's a number of others as well so from this in this case we're navigating down into the foundation headers so we can see that those come up in the editor whole list of those and also then this is especially interesting besides frameworks we've also got your built products there so we can see down here a products group that project builder has created for us well that's interesting that the food app is shown in red here now that's because food app doesn't yet exist on the disk because we haven't built this project yet if I had a file that was deleted from the disk or doesn't exist that would show in red as well and you might need to fix up the reference to that but in this case we can fix up the fact that the app doesn't exist by building it so if you remember this was a cocoa document based application that we had created and now we go off and build and the build tab came up to show us the build output we close that back up now we can go down into the products group and navigates down in and see the bundle contents here so an application package on Mac OS 10 is a bundle you've heard a lot about this you'll hear a lot more about it so within here we can see the info dot P list so we can click on that and see the XML of that now a project builder I took the information that you had supplied in the project which in this case is default and created that for us we've got the Mac OS 10 directory that the binary for Mac OS 10 is in here there's the pkg info file that's necessary for finder launch services to find this application package as an application and then there's the whole resources group as well within this case English resources so if you had your project mocha lized into multiple languages this is where you would see the dot lproj is for your different languages so we'll be enhancing this facility over time to give you full inspection of the built results of your projects so you can envision things like the size of the binary and the groups and permissions and things like that so let's take a look at some of the capabilities of the editor so we'll go back to the more complex sketch project here that we've already had open so sketch is one of the example projects for Cocoa it's an NS document based project that's out in developer examples cocoa so we can select a file and we can see that we've got full syntax coloring here in the file we can do things like splitting the window by going up here to the split bar or split icon we can resize each of the split panes we can create more if we want we can close up any particular split panes now a lot of people are looking for more flexibility in the environment so what if I don't want to be constrained inside that window well you can bring up files and other windows by just going a double clicking in the outline view and now it comes up in a separate window you've got all the same capabilities here where you can split the editor pane each of the entered panes has a navigation bar here so you can flip between different files show the same file different parts of the same file or you can show different files in the same editor pane some people occasionally ask us is there a facility for showing what line number I'm currently on or going to a specific line number so to go to a specific line number let's bring up the go to line menu item under the find menu and Mike what line number should we go through here oh I don't know about 20 line 20 sones good ok so we go directly to that now also we find that if we keep that window open and we move around between the file the auto updates it's almost barely visible on the screen up there so clearly this is an opportunity for some future improvements in the product here now when you're editing there's a number of different parameters you can set for the text settings of the files so we can do this by selecting a file and then go up into the project menu doing show info to bring up the file inspector so we can do things like set the tab width set the indent width you can set the end of line characters so do you want to use the Mac and the wine carriage return character or do you want to use the UNIX end of line character which is a line feed and in the case of we've actually enhanced the preprocessor the compiler and the debugger to be able to handle either of these properly but you may find that if you're going to work with UNIX tools with your files for example will run Perl scripts across them to look for word counts or something you might want to switch to using UNIX end of line characters you can also set the file encodings so let's say that you wanted to put kanji comments into your source code files well we've got a whole set of different file and coatings here if you switch to utf-8 then you can represent unicode characters in files that can still be a process by our compiler tool chain properly as well and go ahead and put all the kanji comments in that you want other capabilities from the inspector here is that you can change the reference style for how we're accessing this file on the disk so you might want to have the file be relative to the group that contains it in the groups and files outlined so you can say that a group matches up to a specific folder on the disk but you don't have to you can also have a file be relative to the project that contains it or you can also say that it's an absolute path so if you're going to be moving a project around at all or moving it between machines you'll probably want to use one of the relative reference styles now you've heard me talk about the fact that your applications can be localized into multiple languages with our bundle facilities this is where you would do this in project builders so we can select a nib file here which is one of the document files of interface builder you can see in this case that we've got an English localized variant of this as opposed to it being completely global so we can select that nib file and say that well actually we'd like to add a localized variance here so Mike what should we put here let's try Japanese okay let's try Japanese so we can add a Japanese localized variants of the file and now we've got two localizations of this name file so one more thing to note about this actually you can also switch things to be global resources again one more thing about the groups and outline groups and files outline that you should know is if you go up to the very top of the groups and files outline and select the topmost item basically the route group in this case sketch now the inspector changes to show that we're inspecting the project itself so I'll touch on this a bit more later in the talk but this is where you would set a build location for this project specifically and I'll talk about why you might want to do that and it's also where you would select to commit changes for SCM across the entire project now let's talk about navigating through the project in order to use some of our more advanced navigation facilities you first need to index your project so currently with the shipping versions of project builder we don't index by default so if you wish to index you go up to the project menu select index project this goes through the compiler - to index all the sea based languages so C C++ and Objective C it uses a separate parser for Java if you do have any problems indexing in this current version of project builder I should go to the console look at that we aren't currently invoking the build system in quite the same way as when we invoke to build your project that's something we're going to be fixing in the next release as I mentioned the index is then used for some of our more advanced navigation mechanisms but let's talk about the navigation as a whole first so for moving around between file in the navigation bar but above each editor pane we have a pop up menu to show the recently viewed files so you can move between those there's also back and forward buttons so you can move back and forward as in a web browser kind of a stack based there you also have easy access to included files so we have what's what we call the counterpart button here in an icon on the right of the navigation bar that lets you switch between in this case a class file and the header file for that particular class file so we can move back and forth there but if you've indexed your project this is a little bit of a hidden feature if you hold down the mouse button on the icon the counterpart icon that shows all the files that this file is including so we can go to this from this source file to one of its header files but then the other interesting thing is now you can walk up and down your include hierarchy so you can see that this header file is being included by two of the source code files we can also go to on up the header hierarchy and say well let me see gee we're importing apke th let me see what all it imports and from there that's another mechanism to get to framework headers so way of seeing the header file dependencies in your project for navigating within a file we have again if the project is indexed we've got the symbol pop up here so you can move between different methods within this file and you know if you move if you're in the source code and you see a method that you want to see say let me see the the definition of this method so shared print info here if I want to see the definition of that we can do a command double click on that and that takes this to the declaration here if we had multiple declarations of the same function then it would put up a little pop-up menu if there's a small number of them if there's a lot of them it would actually populate the find panel and pop pop down with that and you can select any lines so I think that covers that so another navigation mechanism is bookmarks these are completely under your control each user has their own set of bookmarks so to set a bookmark in your project you would select of line of code and then go up to the add to bookmarks menu item in the navigation menu so we can add a couple of bookmarks now if we go over here to the bookmarks tab we can see that this is a way of navigating around between different locations in our project so we can actually rename those by holding the option button and clicking so you can if you're working on a large project and you're working on specific parts of it you can set up bookmarks to easily allow you to jump to that so again because this is on a per user basis and multiple users will work on different aspects of the project each person gets their bookmarks saved persistently with the project they can be checked into CVS etc okay we also have a project wide find/replace capability here in the fine panel so there's a lot of power built into this we can control how far we want to search so the search space here by going into the find options so you could say I just want to search in this project but I want to search in all of my open projects or I want to search in my projects and my frameworks or just my frameworks so there's a lot of control there so you can set up individual find sets however you want for that so if we close that back up we can see that we've also got different types of searches that you can do so textual or regular expression for just plain string searches on if you've indexed your project you can get to definition searches as well and switch to finding the definitions of methods so let's look for in it with frame and we can see here that based on the fine set that we had selected that we are seeing all the nits with frame methods both from cocoa framework headers themselves and from my project so when we click on a method there on the fine pane takes us to that implementation or declaration in the source code okay so that covers that for our initial creating editing and navigation navigating projects walkthrough thanks Mike if we can go back to slides on both screens please I generally don't do these things where I talk all the way through man bear with me so now let's take a look at some of the source code navigation or source code management facilities of project builder so currently project builder interfaces with one source code management system on that CVS you may have heard of CVS or you may not have it's the concurrent versioning system this is an open source source code management system that's used for a lot of the open source projects out there it's cross-platform so it runs on a whole variety of different systems a lot of different UNIX platforms Windows NT there's clients for the Macintosh it comes on the developer tool CD so when you install the developer tools you get CVS we use it very extensively for Mac OS 10 with an apple which for us allows us to test our our project builder interfaces with this very well and if you're gonna be working with the darwin sources at all you may already be familiar with CVS because you the darwin sources are kept in CVS repositories and you can access those out on the network and check out the darwin sources directly so there are some places you can get documentation for using CVS in project builder we put the manual on the system itself in developer documentation commands CVS I think will have URLs for this type of thing later up in the web also if you go to project builders help menu there's in the projects section there's a source code management section there and it covers a lot of what I'm going to talk about so in order to use CVS within project builder there's some things you have to do to set up for this first number one is you have to have a CVS repository somewhere that you're going to be storing a project in typically there's one CVS repository for a whole group of developers we have about three of them within apples so the Darwin CVS repository core OS has one and then everybody else has one you can use either local access to that an NFS access looks local or you can use client-server access to a remote CVS repository it could even be on a different type of machine but of course you won it on Mac os10 for remote you can use piece server authentication or with the new system sorry I jumped the gun there you can now use ssh authentication as well another requirement is that your project already has to be in CVS we'll be enhancing some of these things in the future but for now this is the way that you would use this so from the command line in the terminal window for example you would do a CVS imports on your project to add it to the repository and then you have to check it back out of the repository into a CVS working directory so on the command line check it out some people on the email lists ask gee a project builder doesn't seem to have my SCM menu enabled why is that a lot of times it's because you don't have your project in a working directory maybe you haven't yet put it in the CVS those are some of the precursors and one thing I forgot on here is that you actually have to have your CVS root environment variables set up properly I believe and that's documented as well once you've done this then there's menu items for committing changes on selected files or if you have groups selected it commits all the changes and files that are have been modified in that group if you want to commit everything in your project including the project file itself you would select that top-level group that I showed in the groups and files outline when you commit that makes the addition and removal of files permanent but before CVS knows about the addition or removal of files you have to tell it so there's an ad to repository menu item or you can just delete files the SCM status of files is shown in the groups and outlines view so there's modified you means that it's updated out in the repository and you need to update to it somebody else has changed it question mark means it's not yet in the repository a means that you've added it and will be committed later our means that it's been removed so shows in grey there and check my time here the C means there's been conflicts so you can also compare different revisions of the files through file merge you can look at the change logs in the file inspector to see all the different revisions you can compare with the base revision of a file you can compare with the latest revision if you're going to be checking in nib files from interface builder Mac os10 and a fair number of cases use what we call wrapped files or packages even what we do internally with an apple at this point is used what's called CVS wrappers in order to do this there's a configuration file that we've supply and developer tools CVS wrappers that you would need to commit in to the top level of your CVS repository and the CVS root directory in client-server mode each user needs access to that so you'd put it in a dot CVS wrappers file in your home directory this is all documented actually in the last place we documented it which was the release notes for public beta which are actually still in the product as well so I'd like to show a quick demo of source code management and the comparing of files here so bringing Mike back up on stage so let's go back into the sketch project here and if we open up say our model classes group we can see here that when we open this up there's a file here marked with a U this means that typically we do check for SEM status when we open a group for the first time remember the you mantids somebody outside and modify the file in the repository so we'd really like to see I don't really want to update to that until I know what they've done to it so let's go ahead and go into its SCM menu item and do a compare with latest revision now this will launch file merge and we'd see in file merge here that down to the lower left it shows that there's been one difference in the file that wow somebody added a new comment well that looks pretty important so we better update to that so now let's go back to the SCM menu and we can do an update to latest revision so bring in what's in the repository if there were conflicts in that update it would show as a seed you could have used file merge to do a merge of that as well let's see modify a file yeah why don't we modify a file that's a good idea so let's go into draw documents and add an NS log message here so in Cocoa this is a wait this is a foundation call that you can use to it's like printouts essentially it comes out in the console so we can add that when we save the file we can see that it's now marked in their groups and files outline as having been modified and we can commit that by going up to the SCM menu item commit changes and enter a commit log personally I like to commit things and sets so things that had the specific change of one nature commit them all together have the same commit log and all so we can also inspect the file and see all the different revisions that we've had here in the SCM tab the file inspector so we can see that we've got essentially seven revisions since the 1.1 so let's pick a couple of those and compare them so select a couple arbitrary revisions hit compare and again this launches file merge and shows us the comparison here in file merge in this case there's ten differences and you can move between those okay so that's it for our SCM demo that's file merge for you now let's talk about configuring building and debugging targets so what is a target our targets are really the face of the build system in project builder the target just defines a product to build a project consists of one or more targets presumably it probably wouldn't be that interesting to have a project without targets targets can depend on other targets and we'll talk about about that you can have build styles to allow different variations of the same target this is a really innovative capability build phases control when you're building a project a specific target how does it get built I'm not going to go into detail on this you can learn lots about this in project builder in depth tomorrow morning with Mike and the team each user has an active build style and an active target so I might be building the working on the framework of the project you might be working on the test tool Lovins and he might be working in the app portion when we help build it might do different things for each of us there's a bunch of standard types of targets so we've talked a lot about Apps bundles etc you can add as many new targets to a project as you want by just going to the new target menu item in the project menu there's a couple of special types of targets that we should highlight a little bit we have aggregate targets that don't build anything themselves they just Express dependencies on other targets so this can be useful say let's say that I have a set of command line tools like the file commands on Mac OS 10 you can put all those in one project and have an aggregate that builds them and it is useful to have that as the first target and I'll explain why in a couple of minutes and you can also have if you have normally project builder controls the build system for you you don't ever have to edit a make file or anything else but there's a lot of power to change that if you wish with the build phases you can learn about tomorrow you can also have targets where you control the build system or you're using open source projects and you don't want to change the build system that somebody else set up you can just create a legacy make file for that and you can specify what build tool it is it might be make but it could be any other command on the system as well so let's look a little bit more target dependencies so you might have for example if your application as well factored you could have an application and a test tool for it so for example project builder itself that is a small application that links with a few large private frameworks that have all the functionality and then we have tools that link with those frameworks as well so in this case we have the my framework target represented in the diagram there my application depends on my framework my test tool depends on my framework you could select either of though any of those as your active target and it would ensure that the framework gets built you can also have an aggregate that depends on all three here so the aggregate again again the aggregate doesn't build anything itself but it ensures that the others get built having the framework there is optional from the aggregate because it'll get built once regardless and you can configure your target through the target editor we're not going to go through this in great depth but I'll talk about different aspects of this so to set up your build phases indicating what files are in your targets and how to process them do what source files do we compile etc you would go through the files and build phases aspect of the target editor for build settings this is where you control your compiler and linker options things like your optimization settings do you want to generate debug symbols or not the install path of your project and for advanced capabilities there is an expert editor down there that lets you set any build variable and values for that I can be useful in some circumstances the info.plist that we showed previously in the new project that we had created there's a bundle editor here or bundle settings that you can change the different configuration settings for applications for frameworks for bundles for plugins so you can set for example the identifier that the preference system would use the type and signature for applications you can set what the icon is this is also where you would set up what the document types your project your application could handle so you can set up as a reader or as an editor of document types or if you just want to put it out on the pasteboard you can set it up with none if you don't actually handle documents of that type then for the debugging system there's a number of things you can configure about how to launch your executable here for either running or debugging so let's say that you have a plugin that you're working on and that's all that's in your project is a plug-in well we can't just launch that and have it do anything interesting so we have to specify an application as the context that that plug-in would run in this is where you would do that you can hear a lot more about that in the debugging session on Friday morning all this ties into a very powerful build system that does automatic dependency analysis of your headers again I've mentioned there's no make files to edit we do leverage a lot of command-line utilities underneath this so Jam is a utility that's a lot like make that's what project builder calls but very few of you should ever need to look at Jam files at all we talked to a lot of lower level compiler tools so GCC for C based languages res for dot our files Java C or jikes for java compiling if you want lots of access to the full power of UNIX underneath you it's there for you either in script build phases that you could put in find more about that tomorrow or the legacy make file targets that I talked about where do build results go so normally when you hit build and your project go to a build directory in that project but you might want to specify a common build directory for all of your projects and this would allow project builder to let's say that you had multiple different projects where you've got an application in one project and it depends on three frameworks and you've got each of those in different projects if you set them all up to build into the same place then without actually installing that on your system project builder can automatically configure the dynamic loader to find all of that your development versions of all of that when you run so again find more details on friday about that you would set that either for all of your projects in your building preferences panel or you might have sets of projects that you want to work on together so put this set over here put this set over here when you build that's what when inspecting the project you can change on each projects basis where that project builds to and that's why you would do that the compiler I'd mentioned that we're using GCC so we use GCC 2.9 5.2 currently we built all of Mac OS 10 with this so we cranked a lot of code through this compiler very heavily tested it supports all of our C based languages and as you may have already heard we are working on resurrecting objective C++ to allow cocoa applications to take advantage of existing C++ libraries go to the compiler technology session with John Graziano and company on Thursday morning to hear more about that you've also got support for velocity engine in the compiler C++ GCC is a fairly strict about its ansi compliance on things that's important to know if you're coming in from other environments we've done some performance improvements for C++ code generation recently so we've improved the exception handling and coalescing of symbols so you can get more information about that again from the compiler session we are going to be working with the latest versions of you see as it advances so one thing that you should definitely know is that the C++ ABI the application binary interface is changing between GCC tu-95 and GCC 3 so you don't want to have any shared libraries that export C++ API put a C wrapper around that there's a precompiled header mechanism so we supply precompiled headers for all of our umbrella frameworks so cocoa carbon application services core services so when you go to imports cocoa slash cocoa dot H we automatically find the fact that there's a precompiled header there next to that bring that in and that tremendously spills up your build speeds for c++ if you've got C++ code our precompiled headers don't currently let you store c++ syntax in the precompiled header itself but we have now enhanced this so that you can import and use precompiled headers from C++ source files so for example from C++ applications that might be using power plants you can use the carbon age precompiled header because that only has c constructs in it project builder also now has facilities to specify that you've got an implicitly included header that bring this into every file that we compile so some environments call this a prefix file and you can say that you want that pre compiled as well so you could set some defines and then import carbonate into that and that would let you use precompiled headers for a customized version of carbon dot age now I mentioned that project builder has been factored into an application and some frameworks well one of the tools that also links with those frameworks is called PBX build this allows you to do automation of your builds so you can have a UNIX cron job going nightly to build all the sources of your project Apple does this kind of thing with all of Mac OS 10 we use the PBX build command to build everything so again this uses the same build machinery as project builder itself by default if you just run PBX build it builds the first target in your list so this is where having an aggregate here is the first target might be useful to you if you want to make sure that all or most of your project gets built and the invocations of this look just like invoking make so PDX build clean or PBX build install so if you're going to set things up to actually put them in to the install places you want yeah we don't currently have a way of doing this from the IDE you would do this from the command line some people ask us well why does it build into slash temp well we don't think it's a good thing to by default build what could be a buggy product directly into the install directories on your system so we put it in slash temp and the hierarchy there if you want it installed directly when you build set best reticules slash for debugging we have an extensible architecture that talks to gdb for debugging all the C based languages talk to the Java VM for debugging Java it's full graphical source level debugging so threads stack traces variables you can have breakpoints that are saved on a per user basis not only they're saved not only between different runs of the debugger but between different runs of the IDE as a whole and again I talked about how the project builder system controls the dynamic loader to use multiple projects at a time for debugging them so development versions of your frameworks and photos if you aren't familiar with gdb it's a very powerful open-source debugger that comes with the Mac O's 10 development tools handles all your C based languages you can handle arbitrary expression evaluation or invoke functions to get the values of opaque data types such as those from carbon you can set commands and conditions on breakpoints and it's got a very powerful macro capability again the debugger session on Friday morning you can learn lots more about not only seed language to debugging from project builder but Java as well and about advanced features of gdb so I'd like to show you some quick rounds of building and debugging demo here so if we can switch back to demo 6 abilties so if we go back and bring up that sketch project again and we had previously made some changes to the project so let's go ahead and build it and see what we've got at this point so we hit build the project was previously compiled so in this case we do an incremental build with just the SKT draw document we can close up the build tab here because we got a successful build now let's go ahead and run so we can hit the little monitor icon there to run the application so it fires up brings it to the foreground but we can see that in the run tool pane here we got the console output from the NS log message that we had previously put in so great but let's actually take a look at debugging so let's quit out of this at this point and let's say that we want to debug the project now by default when you build within project builder it assumes that you're doing development so it builds for debugging that's why some of you look at and say why is my executable so large that's because it's got debugging symbols in it until we build for deployment which find more about that tomorrow so sorry I got ahead of myself here ok so what I'd like to do is I remember that there were some issues there with the align left edges methods of sketch so let's go and find that method in the code so we select the source for that and we can put a breakpoint here on that by clicking in the breakpoint well actually yeah once you bring up the breakpoints tab and just show that so now you can see where the breakpoint is listed there you can enable or disable it so let's go ahead and go back into the application and start debugging sketch comes back up fires up to you to be on it launches the project so now we can draw a few objects here a couple of objects and do a select all and then go and say align left edges boom when we hit the breakpoint now we can see a variety of things here are shown in the bugger we can see that we've got the stack back trace where we stopped so you can see some stack frames as shown in bold and some are in gray so we have source code for those that are shown in bold for the ones in gray there in the frameworks we don't have source code for that we've got two threads pop up to show the different threads in your application most Mac OS 10 applications have more than one thread although keep it minimal we've got variable inspection here for all your different variable types and the May 2001 tool CD you can now set the values of variables when you're debugging in Java and we have worked on that for C as well if we start stepping through the code here we can see that variable starts turn red if they've changed in the previous step so we can go down and look at first bounds and say okay here's a structure we can see the contents of that structure when we step over the line here that's going to set first bounds it shows us that all the values of the structure and changed and if we step through a little bit and for cocoa programming seeing the description of an object is a very important thing so if you want to do that what you have to do currently is bring down the gdb console do a po4 print object of a particular object so in this case Kurt graphic we can print the object there will be providing better user interface for this as well and again the debugging session will go into more detail in these things and then if we were to step around the loop we'd see continued increment the loop variables so we can see that now I is on value two for example okay so that's it for that demo thanks Mike okay let's take a look at what's on the May 2001 developer tool CD that you just got in your packets I front some of you probably had high expectations that oh I hope my pet feature is fixed well we've got full support for web objects 5 development here so you can still develop do all your other development as well but the primary theme again was web objects 5 for both project builder and interface builder the web Bob's 5 developer packages themselves are included on the CD this time around we don't plan to do that in the future but we'll give exposure to web objects this time there's also a limited version of the runtime so it's a time limited restricted version the runtimes that you can test your web objects applications with there's new system documentation there's a some additional examples for app kit like I think one for the use of the NS toolbar and then some interface builder examples as well then Honore will probably talk about on the project builder enhancements it's been localized into Japanese general-purpose enhancements you can now continue your build after there's been an error in one file so it can go off and continue to try to compile all your other files that's on the building preferences there's a check syntax check mark in the right portion of the navigation bar with which you can do essentially a single file compile check to make sure that you're using the syntax correctly I talked about the precompiled implicitly included header files that's what you've just in what you've just there's build support for header dock and some bug fixes as well I talked about enhancements for Java so you can now merge jar files automatically during the build process on there were some a couple of problems with building large projects for Java hitting command line length restrictions and things like that those have been fixed now and build performance improvements so a few vind extra projects and you're getting there for getting Java dependency analysis we now are again throwing multiple files at the compiler at the same time which processes them more quickly there's build support for Java wrappers so there's a Java wrapper around objective-c frameworks and I mentioned that you can set values when you're debugging Java so I had mentioned that we were going to talk a little bit about the future here we aren't doing that in most places in this conference but we wanted to let you know that we are hard at work on the product working to improve it both for your benefit and for ours and let's take a look at some of the things that we've got coming up so we've gotten a fair amount of feedback both from our external users and from internal users that the symbol pop-ups gee it's kind of slow to get them and because I have to index my project and I can't get a symbol popup on a file that's not in my project if I just want to bring up another file well we now have for our next version a symbol pop-up that's based on a simple scanner with configuration property lists that's much faster and handles any file that you bring into the project so we are listening to that type of feedback and we've got a class browser for C++ objective-c and Java this is still based on the indexing and we are changing the indexing to actually generate the index while you're building so because it's already doing all that processing anyway the the additional overhead on the build process is very minimal but this will make it more robust than it currently is and we are also integrating the viewing of developer documentation directly into project builder itself so yeah those of you who have used help viewer to try to access developer documentation you can sometimes see that it might be nice to have faster more flexible viewing there and then some underlying support I talked about objective C++ one other thing we're working on is two-level namespace supports in the linker and loader that will let us add new api's to our frameworks without breaking your applications by conflicting with that so you can find out more about that in the compiler session so let's talk about the class browser a little bit so cocoa is a very big framework that's new to a lot of people it's really not hard to learn Objective C the language but learning the frameworks is always the hard part what can we do to help you there so that's what a-class browser can help with now for example where is this class in the hierarchy what's inherited etc let's see a demo so if we can switch back to demo great so going over to the other machine that's got the special sneak preview version here we can see that we've now got a fifth tab here in the project structure tabs on the left so a classes tab that when we bring this over we can see that it's got the NS object and NS proxy root classes for cocoa so we can navigate down in and see all the different subclasses of NS object we can scroll down through that and see for example NS responder we might want to look to go and what's in that and we can see that NS view here so scrolling on down a little bit further we see oh hey look there's some classes highlighted and bold here now that indicates that their classes that are actually in your project as opposed to in the frameworks so we can click on a class and we can see the members that are defined there click on one of the members and we can see the Declaration of that so that's pretty cool now but let's say that I knew the name of the class but I didn't know where it was in the hierarchy well we've got some options you can set up down here to pop up to say let's say let's look at a flat listing of all the classes so now we see this all alphabetical but wow that's still kind of overwhelming why don't you just show me my project classes for now and I see a list of just the projects in my class so we can select one of those it's a SKT image and we can flip back to the hierarchy here now and it shows us Wow okay that's a subclass of SKT graphic and you can look back through the class hierarchy so if we were to take a look at belief 19 the inherited members inherited members yes so if we look at the options there's a lot of power in this options panel there's an there's how you would set up the different option sets for the pop up you can configure that we'll have some default sets there's a show inherited members checkbox here so if we check that now we can see that in gray we're seeing all the members that we're hearing from the frameworks classes so but what are these book icons next to some of these let's let's take a look at one of those Mike so we click on the book for the class method of boom the HTML documentation for nsobject shows up right here composite form so we can also because we had previously showed that files can be opened in separate windows let's take a look at Ennis busy a path off in a separate window how would we do that let's just go down double click on the book icon for set default line join style and off into a separate window the HTML comes up so you can copy and paste out of this multi window we're really working to integrate the seamlessly and well into project builder so it's not ready to ship yet but we think you'll like it when it gets fully there okay thanks Mike so what else is on the drawing board well one of the things we've heard loud and clear is that some of you would like more flexible UI so for example we showed the tools pains coming down in the project window it might be nice to be able to have those outside of the window and then general have a more flexible multi window UI yes we've heard that and yes we'll be working on that other things plug-in editors and plug-in build tools we've been migrating the project towards that capability already so the documentation viewing that you just saw is actually implemented as an editor plugin this is letting us get the api's to a state we're in a bit we'll be able to bring on I make those API is more public we're looking for tighter integration with other tools such as interface builder and the performance tools so the ability to directly launch malloc debug or sampler or object Alec on your application from within project builder and then on the compiler side of things we need to do a lot of work on faster C++ compilation and we are also working on code generation improvements as well so in summary project builder is a very powerful IDE for Mac OS 10 we're working hard to improve it in a lot of ways now we've got a great team working on this and we're continuing to build up that team send us your feedback many of you already have been and most important finish up and ship your applications so with that that finishes up what I had to say there's a variety of information pages out here I'd like to bring godfrey back on the stage for what remaining Q&A time we have thank you very much Dave I think we need a big hand for Dave and the project building team I think the advancements we're making the project builder are more than just impressive and that it's going to be a tremendous tool for all of your use this is just a road map to all all the farthest tools related sessions through the show we felt that in this session it was useful to give this to you again so you have an idea where we're going the next session in this Hall is interface builder and we'll be doing a similar similar presentation and now let's kind of walk through these that's my information in case you need to contact us the Mac OS tools feedback mailing address sends information to all of the veldt the development team on a one by one basis feature request feature enhancements remember also to file bugs when you run into bugs use the use the bug report it's it's fully accessible for this project you