From mah at jump-ing.de Tue Apr 1 02:04:48 2008 From: mah at jump-ing.de (Markus Hitter) Date: Tue Apr 1 02:04:35 2008 Subject: iPhone SDK is under NDA (was Re: iPhone SDK) In-Reply-To: <183896A8-E82D-4BB8-BF30-BDD5EB37AE4E@harmless.de> References: <092F0F30-FDE0-11DC-82E5-000393CA0072@smartsoft.de> <7F118EA9-9E97-4ABD-9227-6879C765F390@alastairs-place.net> <183896A8-E82D-4BB8-BF30-BDD5EB37AE4E@harmless.de> Message-ID: Am 01.04.2008 um 02:06 schrieb Andreas Mayer: > Well, nothing I can do about it, really. Besides not buying an > iPhone myself and recommending to friends not to buy one either. Supporting open platforms would have a bigger impact. Write your applications using open source frameworks. There's nothing stopping you from creating equally nice software for other phones/PDAs. Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ From andreas at harmless.de Tue Apr 1 18:21:48 2008 From: andreas at harmless.de (Andreas Mayer) Date: Tue Apr 1 18:21:50 2008 Subject: iPhone SDK is under NDA (was Re: iPhone SDK) In-Reply-To: References: <092F0F30-FDE0-11DC-82E5-000393CA0072@smartsoft.de> <7F118EA9-9E97-4ABD-9227-6879C765F390@alastairs-place.net> <183896A8-E82D-4BB8-BF30-BDD5EB37AE4E@harmless.de> Message-ID: <3CF9FE77-EABB-422D-9D7E-58DCA485ACEA@harmless.de> Am 01.04.2008 um 11:04 Uhr schrieb Markus Hitter: > There's nothing stopping you from creating equally nice software for > other phones/PDAs. Yes there is. Lack of a decent a) OS b) language c) SDK d) hardware. Oh, well. I had to wait nearly 10 years before someone *finally* put a PDA and a mobile phone together as it should be. I guess it won't hurt to wait some more ... Andreas From dvfuentes at experienceis.com Wed Apr 2 01:13:16 2008 From: dvfuentes at experienceis.com (davicente) Date: Wed Apr 2 01:13:19 2008 Subject: iPhone SDK In-Reply-To: <092F0F30-FDE0-11DC-82E5-000393CA0072@smartsoft.de> References: <23AD2672-FDB7-11DC-82E5-000393CA0072@smartsoft.de> <26F3B562-FA5D-42D3-B058-56285FE1BCB9@mac.com> <834C62A2-E76C-4A17-A31D-04E1C7B659D7@BITBLASTERS.COM> <092F0F30-FDE0-11DC-82E5-000393CA0072@smartsoft.de> Message-ID: <16444489.post@talk.nabble.com> I have the same error with a simple example: "#import error: UIKit/UIKit.: No such file or directory " I have added framework UIkit to the project and it doesn?t work. Can anybody help us? Thank you. Andreas H?schler wrote: > > Hi all, > >> Well you can use a PPC Mac to run Xcode for iPhone, and debug your >> code using the simulator but it won't create the binaries for the >> iPhone or iPod touch. I am ding that right now, waiting on my new >> Intel Mac to get here. So basically you can't load your code on the >> iphone without an Intel Mac. >> >> >> On Mar 29, 2008, at 11:47 AM, Michael Latta wrote: >> >>> I imagine that 1) using a PPC mac will not be supported, and 2) you >>> may not be able to connect to the iPhone hardware with a PPC mac. >>> There is a reason they make that a system requirement. If it works >>> in the mean time have fun, but expect that at a critical point it >>> will fail. If you are just playing around that may be fine, if you >>> plan to build commercial apps, I would not rely on that long-term. > > Just afte rinstalling the iPhone sdk downloaded a few days ago I > realized that there is even a newer SDK with some enhencements. I > downloaded and installed that. Then I downloaded the first demo project > HelloWorldClassic from the Apple page and gave that a shot. The source > code doe snot build. I get > > #import > error: UIKit/UIKit.: No such file or directory > > Now what is that? Is that PowerPC related or am I missing anything > else? At least the demo projects should build, shouldn't they? > > Thanks a lot! > > Regards, > > Andreas > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > -- View this message in context: http://www.nabble.com/iPhone-SDK-tp16371703p16444489.html Sent from the OmniGroup - MacOSX-Dev mailing list archive at Nabble.com. From mah at jump-ing.de Wed Apr 2 01:32:33 2008 From: mah at jump-ing.de (Markus Hitter) Date: Wed Apr 2 01:32:20 2008 Subject: iPhone SDK is under NDA (was Re: iPhone SDK) In-Reply-To: <3CF9FE77-EABB-422D-9D7E-58DCA485ACEA@harmless.de> References: <092F0F30-FDE0-11DC-82E5-000393CA0072@smartsoft.de> <7F118EA9-9E97-4ABD-9227-6879C765F390@alastairs-place.net> <183896A8-E82D-4BB8-BF30-BDD5EB37AE4E@harmless.de> <3CF9FE77-EABB-422D-9D7E-58DCA485ACEA@harmless.de> Message-ID: Am 02.04.2008 um 03:21 schrieb Andreas Mayer: > > Am 01.04.2008 um 11:04 Uhr schrieb Markus Hitter: > >> There's nothing stopping you from creating equally nice software >> for other phones/PDAs. > > Yes there is. Lack of a decent a) OS b) language c) SDK d) hardware. This stuff exists for quite some time now, here are two starting points: http://www.quantum-step.com/wiki.php?page=About http://www.etoile-project.org/etoile/mediawiki/index.php?title=PDA Probably you knew it already ;-) Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ From dvfuentes at experienceis.com Wed Apr 2 01:50:48 2008 From: dvfuentes at experienceis.com (davicente) Date: Wed Apr 2 01:50:51 2008 Subject: iPhone SDK Message-ID: <16444374.post@talk.nabble.com> I have the same error with a simple example: "#import error: UIKit/UIKit.: No such file or directory " I have added framework UIkit to the project and it doesn?t work. Can anybody help us? Thank you. Andreas H?schler wrote: > > Hi all, > >> Well you can use a PPC Mac to run Xcode for iPhone, and debug your >> code using the simulator but it won't create the binaries for the >> iPhone or iPod touch. I am ding that right now, waiting on my new >> Intel Mac to get here. So basically you can't load your code on the >> iphone without an Intel Mac. >> >> >> On Mar 29, 2008, at 11:47 AM, Michael Latta wrote: >> >>> I imagine that 1) using a PPC mac will not be supported, and 2) you >>> may not be able to connect to the iPhone hardware with a PPC mac. >>> There is a reason they make that a system requirement. If it works >>> in the mean time have fun, but expect that at a critical point it >>> will fail. If you are just playing around that may be fine, if you >>> plan to build commercial apps, I would not rely on that long-term. > > Just afte rinstalling the iPhone sdk downloaded a few days ago I > realized that there is even a newer SDK with some enhencements. I > downloaded and installed that. Then I downloaded the first demo project > HelloWorldClassic from the Apple page and gave that a shot. The source > code doe snot build. I get > > #import > error: UIKit/UIKit.: No such file or directory > > Now what is that? Is that PowerPC related or am I missing anything > else? At least the demo projects should build, shouldn't they? > > Thanks a lot! > > Regards, > > Andreas > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > -- View this message in context: http://www.nabble.com/iPhone-SDK-tp16371703p16444374.html Sent from the OmniGroup - MacOSX-Dev mailing list archive at Nabble.com. From alastair at alastairs-place.net Wed Apr 2 02:26:19 2008 From: alastair at alastairs-place.net (Alastair Houghton) Date: Wed Apr 2 02:26:25 2008 Subject: iPhone SDK In-Reply-To: <16444374.post@talk.nabble.com> References: <16444374.post@talk.nabble.com> Message-ID: <28EF648C-7AA9-4B0B-8F67-0F7534096B9E@alastairs-place.net> On 2 Apr 2008, at 09:50, davicente wrote: > I have the same error with a simple example: > > "#import > error: UIKit/UIKit.: No such file or directory " > > I have added framework UIkit to the project and it doesn?t work. > Can anybody help us? Since you have difficulty reading, apparently not. The iPhone Beta SDK license agreement, to which you agreed when installing the SDK, includes a *NON-DISCLOSURE AGREEMENT*; the only people you are allowed to talk to about the SDK (aside from information already made public) are staff who work at Apple. If you have a question about it, you need to ask Apple via one of the various e-mail addresses published on the developer.apple.com website. Kind regards, Alastair. -- http://alastairs-place.net From marquedej at mac.com Wed Apr 2 06:59:07 2008 From: marquedej at mac.com (Mark de Jong) Date: Wed Apr 2 06:59:13 2008 Subject: Embedding a framework within an app Message-ID: <916782A7-0F17-49FB-A4CF-17EF94787756@mac.com> Hi! I seem to be missing some basic "point" about embedding a framework within an application. I have built a framework in one project and an application in another project. Up until now, I have simply been installing the framework at "/Library/Frameworks" and then my application has used the framework and all is well. Now, I'd like to embed the framework within my application. I have read all of Apple's docs on how to do this. Changed the framework's "Install Directory" (INSTALL_PATH) to be "@executable_path/../Frameworks" and have been sure to place a copy of the framework within the application's bundle at "MyApp.app/Contents/ Frameworks" using a "Copy" build phase, as instructed in the docs. I have added the framework project to the application's project and pointed the build directory of the framework to the application's build directory. I made the framework "Product" a dependency of the app's project. The application still cannot find the framework. Using "otool -L" on both the application binary and the framework binary, they both show "/Library/Frameworks" as my framework's location. I know I'm just being boneheaded and am missing something basic or obvious. Would some kind soul please point out the error of my ways to me? :-) Thanks, -- Mark From cmhofman at gmail.com Wed Apr 2 07:25:23 2008 From: cmhofman at gmail.com (Christiaan Hofman) Date: Wed Apr 2 07:25:29 2008 Subject: Collection callbacks and toll free bridging Message-ID: Hi all, I have some questions about how toll free bridging handles callbacks for collections. I've searched the docs but came out empty. Basically I have the following 2 questions: 1. Are Cocoa accessors doing anything besides some checking and wrapping CF functions? 2. What callbacks are used by collections initialized using Cocoa? Let me make this a bit more explicit for the example of CFMutableDictionaryRef/NSMutableDictionary. NSMutableDictionary is documented to copy the keys. So a more concrete version of my question is: are the keys copied by the Cocoa methods, or by the CF key callbacks? Context: I need a dictionary for keys that do not conform to NSCopying. So can I use just use CFDictionaryCreateMutable to create the dictionary and then use Cocoa methods for the rest? Christiaan From cmhofman at gmail.com Wed Apr 2 07:42:08 2008 From: cmhofman at gmail.com (Christiaan Hofman) Date: Wed Apr 2 07:42:16 2008 Subject: Embedding a framework within an app In-Reply-To: <916782A7-0F17-49FB-A4CF-17EF94787756@mac.com> References: <916782A7-0F17-49FB-A4CF-17EF94787756@mac.com> Message-ID: <21152EAB-9B34-4490-B650-4324E0744B3F@gmail.com> On 2 Apr 2008, at 3:59 PM, Mark de Jong wrote: > Hi! > > I seem to be missing some basic "point" about embedding a framework > within an application. > > I have built a framework in one project and an application in > another project. Up until now, I have simply been installing the > framework at "/Library/Frameworks" and then my application has used > the framework and all is well. > > Now, I'd like to embed the framework within my application. > > I have read all of Apple's docs on how to do this. Changed the > framework's "Install Directory" (INSTALL_PATH) to be > "@executable_path/../Frameworks" and have been sure to place a copy > of the framework within the application's bundle at "MyApp.app/ > Contents/Frameworks" using a "Copy" build phase, as instructed in > the docs. > > I have added the framework project to the application's project and > pointed the build directory of the framework to the application's > build directory. I made the framework "Product" a dependency of the > app's project. > > The application still cannot find the framework. > > Using "otool -L" on both the application binary and the framework > binary, they both show "/Library/Frameworks" as my framework's > location. > > I know I'm just being boneheaded and am missing something basic or > obvious. > > Would some kind soul please point out the error of my ways to me? :-) > > Thanks, > > -- Mark I can't tell you, but apparently you haven't done exactly what you said here. Have you used otool on the actual build product of the framework? If you really set the INSTALL_PATH to what you said that's what otool -L should give. You may have copied an old version of the framework into your app bundle? The way we are making sure build products like frameworks are found is to use a shared build products directory for all the projects. That's much easier and more reliable than hard coding the (relative) path to the build framework from your app. Christiaan From amaxwell at mac.com Wed Apr 2 07:45:07 2008 From: amaxwell at mac.com (Adam R. Maxwell) Date: Wed Apr 2 07:45:26 2008 Subject: Collection callbacks and toll free bridging In-Reply-To: References: Message-ID: <45392A1F-E52B-4972-BC43-CEBD5FA2FA20@mac.com> On Apr 2, 2008, at 7:25 AM, Christiaan Hofman wrote: > Hi all, > > I have some questions about how toll free bridging handles callbacks > for collections. I've searched the docs but came out empty. > Basically I have the following 2 questions: > > 1. Are Cocoa accessors doing anything besides some checking and > wrapping CF functions? > 2. What callbacks are used by collections initialized using Cocoa? > > Let me make this a bit more explicit for the example of > CFMutableDictionaryRef/NSMutableDictionary. NSMutableDictionary is > documented to copy the keys. So a more concrete version of my > question is: are the keys copied by the Cocoa methods, or by the CF > key callbacks? > > Context: I need a dictionary for keys that do not conform to > NSCopying. So can I use just use CFDictionaryCreateMutable to create > the dictionary and then use Cocoa methods for the rest? No, NSMutableDictionary is weird about this. You must not use - setObject:forKey: because the copying is done in that method. Mike Ash pointed this out to me on cocoa-dev a couple of years ago: http://www.cocoabuilder.com/archive/message/cocoa/2006/5/13/163439 My bug report on this was duped to his, and the conclusion is that if you use setObject:forKey:, it will create a copy of your key, then invoke your custom callbacks /on the copy/: http://www.cocoabuilder.com/archive/message/cocoa/2006/7/10/167259 Once you've used CFDictionaryAddValue, you can safely use objectForKey: and other Cocoa methods, though. I still think the setObject:forKey: behavior is wrong, but at least I can avoid it. -- adam From cmhofman at gmail.com Wed Apr 2 08:05:53 2008 From: cmhofman at gmail.com (Christiaan Hofman) Date: Wed Apr 2 08:06:12 2008 Subject: Collection callbacks and toll free bridging In-Reply-To: <45392A1F-E52B-4972-BC43-CEBD5FA2FA20@mac.com> References: <45392A1F-E52B-4972-BC43-CEBD5FA2FA20@mac.com> Message-ID: On 2 Apr 2008, at 4:45 PM, Adam R. Maxwell wrote: > > On Apr 2, 2008, at 7:25 AM, Christiaan Hofman wrote: >> Hi all, >> >> I have some questions about how toll free bridging handles >> callbacks for collections. I've searched the docs but came out >> empty. Basically I have the following 2 questions: >> >> 1. Are Cocoa accessors doing anything besides some checking and >> wrapping CF functions? >> 2. What callbacks are used by collections initialized using Cocoa? >> >> Let me make this a bit more explicit for the example of >> CFMutableDictionaryRef/NSMutableDictionary. NSMutableDictionary is >> documented to copy the keys. So a more concrete version of my >> question is: are the keys copied by the Cocoa methods, or by the CF >> key callbacks? >> >> Context: I need a dictionary for keys that do not conform to >> NSCopying. So can I use just use CFDictionaryCreateMutable to >> create the dictionary and then use Cocoa methods for the rest? > > No, NSMutableDictionary is weird about this. You must not use - > setObject:forKey: because the copying is done in that method. Mike > Ash pointed this out to me on cocoa-dev a couple of years ago: > > http://www.cocoabuilder.com/archive/message/cocoa/2006/5/13/163439 > > My bug report on this was duped to his, and the conclusion is that > if you use setObject:forKey:, it will create a copy of your key, > then invoke your custom callbacks /on the copy/: > > http://www.cocoabuilder.com/archive/message/cocoa/2006/7/10/167259 > > Once you've used CFDictionaryAddValue, you can safely use > objectForKey: and other Cocoa methods, though. I still think the > setObject:forKey: behavior is wrong, but at least I can avoid it. > > -- > adam Thanks Adam. Now my question was general, and this is just a specific example. Does anyone know the general story for any collection? Or is the general story that I cannot trust toll free bridging for anything? Christiaan From marquedej at mac.com Wed Apr 2 08:19:24 2008 From: marquedej at mac.com (Mark de Jong) Date: Wed Apr 2 08:19:30 2008 Subject: Embedding a framework within an app In-Reply-To: <567AE08A-8C46-45F4-8FC0-8D458A1F73FC@quobor.com> References: <916782A7-0F17-49FB-A4CF-17EF94787756@mac.com> <567AE08A-8C46-45F4-8FC0-8D458A1F73FC@quobor.com> Message-ID: Johannes, Thank you for this suggestion. My embedded framework now works. The trick seems to have been disabling "prebinding" in the framework. Once I did that, the correct "framework location" shows up in the app's binary. Thanks, again! -- Mark On Wednesday, April 02, 2008, at 07:09AM, "Johannes Huning" wrote: >Maybe Mr. Rentzsch can help you: http://rentzsch.com/cocoa/embeddedFrameworks > >On Apr 2, 2008, at 3:59 PM, Mark de Jong wrote: >> Hi! >> >> I seem to be missing some basic "point" about embedding a framework >> within an application. >> >> I have built a framework in one project and an application in >> another project. Up until now, I have simply been installing the >> framework at "/Library/Frameworks" and then my application has used >> the framework and all is well. >> >> Now, I'd like to embed the framework within my application. >> >> I have read all of Apple's docs on how to do this. Changed the >> framework's "Install Directory" (INSTALL_PATH) to be >> "@executable_path/../Frameworks" and have been sure to place a copy >> of the framework within the application's bundle at "MyApp.app/ >> Contents/Frameworks" using a "Copy" build phase, as instructed in >> the docs. >> >> I have added the framework project to the application's project and >> pointed the build directory of the framework to the application's >> build directory. I made the framework "Product" a dependency of the >> app's project. >> >> The application still cannot find the framework. >> >> Using "otool -L" on both the application binary and the framework >> binary, they both show "/Library/Frameworks" as my framework's >> location. >> >> I know I'm just being boneheaded and am missing something basic or >> obvious. >> >> Would some kind soul please point out the error of my ways to me? :-) >> >> Thanks, >> >> -- Mark >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > > > > > >- Johannes Huning. > > > > > > From amaxwell at mac.com Wed Apr 2 08:53:23 2008 From: amaxwell at mac.com (Adam R. Maxwell) Date: Wed Apr 2 08:53:35 2008 Subject: Collection callbacks and toll free bridging In-Reply-To: References: <45392A1F-E52B-4972-BC43-CEBD5FA2FA20@mac.com> Message-ID: <48D166F2-0118-1000-FEB6-BA85765981C6-Webmail-10017@mac.com> On Wednesday, April 02, 2008, at 08:06AM, "Christiaan Hofman" wrote: > >On 2 Apr 2008, at 4:45 PM, Adam R. Maxwell wrote: > >> >> On Apr 2, 2008, at 7:25 AM, Christiaan Hofman wrote: >>> Hi all, >>> >>> I have some questions about how toll free bridging handles >>> callbacks for collections. I've searched the docs but came out >>> empty. Basically I have the following 2 questions: >>> >>> 1. Are Cocoa accessors doing anything besides some checking and >>> wrapping CF functions? >>> 2. What callbacks are used by collections initialized using Cocoa? >>> >>> Let me make this a bit more explicit for the example of >>> CFMutableDictionaryRef/NSMutableDictionary. NSMutableDictionary is >>> documented to copy the keys. So a more concrete version of my >>> question is: are the keys copied by the Cocoa methods, or by the CF >>> key callbacks? >>> >>> Context: I need a dictionary for keys that do not conform to >>> NSCopying. So can I use just use CFDictionaryCreateMutable to >>> create the dictionary and then use Cocoa methods for the rest? >> >> No, NSMutableDictionary is weird about this. You must not use - >> setObject:forKey: because the copying is done in that method. Mike >> Ash pointed this out to me on cocoa-dev a couple of years ago: >> >> http://www.cocoabuilder.com/archive/message/cocoa/2006/5/13/163439 >> >> My bug report on this was duped to his, and the conclusion is that >> if you use setObject:forKey:, it will create a copy of your key, >> then invoke your custom callbacks /on the copy/: >> >> http://www.cocoabuilder.com/archive/message/cocoa/2006/7/10/167259 >> >> Once you've used CFDictionaryAddValue, you can safely use >> objectForKey: and other Cocoa methods, though. I still think the >> setObject:forKey: behavior is wrong, but at least I can avoid it. >> >> -- >> adam > >Thanks Adam. Now my question was general, and this is just a specific >example. Ah, okay; sounded as if you were interested in NSMutableDictionary in particular. > Does anyone know the general story for any collection? Or is >the general story that I cannot trust toll free bridging for anything? Only Apple knows, and I think all you'll get out of them is weasel words like the response to Mike's bug:). Within that reply, though, it sounds as if custom callbacks are guaranteed to be invoked and other behavior will be documented. NSSet is documented as retaining its keys instead of copying, so it works as expected. Likewise NSArray. OTOH, even with custom callbacks, I wouldn't try passing e.g. an int to -[NSMutableArray addObject:]; it feels safer to use CFArray functions for that. If you get a better response, please let me know! I'm pretty disillusioned with toll-free bridging since it's not quite as transparent as the docs indicate. -- adam From cmhofman at gmail.com Wed Apr 2 09:24:57 2008 From: cmhofman at gmail.com (Christiaan Hofman) Date: Wed Apr 2 09:25:07 2008 Subject: Collection callbacks and toll free bridging In-Reply-To: <48D166F2-0118-1000-FEB6-BA85765981C6-Webmail-10017@mac.com> References: <45392A1F-E52B-4972-BC43-CEBD5FA2FA20@mac.com> <48D166F2-0118-1000-FEB6-BA85765981C6-Webmail-10017@mac.com> Message-ID: On 2 Apr 2008, at 5:53 PM, Adam R. Maxwell wrote: > > On Wednesday, April 02, 2008, at 08:06AM, "Christiaan Hofman" > wrote: >> >> On 2 Apr 2008, at 4:45 PM, Adam R. Maxwell wrote: >> >>> >>> On Apr 2, 2008, at 7:25 AM, Christiaan Hofman wrote: >>>> Hi all, >>>> >>>> I have some questions about how toll free bridging handles >>>> callbacks for collections. I've searched the docs but came out >>>> empty. Basically I have the following 2 questions: >>>> >>>> 1. Are Cocoa accessors doing anything besides some checking and >>>> wrapping CF functions? >>>> 2. What callbacks are used by collections initialized using Cocoa? >>>> >>>> Let me make this a bit more explicit for the example of >>>> CFMutableDictionaryRef/NSMutableDictionary. NSMutableDictionary is >>>> documented to copy the keys. So a more concrete version of my >>>> question is: are the keys copied by the Cocoa methods, or by the CF >>>> key callbacks? >>>> >>>> Context: I need a dictionary for keys that do not conform to >>>> NSCopying. So can I use just use CFDictionaryCreateMutable to >>>> create the dictionary and then use Cocoa methods for the rest? >>> >>> No, NSMutableDictionary is weird about this. You must not use - >>> setObject:forKey: because the copying is done in that method. Mike >>> Ash pointed this out to me on cocoa-dev a couple of years ago: >>> >>> http://www.cocoabuilder.com/archive/message/cocoa/2006/5/13/163439 >>> >>> My bug report on this was duped to his, and the conclusion is that >>> if you use setObject:forKey:, it will create a copy of your key, >>> then invoke your custom callbacks /on the copy/: >>> >>> http://www.cocoabuilder.com/archive/message/cocoa/2006/7/10/167259 >>> >>> Once you've used CFDictionaryAddValue, you can safely use >>> objectForKey: and other Cocoa methods, though. I still think the >>> setObject:forKey: behavior is wrong, but at least I can avoid it. >>> >>> -- >>> adam >> >> Thanks Adam. Now my question was general, and this is just a specific >> example. > > Ah, okay; sounded as if you were interested in NSMutableDictionary > in particular. That was indeed the reason I asked it. But then I started wondering about the general situation. > > >> Does anyone know the general story for any collection? Or is >> the general story that I cannot trust toll free bridging for >> anything? > > Only Apple knows, and I think all you'll get out of them is weasel > words like the response to Mike's bug:). Within that reply, > though, it sounds as if custom callbacks are guaranteed to be > invoked and other behavior will be documented. NSSet is documented > as retaining its keys instead of copying, so it works as expected. Though the docs also say that Cocoa collections compare objects using isEqual:, even though custom callbacks for equality do seem to work. So that description is not completely correct (documentation bug?). > Likewise NSArray. OTOH, even with custom callbacks, I wouldn't try > passing e.g. an int to -[NSMutableArray addObject:]; it feels safer > to use CFArray functions for that. > That's right, in fact it *does* fail, because it checks for nil values . So it raises an exception when you add a zero int, while CFArrayAddValue has no problem adding a zero int. > If you get a better response, please let me know! I'm pretty > disillusioned with toll-free bridging since it's not quite as > transparent as the docs indicate. > > -- > adam That's what I thought. In fact, even though Apple thinks the behavior is correct, I do think it's at least a documentation bug because of this, because the docs suggest toll free bridging is much less involved than it actually is. I'll file a bug report on this. Christiaan From macosxdevlist at personal.fishh2o.com Wed Apr 2 22:47:53 2008 From: macosxdevlist at personal.fishh2o.com (SD) Date: Wed Apr 2 23:48:56 2008 Subject: NSView Add Message-ID: I have an NSView in my nib that I want to add to a NSBox that is in a visible window, how do I do that. Then later I want to remove/replace the NSView in the NSBox, how do I do that. I tried this but it isn't working: [m_advancedEditingBox addSubview:m_sourceEditingView]; Thanx in advance. SD. -- ========================================== SD WARNING: Programming may be habit forming. From dvfuentes at experienceis.com Thu Apr 3 02:19:01 2008 From: dvfuentes at experienceis.com (davicente) Date: Thu Apr 3 02:19:05 2008 Subject: iPhone SDK In-Reply-To: References: Message-ID: <16467341.post@talk.nabble.com> Anybody knows if it is posible to install de SDK in linux, or only in an Intel-based Mac. Thank you. Regards. Jon Gotow wrote: > > At 5:19 PM +0100 3/29/08, Andreas H?schler wrote: >>Hi all, >> >>I just upgraded from MacOSX 10.2.8 to 10.5.2 in >>order to install the iPhone SDK (PowerPC >>MiniMac). The SDK is installed and xCode is >>available. However, something seems to be >>missing. I do not find anything iPhone related >>in xCode. Shouldn't "New Project" also offer >>iPhone application? I can select Cocoa >>application, Carbon application,... but nothing >>iPhone related. What am I missing? > > The SDK requires an Intel-based Mac. It's stated > in the system requirements somewhere. > > - Jon > > -- > ________________________________________________________________________ > Jon Gotow gotow@stclairsoft.com > St. Clair Software http://www.stclairsoft.com/ > Fax (540)552-5898 ftp://ftp.stclairsoft.com/ > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > -- View this message in context: http://www.nabble.com/iPhone-SDK-tp16371703p16467341.html Sent from the OmniGroup - MacOSX-Dev mailing list archive at Nabble.com. From rob at menumachine.com Thu Apr 3 05:49:16 2008 From: rob at menumachine.com (Rob Keniger) Date: Thu Apr 3 05:56:02 2008 Subject: iPhone SDK In-Reply-To: <16467341.post@talk.nabble.com> References: <16467341.post@talk.nabble.com> Message-ID: <1EA3224C-9B66-495D-8593-2E9202E6EE4D@menumachine.com> On 03/04/2008, at 7:19 PM, davicente wrote: > Anybody knows if it is posible to install de SDK in linux, or only > in an > Intel-based Mac. Definitely not. But what about "you can't talk about the iPhone SDK because it's under NDA" don't you understand? -- Rob Keniger From christianedwardgruber at gmail.com Thu Apr 3 06:16:41 2008 From: christianedwardgruber at gmail.com (Christian Edward Gruber) Date: Thu Apr 3 06:16:47 2008 Subject: iPhone SDK In-Reply-To: <1EA3224C-9B66-495D-8593-2E9202E6EE4D@menumachine.com> References: <16467341.post@talk.nabble.com> <1EA3224C-9B66-495D-8593-2E9202E6EE4D@menumachine.com> Message-ID: <290E2CA0-3618-419C-BCF2-9131C8ECCF12@gmail.com> This isn't under the NDA, as it's public knowledge. The official platform for development for the iPhone SDK is the Mac-Intel platform. If it is possible to install under another OS, it would only be with substantial hacking, emulation, or virtualization. The NDA doesn't say "don't talk about it" it says "don't reveal protected information". Under law, (and every NDA I have ever read) information you can get from another source that isn't breaking an NDA is public knowledge. The information above was easily obtained from the public Apple Event to announce the iPhone SDK. regards, Christian. On 3-Apr-08, at 08:49 , Rob Keniger wrote: > > On 03/04/2008, at 7:19 PM, davicente wrote: >> Anybody knows if it is posible to install de SDK in linux, or only >> in an >> Intel-based Mac. > > Definitely not. > > But what about "you can't talk about the iPhone SDK because it's > under NDA" don't you understand? > > -- > Rob Keniger > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From lattam at mac.com Thu Apr 3 06:17:46 2008 From: lattam at mac.com (Michael Latta) Date: Thu Apr 3 06:17:54 2008 Subject: iPhone SDK In-Reply-To: <1EA3224C-9B66-495D-8593-2E9202E6EE4D@menumachine.com> References: <16467341.post@talk.nabble.com> <1EA3224C-9B66-495D-8593-2E9202E6EE4D@menumachine.com> Message-ID: <40964AE5-0597-4BB3-B599-E17E7D86452D@mac.com> The system requirements are public knowledge on apple's web site. On Apr 3, 2008, at 8:49 AM, Rob Keniger wrote: > > On 03/04/2008, at 7:19 PM, davicente wrote: >> Anybody knows if it is posible to install de SDK in linux, or only >> in an >> Intel-based Mac. > > Definitely not. > > But what about "you can't talk about the iPhone SDK because it's > under NDA" don't you understand? > > -- > Rob Keniger > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From christianedwardgruber at gmail.com Thu Apr 3 06:18:33 2008 From: christianedwardgruber at gmail.com (Christian Edward Gruber) Date: Thu Apr 3 06:18:38 2008 Subject: iPhone SDK In-Reply-To: <40964AE5-0597-4BB3-B599-E17E7D86452D@mac.com> References: <16467341.post@talk.nabble.com> <1EA3224C-9B66-495D-8593-2E9202E6EE4D@menumachine.com> <40964AE5-0597-4BB3-B599-E17E7D86452D@mac.com> Message-ID: And here: http://en.wikipedia.org/wiki/IPhone_SDK Christian. On 3-Apr-08, at 09:17 , Michael Latta wrote: > The system requirements are public knowledge on apple's web site. > > > On Apr 3, 2008, at 8:49 AM, Rob Keniger wrote: > >> >> On 03/04/2008, at 7:19 PM, davicente wrote: >>> Anybody knows if it is posible to install de SDK in linux, or only >>> in an >>> Intel-based Mac. >> >> Definitely not. >> >> But what about "you can't talk about the iPhone SDK because it's >> under NDA" don't you understand? >> >> -- >> Rob Keniger >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From mikevann at gmail.com Thu Apr 3 06:21:38 2008 From: mikevann at gmail.com (Michael Vannorsdel) Date: Thu Apr 3 06:21:44 2008 Subject: iPhone SDK In-Reply-To: <16467341.post@talk.nabble.com> References: <16467341.post@talk.nabble.com> Message-ID: <2D452DDC-7E68-4DBF-8A6C-5B527D243F75@gmail.com> No it requires the Apple developer tools to use. And before the NDA police start barking again, I'm not bound to the iPhone SDK NDA and the answer is public information. On Apr 3, 2008, at 3:19 AM, davicente wrote: > Anybody knows if it is posible to install de SDK in linux, or only > in an > Intel-based Mac. From christianedwardgruber at gmail.com Thu Apr 3 06:23:36 2008 From: christianedwardgruber at gmail.com (Christian Edward Gruber) Date: Thu Apr 3 06:23:42 2008 Subject: iPhone SDK In-Reply-To: <2D452DDC-7E68-4DBF-8A6C-5B527D243F75@gmail.com> References: <16467341.post@talk.nabble.com> <2D452DDC-7E68-4DBF-8A6C-5B527D243F75@gmail.com> Message-ID: <2047747A-10E2-4705-8AB0-399F02B4230A@gmail.com> By the way, sorry - I said Mac-Intel only, earlier... I had forgotten that PowerPC is now supported. But MacOS X is required. Christian. On 3-Apr-08, at 09:21 , Michael Vannorsdel wrote: > No it requires the Apple developer tools to use. And before the NDA > police start barking again, I'm not bound to the iPhone SDK NDA and > the answer is public information. > > > On Apr 3, 2008, at 3:19 AM, davicente wrote: > >> Anybody knows if it is posible to install de SDK in linux, or only >> in an >> Intel-based Mac. > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From dvfuentes at experienceis.com Thu Apr 3 06:49:59 2008 From: dvfuentes at experienceis.com (David Vicente) Date: Thu Apr 3 06:56:49 2008 Subject: iPhone SDK In-Reply-To: <2047747A-10E2-4705-8AB0-399F02B4230A@gmail.com> References: <16467341.post@talk.nabble.com> <2D452DDC-7E68-4DBF-8A6C-5B527D243F75@gmail.com> <2047747A-10E2-4705-8AB0-399F02B4230A@gmail.com> Message-ID: <47F4E087.6090607@experienceis.com> Thanks to all answer. I have installed the SDK in a Leopard and I have some problem to build a simple HelloWorld. But I supose to ask about it is against the NDA public. Thanks again. Christian Edward Gruber escribi?: > By the way, sorry - I said Mac-Intel only, earlier... I had forgotten > that PowerPC is now supported. But MacOS X is required. > > Christian. > > On 3-Apr-08, at 09:21 , Michael Vannorsdel wrote: >> No it requires the Apple developer tools to use. And before the NDA >> police start barking again, I'm not bound to the iPhone SDK NDA and >> the answer is public information. >> >> >> On Apr 3, 2008, at 3:19 AM, davicente wrote: >> >>> Anybody knows if it is posible to install de SDK in linux, or only >>> in an >>> Intel-based Mac. >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > > From pelorus at mac.com Thu Apr 3 07:29:31 2008 From: pelorus at mac.com (Matt Johnston) Date: Thu Apr 3 07:31:13 2008 Subject: iPhone SDK In-Reply-To: <47F4E087.6090607@experienceis.com> References: <16467341.post@talk.nabble.com> <2D452DDC-7E68-4DBF-8A6C-5B527D243F75@gmail.com> <2047747A-10E2-4705-8AB0-399F02B4230A@gmail.com> <47F4E087.6090607@experienceis.com> Message-ID: <174FA503-76E9-42A1-BFA3-DF873933BF5D@mac.com> David, Apple's developer docs and videos cover a lot of topics to get you started. I have no previous objC/mac dev experience and I found reading the Docs to be very useful. -- Matt Johnston - 07515352971 On 3 Apr 2008, at 14:49, David Vicente wrote: > Thanks to all answer. I have installed the SDK in a Leopard and I > have some problem to build a simple HelloWorld. But I supose to ask > about it is against the NDA public. > Thanks again. > > > Christian Edward Gruber escribi?: >> By the way, sorry - I said Mac-Intel only, earlier... I had >> forgotten that PowerPC is now supported. But MacOS X is required. >> >> Christian. >> >> On 3-Apr-08, at 09:21 , Michael Vannorsdel wrote: >>> No it requires the Apple developer tools to use. And before the >>> NDA police start barking again, I'm not bound to the iPhone SDK >>> NDA and the answer is public information. >>> >>> >>> On Apr 3, 2008, at 3:19 AM, davicente wrote: >>> >>>> Anybody knows if it is posible to install de SDK in linux, or >>>> only in an >>>> Intel-based Mac. >>> >>> _______________________________________________ >>> MacOSX-dev mailing list >>> MacOSX-dev@omnigroup.com >>> http://www.omnigroup.com/mailman/listinfo/macosx-dev >> >> _______________________________________________ >> MacOSX-dev mailing list >> MacOSX-dev@omnigroup.com >> http://www.omnigroup.com/mailman/listinfo/macosx-dev >> >> > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From macosxdevlist at personal.fishh2o.com Thu Apr 3 21:23:16 2008 From: macosxdevlist at personal.fishh2o.com (SD) Date: Thu Apr 3 21:23:26 2008 Subject: NSView Add In-Reply-To: References: Message-ID: I figured this out, for future generations here's the NSView category I made to handle this: If you are only using 10.5 or later, then [NSView setSubviews] might work for you. -------- @interface NSView (NSViewMoveInView) + (void)moveInViewChildren:(NSView*)movingIn toView:(NSView*)toView; @end -------- @implementation NSView (NSViewMoveInView) static NSMutableArray *s_currentlyMovedInViewsKeys = nil; static NSMutableArray *s_currentlyMovedInViews = nil; + (void)moveInViewChildrenHelper:(NSView*)movingIn toView:(NSView*)toView { NSArray *subviews = [NSArray arrayWithArray:[movingIn subviews]]; NSEnumerator *subviewsEnum = [subviews objectEnumerator]; NSView *curSubView = nil; while(curSubView = [subviewsEnum nextObject]) { [curSubView retain]; [curSubView removeFromSuperview]; [toView addSubview:curSubView]; [curSubView release]; } } + (void)moveInViewChildren:(NSView*)movingIn toView:(NSView*)toView { IFDEBUG(NSLog(@"[ComDermanSyncEmPrefsPaneController moveInViewChildren]");) if(s_currentlyMovedInViewsKeys == nil) { s_currentlyMovedInViewsKeys = [[NSMutableArray alloc] init]; s_currentlyMovedInViews = [[NSMutableArray alloc] init]; } //move out the currently moved in stuff unsigned index = [s_currentlyMovedInViewsKeys indexOfObject:toView]; NSView *movedInView = (index == NSNotFound ? nil : [s_currentlyMovedInViews objectAtIndex:index]); if(index != NSNotFound) { [s_currentlyMovedInViewsKeys removeObjectAtIndex:index]; [s_currentlyMovedInViews removeObjectAtIndex:index]; } if(movedInView != nil && movedInView != movingIn) { [NSView moveInViewChildrenHelper:toView toView:movedInView]; } if(movedInView != movingIn) { [NSView moveInViewChildrenHelper:movingIn toView:toView]; [toView setNeedsDisplay:YES]; } [s_currentlyMovedInViewsKeys addObject:toView]; [s_currentlyMovedInViews addObject:movingIn]; } @end -------- SD ______________________________________________________________________ Previous message from SD on 4/2/08 at 10:47 PM -0700 ********************************************************************** >I have an NSView in my nib that I want to add to a NSBox that is in >a visible window, how do I do that. > >Then later I want to remove/replace the NSView in the NSBox, how do I do that. > >I tried this but it isn't working: >[m_advancedEditingBox addSubview:m_sourceEditingView]; > > >Thanx in advance. > >SD. -- ========================================== SD WARNING: Programming may be habit forming. From jajati_sahu at persistent.co.in Thu Apr 3 23:29:31 2008 From: jajati_sahu at persistent.co.in (Jajati Sahu) Date: Thu Apr 3 23:54:12 2008 Subject: Parsing output of "system_profiler" command Message-ID: <008b01c8961d$41e27fc0$87ad10ac@persistent.co.in> Hi, In my perl file, I am using "/usr/sbin/system_profiler -xml" command to get the system information. The output is stored in a variable say $output. Now I want to parse $output and edit a nested value. Is there any specific way to do this? And which type of string $output contains. Is it normal perl string or XML string or what? Thanks Keshari From alastair at alastairs-place.net Fri Apr 4 04:38:01 2008 From: alastair at alastairs-place.net (Alastair Houghton) Date: Fri Apr 4 04:38:06 2008 Subject: iPhone SDK In-Reply-To: <47F4E087.6090607@experienceis.com> References: <16467341.post@talk.nabble.com> <2D452DDC-7E68-4DBF-8A6C-5B527D243F75@gmail.com> <2047747A-10E2-4705-8AB0-399F02B4230A@gmail.com> <47F4E087.6090607@experienceis.com> Message-ID: On 3 Apr 2008, at 14:49, David Vicente wrote: > Thanks to all answer. I have installed the SDK in a Leopard and I > have some problem to build a simple HelloWorld. But I supose to ask > about it is against the NDA public. You can ask Apple. There are a number of addresses on that you can use. Kind regards, Alastair. -- http://alastairs-place.net From mikevann at gmail.com Fri Apr 4 07:15:56 2008 From: mikevann at gmail.com (Michael Vannorsdel) Date: Fri Apr 4 07:16:05 2008 Subject: Linker issues with -fprofile-generate Message-ID: <39777A11-B600-4D3A-A8B1-CA0E93CEFEF3@gmail.com> I'm trying to compile with -fprofile-generate but I keep getting linker errors for missing symbols such as _close$UNIX2003, _open $UNIX2003. Any ideas what's causing this? From mikevann at gmail.com Fri Apr 4 13:20:38 2008 From: mikevann at gmail.com (Michael Vannorsdel) Date: Fri Apr 4 13:20:45 2008 Subject: Function aliasing (was Feedback-Directed Optimization problem) Message-ID: <3F3298F6-508C-49A6-AFE9-E92D19E1133C@gmail.com> I ran into a problem with missing symbols like _close$UNIX2003 and discovered it was an error with libgcov and linking with 10.4SDK. So to solve it I've been trying to make symbol aliases passing -alias _close _close$UNIX2003 or putting int close$UNIX2003(int d) __DARWIN_ALIAS(close) in the source but none seem to work. Is there a proper way to do this? From macosxdevlist at personal.fishh2o.com Fri Apr 4 18:59:38 2008 From: macosxdevlist at personal.fishh2o.com (SD) Date: Fri Apr 4 19:00:47 2008 Subject: Objective-C wait/notify? Message-ID: I have an application that is using Cocoa/Objective-C, how do I make a thread wait until something happens on another thread without resorting to polling. I don't want the function to exit until some state in the class changes. ie: in Java I would use the wait/notify mechanisms. Thanx again. SD. -- ========================================== SD WARNING: Programming may be habit forming. From mikevann at gmail.com Fri Apr 4 19:02:21 2008 From: mikevann at gmail.com (Michael Vannorsdel) Date: Fri Apr 4 19:02:27 2008 Subject: Objective-C wait/notify? In-Reply-To: References: Message-ID: Checkout pthread_cond_wait and pthread_cond_signal. On Apr 4, 2008, at 7:59 PM, SD wrote: > I have an application that is using Cocoa/Objective-C, how do I make > a thread wait until something happens on another thread without > resorting to polling. I don't want the function to exit until some > state in the class changes. > > ie: in Java I would use the wait/notify mechanisms. From glen.simmons at gmail.com Fri Apr 4 19:31:48 2008 From: glen.simmons at gmail.com (Glen Simmons) Date: Fri Apr 4 19:31:55 2008 Subject: Objective-C wait/notify? In-Reply-To: References: Message-ID: <9AC34E62-92FC-4B76-A0FB-5DFA074B4298@gmail.com> Or, if you'd prefer something a bit higher level and in the Cocoa world, take a look at NSLock and friends. On Apr 4, 2008, at 9:02 PM, Michael Vannorsdel wrote: > Checkout pthread_cond_wait and pthread_cond_signal. > > > On Apr 4, 2008, at 7:59 PM, SD wrote: > >> I have an application that is using Cocoa/Objective-C, how do I >> make a thread wait until something happens on another thread >> without resorting to polling. I don't want the function to exit >> until some state in the class changes. >> >> ie: in Java I would use the wait/notify mechanisms. > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From mikevann at gmail.com Fri Apr 4 20:32:20 2008 From: mikevann at gmail.com (Michael Vannorsdel) Date: Fri Apr 4 20:32:26 2008 Subject: Objective-C wait/notify? In-Reply-To: <9AC34E62-92FC-4B76-A0FB-5DFA074B4298@gmail.com> References: <9AC34E62-92FC-4B76-A0FB-5DFA074B4298@gmail.com> Message-ID: <20EE05B5-A635-49A2-9BD5-4425CF4CDF13@gmail.com> Specifically NSConditionLock or NSCondition. On Apr 4, 2008, at 8:31 PM, Glen Simmons wrote: > Or, if you'd prefer something a bit higher level and in the Cocoa > world, take a look at NSLock and friends. From Aya at animes.de Mon Apr 7 14:11:56 2008 From: Aya at animes.de (Aya Koshigaya) Date: Mon Apr 7 14:43:42 2008 Subject: OpenGL without GLUT? Message-ID: <61795EC7-C11E-41A5-9C68-93BF17428D14@animes.de> Hi, I'd like to create an OpenGL-Window from within C++ without using glut... can anyone tell me how I can do this? I absolutly find nothing in the internet... looks as if anyone is using glut or ObjectiveC/Carbon.. But I'd like to do it in a good old c++ way.. Aya~ From clarkcox3 at gmail.com Mon Apr 7 15:53:45 2008 From: clarkcox3 at gmail.com (Clark Cox) Date: Mon Apr 7 15:53:51 2008 Subject: OpenGL without GLUT? In-Reply-To: <61795EC7-C11E-41A5-9C68-93BF17428D14@animes.de> References: <61795EC7-C11E-41A5-9C68-93BF17428D14@animes.de> Message-ID: On Mon, Apr 7, 2008 at 2:11 PM, Aya Koshigaya wrote: > Hi, > > I'd like to create an OpenGL-Window from within C++ without using glut... > can anyone tell me how I can do this? > I absolutly find nothing in the internet... looks as if anyone is using > glut or ObjectiveC/Carbon.. > > But I'd like to do it in a good old c++ way.. C++, by itself, has no concept of windows or OpenGL, so there really isn't a "good old C++ way". You will have to use *some* library to put up the window into which OpenGL will draw; basically, your choices on the Mac boil down to GLUT, Cocoa or Carbon. Any of these solutions can be used with C++ OpenGL code. You can find more information about the Cocoa and Carbon interfaces to OpenGL at: -- Clark S. Cox III clarkcox3@gmail.com From angele.bert at free.fr Mon Apr 7 23:41:10 2008 From: angele.bert at free.fr (=?ISO-8859-1?Q?Ang=E8le_Bert?=) Date: Mon Apr 7 23:57:14 2008 Subject: OpenGL without GLUT? In-Reply-To: References: <61795EC7-C11E-41A5-9C68-93BF17428D14@animes.de> Message-ID: Le 8 avr. 08 ? 00:53, Clark Cox a ?crit : > On Mon, Apr 7, 2008 at 2:11 PM, Aya Koshigaya wrote: >> Hi, >> >> I'd like to create an OpenGL-Window from within C++ without using >> glut... >> can anyone tell me how I can do this? >> I absolutly find nothing in the internet... looks as if anyone is >> using >> glut or ObjectiveC/Carbon.. >> >> But I'd like to do it in a good old c++ way.. > > C++, by itself, has no concept of windows or OpenGL, so there really > isn't a "good old C++ way". You will have to use *some* library to put > up the window into which OpenGL will draw; basically, your choices on > the Mac boil down to GLUT, Cocoa or Carbon. > > Any of these solutions can be used with C++ OpenGL code. > > You can find more information about the Cocoa and Carbon interfaces to > OpenGL at: > > Don't forget that GLUT (UNIX and LINUX) is just a library built "on" GLX (agl on macos) and X11 (aqua on macos). The most classical and older way to create OpenGL-windows is to use GLX (that uses X11). GLUT is a way to considerably simplify the use and the definition of windows into UNIX and LINUX applications ... application | ----------------------------------- | | | | GLU GUT | | | | --------- --------------------------- | | | | Opengl <-> (GLX) agl <-> (X11) aqua | | --------------------------------------------------------- Drivers --------------------------------------------------------- hardware --------------------------------------------------------- Hope this helps ... Ang?le From clarkcox3 at gmail.com Tue Apr 8 08:43:06 2008 From: clarkcox3 at gmail.com (Clark Cox) Date: Tue Apr 8 08:43:10 2008 Subject: OpenGL without GLUT? In-Reply-To: References: <61795EC7-C11E-41A5-9C68-93BF17428D14@animes.de> Message-ID: A few points: 1) GLUT is not built on AGL on the Mac, it is built on Cocoa, however, that is largely irrelevant as GLUT is meant to shield you from those implementation details. 2) I would not recommend writing an X11 application on the Mac if it can be avoided. 3) The document I linked ( or ), you will see a much more accurate representation of the information presented in your ASCII art figure. Essentially, the OP will want to use CGL or NSOpenGLView from a Cocoa application or CGL from a Carbon application. On Mon, Apr 7, 2008 at 11:41 PM, Ang?le Bert wrote: > > Le 8 avr. 08 ? 00:53, Clark Cox a ?crit : > > > On Mon, Apr 7, 2008 at 2:11 PM, Aya Koshigaya wrote: > > > > > Hi, > > > > > > I'd like to create an OpenGL-Window from within C++ without using > glut... > > > can anyone tell me how I can do this? > > > I absolutly find nothing in the internet... looks as if anyone is using > > > glut or ObjectiveC/Carbon.. > > > > > > But I'd like to do it in a good old c++ way.. > > > > > > > C++, by itself, has no concept of windows or OpenGL, so there really > > isn't a "good old C++ way". You will have to use *some* library to put > > up the window into which OpenGL will draw; basically, your choices on > > the Mac boil down to GLUT, Cocoa or Carbon. > > > > Any of these solutions can be used with C++ OpenGL code. > > > > You can find more information about the Cocoa and Carbon interfaces to > > OpenGL at: > > > > > > > Don't forget that GLUT (UNIX and LINUX) is just a library built "on" GLX > (agl on macos) and X11 (aqua on macos). > The most classical and older way to create OpenGL-windows is to use GLX > (that uses X11). > GLUT is a way to considerably simplify the use and the definition of > windows into UNIX and LINUX applications ... > > application > | > ----------------------------------- > | | | > | GLU GUT > | | | > | --------- --------------------------- > | | | | > Opengl <-> (GLX) agl <-> (X11) aqua > | | > --------------------------------------------------------- > Drivers > --------------------------------------------------------- > hardware > --------------------------------------------------------- > > Hope this helps ... > > Ang?le > > > > > > > -- Clark S. Cox III clarkcox3@gmail.com From mailinglists at bjoernknafla.de Tue Apr 8 09:12:40 2008 From: mailinglists at bjoernknafla.de (Bjoern Knafla) Date: Tue Apr 8 09:17:51 2008 Subject: OpenGL without GLUT? In-Reply-To: <61795EC7-C11E-41A5-9C68-93BF17428D14@animes.de> References: <61795EC7-C11E-41A5-9C68-93BF17428D14@animes.de> Message-ID: <13BE6098-E13F-4471-A0EB-B378BA9C83DB@bjoernknafla.de> On 07.04.2008, at 23:11, Aya Koshigaya wrote: > Hi, > > I'd like to create an OpenGL-Window from within C++ without using > glut... can anyone tell me how I can do this? > I absolutly find nothing in the internet... looks as if anyone is > using glut or ObjectiveC/Carbon.. > > But I'd like to do it in a good old c++ way.. If you don't want to use glut because you loose direct control over the main rendering loop and you don't want to delve into Cocoa or Carbon you might be interested in the SDL library ( www.libsdl.org ) which wraps Cocoa behind a C interface for you but gives you a lot of control how to structure your app (though you can only use one OpenGL display context as far as I know...). Cheers, Bjoern From sherm.pendley at gmail.com Tue Apr 8 10:13:46 2008 From: sherm.pendley at gmail.com (Sherm Pendley) Date: Tue Apr 8 10:13:55 2008 Subject: OpenGL without GLUT? In-Reply-To: References: <61795EC7-C11E-41A5-9C68-93BF17428D14@animes.de> Message-ID: On Tue, Apr 8, 2008 at 11:43 AM, Clark Cox wrote: > 2) I would not recommend writing an X11 application on the Mac if it can > be avoided. I'm not certain how to take that. Obviously, an X11 app won't be well-received by an audience of Mac users who want a "real" Mac app. If that's what you're saying, I second the recommendation. :-) On the other hand, let's say you've decided to support both native Mac and X11 interfaces for your app. Are you saying that it wouldn't be a good idea to write the X11 version on the Mac also? If so, why not? Seems to me that Apple wouldn't have included an X11 SDK if they didn't intend it to be used... sherm-- From clarkcox3 at gmail.com Tue Apr 8 10:38:48 2008 From: clarkcox3 at gmail.com (Clark Cox) Date: Tue Apr 8 10:38:54 2008 Subject: OpenGL without GLUT? In-Reply-To: References: <61795EC7-C11E-41A5-9C68-93BF17428D14@animes.de> Message-ID: On Tue, Apr 8, 2008 at 10:13 AM, Sherm Pendley wrote: > On Tue, Apr 8, 2008 at 11:43 AM, Clark Cox wrote: > > > 2) I would not recommend writing an X11 application on the Mac if it can > be avoided. > > I'm not certain how to take that. Obviously, an X11 app won't be > well-received by an audience of Mac users who want a "real" Mac app. If > that's what you're saying, I second the recommendation. :-) This is precisely what I was saying. Perhaps I should have worded it differently. X11 is great for what it does, but X11 apps on the Mac always feel a bit off. > On the other hand, let's say you've decided to support both native Mac and > X11 interfaces for your app. Are you saying that it wouldn't be a good idea > to write the X11 version on the Mac also? Not at all; if one has committed to writing an X11 app, then by all means, do so on a Mac. > If so, why not? Seems to me that > Apple wouldn't have included an X11 SDK if they didn't intend it to be > used... Indeed. -- Clark S. Cox III clarkcox3@gmail.com From akio0911 at gmail.com Sat Apr 12 01:48:07 2008 From: akio0911 at gmail.com (Shingo Satou) Date: Sat Apr 12 01:48:10 2008 Subject: multiple methods named '-position' found Message-ID: Hi Guys, I wrote the following programs. -(void)changeSelectedIndex:(NSInteger)theSelectedIndex { selectedIndex=theSelectedIndex; if (selectedIndex == [names count]) selectedIndex=[names count]-1; if (selectedIndex < 0) selectedIndex=0; selectionLayer.position = [[[menusLayer sublayers] objectAtIndex:selectedIndex] position]; }; When I Bild it, the following errors are output. /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: warning: multiple methods named '-position' found /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSScriptObjectSpecifiers.h:191: warning: using '-(NSInsertionPosition)position' /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:598: warning: also found '-(CGPoint)position' /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: error: incompatible type for argument 1 of 'setPosition:' /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: warning: multiple methods named '-position' found /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSScriptObjectSpecifiers.h:191: warning: using '-(NSInsertionPosition)position' /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:598: warning: also found '-(CGPoint)position' /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: error: incompatible type for argument 1 of 'setPosition:' I appreciate any help. akio From cmhofman at gmail.com Sat Apr 12 02:33:27 2008 From: cmhofman at gmail.com (Christiaan Hofman) Date: Sat Apr 12 02:33:34 2008 Subject: multiple methods named '-position' found In-Reply-To: References: Message-ID: On 12 Apr 2008, at 10:48 AM, Shingo Satou wrote: > Hi Guys, > > I wrote the following programs. > > -(void)changeSelectedIndex:(NSInteger)theSelectedIndex > { > selectedIndex=theSelectedIndex; > > if (selectedIndex == [names count]) selectedIndex=[names count]-1; > if (selectedIndex < 0) selectedIndex=0; > > selectionLayer.position = [[[menusLayer sublayers] > objectAtIndex:selectedIndex] position]; > }; > > When I Bild it, the following errors are output. > > /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: warning: > multiple methods named '-position' found > /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ > Foundation.framework/Headers/NSScriptObjectSpecifiers.h:191: > warning: using '-(NSInsertionPosition)position' > /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ > QuartzCore.framework/Headers/CALayer.h:598: > warning: also found '-(CGPoint)position' > /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: error: > incompatible type for argument 1 of 'setPosition:' > /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: warning: > multiple methods named '-position' found > /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ > Foundation.framework/Headers/NSScriptObjectSpecifiers.h:191: > warning: using '-(NSInsertionPosition)position' > /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/ > QuartzCore.framework/Headers/CALayer.h:598: > warning: also found '-(CGPoint)position' > /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: error: > incompatible type for argument 1 of 'setPosition:' > > I appreciate any help. > > > akio As the warnings say: there are several position accessors in the frameworks, and the compiler does not know which one to use. To avoid this warning you should type the selectionLayer, as in [(CALayer) [[menusLayer sublayers] objectAtIndex:selectedIndex] position] Christiaan From akio0911 at gmail.com Sat Apr 12 10:15:11 2008 From: akio0911 at gmail.com (Shingo Satou) Date: Sat Apr 12 10:15:17 2008 Subject: multiple methods named '-position' found In-Reply-To: References: Message-ID: I corrected the code as follows. selectionLayer.position = [ (CALayer*)[[menusLayer sublayers] objectAtIndex:selectedIndex] position]; Warning was not displayed. Tyank you very mach. On Sat, Apr 12, 2008 at 6:33 PM, Christiaan Hofman wrote: > > > On 12 Apr 2008, at 10:48 AM, Shingo Satou wrote: > > > > Hi Guys, > > > > I wrote the following programs. > > > > -(void)changeSelectedIndex:(NSInteger)theSelectedIndex > > { > > selectedIndex=theSelectedIndex; > > > > if (selectedIndex == [names count]) selectedIndex=[names count]-1; > > if (selectedIndex < 0) selectedIndex=0; > > > > selectionLayer.position = [[[menusLayer sublayers] > > objectAtIndex:selectedIndex] position]; > > }; > > > > When I Bild it, the following errors are output. > > > > /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: warning: > > multiple methods named '-position' found > > > /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSScriptObjectSpecifiers.h:191: > > warning: using '-(NSInsertionPosition)position' > > > /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:598: > > warning: also found '-(CGPoint)position' > > /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: error: > > incompatible type for argument 1 of 'setPosition:' > > /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: warning: > > multiple methods named '-position' found > > > /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSScriptObjectSpecifiers.h:191: > > warning: using '-(NSInsertionPosition)position' > > > /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/QuartzCore.framework/Headers/CALayer.h:598: > > warning: also found '-(CGPoint)position' > > /Users/user/Desktop/CoreAnimationMenu/MenuView.m:160: error: > > incompatible type for argument 1 of 'setPosition:' > > > > I appreciate any help. > > > > > > akio > > > > As the warnings say: there are several position accessors in the > frameworks, and the compiler does not know which one to use. To avoid this > warning you should type the selectionLayer, as in [(CALayer)[[menusLayer > sublayers] objectAtIndex:selectedIndex] position] > > Christiaan > > > From Aya at animes.de Sat Apr 12 17:58:53 2008 From: Aya at animes.de (Aya Koshigaya) Date: Sat Apr 12 17:59:10 2008 Subject: Retrieve Font-Filename by FontName/Style Message-ID: <162478CE-2E23-41F8-B6ED-8EF5BA819A5A@animes.de> Hi, I need to get the filename of a TTF-Font based on the Font-Name and it's style. Let's say I'd like to get "Arial".. the function should give me "/ Libray/Fonts/Arial.ttf" If I say "Arial in Bold" it should give me "/Library/Fonts/Arialb.ttf" The problem is, there should be a naming convention for any font like Fontname: Arial.ttf Italic: Ariali.ttf Bold: Arialb.ttf Italic + Bold: Arialib.ttf But, I can't be sure any font uses this naming convention... so, I hope there's a nice system-function for this.. :) Does anyone know one? Aya~ From georg.seifert at gmx.de Sun Apr 13 00:01:49 2008 From: georg.seifert at gmx.de (Georg Seifert) Date: Sun Apr 13 00:01:56 2008 Subject: Interface builder runs VERY slow Message-ID: <05571455-3DB8-4213-BE0C-6DF3E26298F2@gmx.de> Hello, I have serious problems with interface builder. It always uses 100% of CPU and is nearly unresponsive. It worked good till last week. I?m running it on PowerBook 1,6GHz with the latest Leopard updates. I tried restarting and deleting preferences. Does anyone has solved this problem? Thanks Georg From cmhofman at gmail.com Sun Apr 13 02:34:18 2008 From: cmhofman at gmail.com (Christiaan Hofman) Date: Sun Apr 13 02:34:28 2008 Subject: Retrieve Font-Filename by FontName/Style In-Reply-To: <162478CE-2E23-41F8-B6ED-8EF5BA819A5A@animes.de> References: <162478CE-2E23-41F8-B6ED-8EF5BA819A5A@animes.de> Message-ID: <1602A4F4-BCB8-4E8B-93B3-96D831D7E1CB@gmail.com> Certainly not through Cocoa. There are Carbon functions, but Apple seems to move font files completely out of sight, because they all are getting deprecated. E.g. FMGetFontContainer was deprecated on 10.5, and ATSFontGetFileSpecification is now deprecated on 10.5. I don't know of a replacement for these deprecated functions. Christiaan On 13 Apr 2008, at 2:58 AM, Aya Koshigaya wrote: > Hi, > > I need to get the filename of a TTF-Font based on the Font-Name and > it's style. > > Let's say I'd like to get "Arial".. the function should give me "/ > Libray/Fonts/Arial.ttf" > If I say "Arial in Bold" it should give me "/Library/Fonts/Arialb.ttf" > > The problem is, there should be a naming convention for any font like > > Fontname: Arial.ttf > Italic: Ariali.ttf > Bold: Arialb.ttf > Italic + Bold: Arialib.ttf > > But, I can't be sure any font uses this naming convention... so, I > hope there's a nice system-function for this.. :) > > Does anyone know one? > > Aya~ > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From mattejames at gmail.com Mon Apr 14 04:59:23 2008 From: mattejames at gmail.com (Matt James) Date: Mon Apr 14 04:59:26 2008 Subject: Custom Views and Two-Fingered Scrolling Message-ID: <27cd4a440804140459v1c89e5bfu4d2dfa4291a33f07@mail.gmail.com> Hey guys, I was wondering if anyone has experience dealing with custom views and two-fingered scrolling. Right now, I have everything working except for one thing: I need to know when the scrolling pressure has ended. Ideally, I'd like to be sent a message when the person "lets go" of the trackpad rather than if they only stop moving. Currently, I utilize the NSResponder scrollWheel: method to get two-fingered scrolling "for free", but unfortunately, it seems to run based on movement, not pressure. So I started looking at NSEvent's pressure method, but it throws an exception if the event is not a "mouse event" which apparently excludes the scrollWheel method. I'm not nearly brave enough to try and write my own two-fingered scrolling method based purely on mouse movements (in order to benefit from the pressure method), and other than that, I'm out of ideas. Anyone have any thoughts or experience with this? Thanks for your help! -Matt From clarkcox3 at gmail.com Mon Apr 14 11:23:54 2008 From: clarkcox3 at gmail.com (Clark Cox) Date: Mon Apr 14 11:24:16 2008 Subject: Custom Views and Two-Fingered Scrolling In-Reply-To: <27cd4a440804140459v1c89e5bfu4d2dfa4291a33f07@mail.gmail.com> References: <27cd4a440804140459v1c89e5bfu4d2dfa4291a33f07@mail.gmail.com> Message-ID: On Mon, Apr 14, 2008 at 4:59 AM, Matt James wrote: > Hey guys, > > I was wondering if anyone has experience dealing with custom views and > two-fingered scrolling. As far as the Cocoa is concerned, there is zero difference between two-fingered scrolling and scrolling with a scroll-wheel or scroll-ball on a mouse. > Right now, I have everything working except for one > thing: I need to know when the scrolling pressure has ended. There is no "pressure" involved, as the trackpads are not pressure-sensitive > Ideally, I'd > like to be sent a message when the person "lets go" of the trackpad rather > than if they only stop moving. Currently, I utilize the NSResponder > scrollWheel: method to get two-fingered scrolling "for free", but > unfortunately, it seems to run based on movement, not pressure. So I > started looking at NSEvent's pressure method, but it throws an exception if > the event is not a "mouse event" which apparently excludes the scrollWheel > method. I'm not nearly brave enough to try and write my own two-fingered > scrolling method based purely on mouse movements (in order to benefit from > the pressure method), and other than that, I'm out of ideas. > > Anyone have any thoughts or experience with this? Thanks for your help! Besides writing your own driver for the trackpad that gives you the information that you're asking for, you're probably out of luck. -- Clark S. Cox III clarkcox3@gmail.com From Aya at animes.de Mon Apr 14 15:32:50 2008 From: Aya at animes.de (Aya Koshigaya) Date: Mon Apr 14 16:34:41 2008 Subject: Get ASCII Char from Keystroke and modifier? In-Reply-To: <162478CE-2E23-41F8-B6ED-8EF5BA819A5A@animes.de> References: <162478CE-2E23-41F8-B6ED-8EF5BA819A5A@animes.de> Message-ID: <80AE1E4A-A263-4032-A4FD-5AD4879DA3D3@animes.de> Hi, I'm writing a glut-application and need to know what key the user has pressed. if the user hit ALT+n to get a ~ glut gives me the key-code "n" and the modifier ALT.. but, is there a way to convert this to ~? I could write maaaaany if's.. but... I'm not sure if this would be the nicest way.. In Windows there's an API function "toAscii" where I can pass the key- code + modifier states and get the resulting ASCII Character. Is there something similar in OSX too? Preferably in carbon (c++). Aya~ From bill at cheeseman.name Tue Apr 15 02:51:26 2008 From: bill at cheeseman.name (Bill Cheeseman) Date: Tue Apr 15 02:57:23 2008 Subject: Get ASCII Char from Keystroke and modifier? In-Reply-To: <80AE1E4A-A263-4032-A4FD-5AD4879DA3D3@animes.de> Message-ID: on 2008-04-14 6:32 PM, Aya Koshigaya at Aya@animes.de wrote: > I'm writing a glut-application and need to know what key the user has > pressed. If you're looking for the character (as opposed to the key), one possibility is to use the UCKeyTranslate() function, in Unicode Utilities. It returns the string of Unicode characters generated by a given key combination, given the hardware-independent keycode, the keyboard type, and other information. See the "Unicode Utilities Reference" document for details. Depending on what you're doing, there may be an easier way to get the character from the key down or key up event. -- Bill Cheeseman - bill@cheeseman.name Quechee Software, Quechee, Vermont, USA www.quecheesoftware.com PreFab Software - www.prefabsoftware.com From cmhofman at gmail.com Tue Apr 15 03:11:14 2008 From: cmhofman at gmail.com (Christiaan Hofman) Date: Tue Apr 15 03:11:23 2008 Subject: Get ASCII Char from Keystroke and modifier? In-Reply-To: References: Message-ID: <4D57897C-1D2F-44A7-B413-B822C37616FC@gmail.com> On 15 Apr 2008, at 11:51 AM, Bill Cheeseman wrote: > on 2008-04-14 6:32 PM, Aya Koshigaya at Aya@animes.de wrote: > >> I'm writing a glut-application and need to know what key the user has >> pressed. > > If you're looking for the character (as opposed to the key), one > possibility > is to use the UCKeyTranslate() function, in Unicode Utilities. It > returns > the string of Unicode characters generated by a given key > combination, given > the hardware-independent keycode, the keyboard type, and other > information. > See the "Unicode Utilities Reference" document for details. > > Depending on what you're doing, there may be an easier way to get the > character from the key down or key up event. > > -- > > Bill Cheeseman - bill@cheeseman.name > Quechee Software, Quechee, Vermont, USA > www.quecheesoftware.com > > PreFab Software - www.prefabsoftware.com > Also note that both the cocoa and carbon events allow you to get either the raw characters and the interpreted characters. For Cocoa look into NSEvent, and for Carbon read the Carbon Event Manager Programming Guide. Christiaan From Aya at animes.de Tue Apr 15 03:18:09 2008 From: Aya at animes.de (Aya Koshigaya) Date: Tue Apr 15 03:18:30 2008 Subject: Get ASCII Char from Keystroke and modifier? In-Reply-To: <4D57897C-1D2F-44A7-B413-B822C37616FC@gmail.com> References: <4D57897C-1D2F-44A7-B413-B822C37616FC@gmail.com> Message-ID: Hi, > Also note that both the cocoa and carbon events allow you to get > either the raw characters and the interpreted characters. For Cocoa > look into NSEvent, and for Carbon read the Carbon Event Manager > Programming Guide. yes, but I've used glut to create my OpenGL window.. so all I get from the glut lib is the key that was pressed (i.E. "n") and the modifier.. Aya On Apr 15, 2008, at 12:11, Christiaan Hofman wrote: > > On 15 Apr 2008, at 11:51 AM, Bill Cheeseman wrote: > >> on 2008-04-14 6:32 PM, Aya Koshigaya at Aya@animes.de wrote: >> >>> I'm writing a glut-application and need to know what key the user >>> has >>> pressed. >> >> If you're looking for the character (as opposed to the key), one >> possibility >> is to use the UCKeyTranslate() function, in Unicode Utilities. It >> returns >> the string of Unicode characters generated by a given key >> combination, given >> the hardware-independent keycode, the keyboard type, and other >> information. >> See the "Unicode Utilities Reference" document for details. >> >> Depending on what you're doing, there may be an easier way to get the >> character from the key down or key up event. >> >> -- >> >> Bill Cheeseman - bill@cheeseman.name >> Quechee Software, Quechee, Vermont, USA >> www.quecheesoftware.com >> >> PreFab Software - www.prefabsoftware.com >> > > Also note that both the cocoa and carbon events allow you to get > either the raw characters and the interpreted characters. For Cocoa > look into NSEvent, and for Carbon read the Carbon Event Manager > Programming Guide. > > Christiaan > From macosxdevlist at personal.fishh2o.com Wed Apr 16 15:31:14 2008 From: macosxdevlist at personal.fishh2o.com (SD) Date: Wed Apr 16 15:32:11 2008 Subject: C++ Class Generator Message-ID: Hey all, Can someone please point me to a free C++ code generator for Mac OS X. I need one that I just tell it what members/attributes that class should have and it generates the files with the getter/setter methods. I know I've seen apps that do this but don't remember how to find them. Thanx again. SD -- ========================================== SD WARNING: Programming may be habit forming. From mailinglists at jasonandannette.us Thu Apr 17 10:56:22 2008 From: mailinglists at jasonandannette.us (J. Todd Slack) Date: Thu Apr 17 10:56:25 2008 Subject: OpenGL in an ITunes Plug-In Message-ID: <28EDCD55-017C-4D10-BE63-12195ECB4E0F@jasonandannette.us> Hi All, I wish to create a UI using OpenGL for use in an ITunes Visualizer Plugin. Can anyone tell me how to get started? I have the Visualizer SDK already. Is there anything OpenGL wise that I have to download? Is there a tool, like Interface Builder, that I can drag and drop the interface and then use it? I basically need to generate Labels, Fields, buttons, standard controls. Since this is cross platform, Cocoa is not an option. Can anyone help? Thanks! -Jason From geowar at apple.com Thu Apr 17 13:44:21 2008 From: geowar at apple.com (George Warner) Date: Thu Apr 17 13:44:30 2008 Subject: OpenGL in an ITunes Plug-In Message-ID: On Thu, 17 Apr 2008 10:56:22 -0700, "J. Todd Slack" wrote: > I wish to create a UI using OpenGL for use in an ITunes Visualizer > Plugin. This seems doable... But cross platform? I don't know. (I don't do windows... ;-) > Can anyone tell me how to get started? > I have the Visualizer SDK already. > > Is there anything OpenGL wise that I have to download? Nope; if you installed the developer tools then your Mac should have everything you need. We (Apple) don't provide an OpenGL sample but there are several available on the web; a quick google search turned up several. I don't know how cross platform they are thou... Here's one that I've used before: > Is there a tool, like Interface Builder, that I can drag and drop the > interface and then use it? > I basically need to generate Labels, Fields, buttons, standard > controls. Since this is cross platform, Cocoa is not an option. Since this is cross platform, No. (Not that there's really a Mac only solution ether.) -- Enjoy, George Warner, Schizophrenic Optimization Scientist Apple Developer Technical Support (DTS) From cmhofman at gmail.com Fri Apr 18 02:43:37 2008 From: cmhofman at gmail.com (Christiaan Hofman) Date: Fri Apr 18 02:43:45 2008 Subject: Accessibility for toolbar view Message-ID: <0A5DFA0A-9524-4F8F-B103-3C967C7B6678@gmail.com> Hi list, I am finally trying to add some accessibility support to our app, but I can't figure out how to properly make some custom toolbar items accessible. In particular, what do I need to do to get the parent of a custom view in a toolbar item? When the view is a standard button or segmented control, AppKit does it automagically, and the button returns the toolbar element as the parent. However for a custom NSControl subclass this does not happen, and the parent is nil. Is there some expected method name that would make this magically work? Or do I have to find it out all by myself, if so how? Or is this not possible? I tried to make the accssibility parent settable in the hope that NSToolbarItem would magically fill in the details, but it did not happen. Any help would be appreciated! Christiaan From jajati_sahu at persistent.co.in Fri Apr 18 02:58:14 2008 From: jajati_sahu at persistent.co.in (Jajati Sahu) Date: Fri Apr 18 02:58:09 2008 Subject: system_profiler gives segmentation fault error... Message-ID: <009401c8a13a$bba50b70$87ad10ac@persistent.co.in> Hi All, I am using OS X 10.2.8 on Power Mac G4 (AGP Graphics) machine. When I execute /usr/sbin/system_profiler command it terminates, giving segmentation fault error. I looked the log file in /Library/Logs folder, which says it crashed after calling memmove function. Any idea how to over come the problem. Thanks in advance. Jajati From nutrition1 at mac.com Sun Apr 20 05:50:39 2008 From: nutrition1 at mac.com (nutrition1@mac.com) Date: Sun Apr 20 05:50:57 2008 Subject: Question regarding method declaration Message-ID: <56043021-5B1D-410D-8512-34BC9D1F3B8D@mac.com> Hello, Sorry for this fundamental and maybe silly question, but I didn't get the point in this. What's the difference in declaring a method: - (void)..... and + (void)... In other words, what difference does the - versus the + make in Objective C environment. Thanks for patience and clarification Dirk From alastair at alastairs-place.net Sun Apr 20 05:53:38 2008 From: alastair at alastairs-place.net (Alastair Houghton) Date: Sun Apr 20 05:53:42 2008 Subject: Question regarding method declaration In-Reply-To: <56043021-5B1D-410D-8512-34BC9D1F3B8D@mac.com> References: <56043021-5B1D-410D-8512-34BC9D1F3B8D@mac.com> Message-ID: <7BFDCEF6-4052-4542-8439-C569F0CE6484@alastairs-place.net> On 20 Apr 2008, at 13:50, nutrition1@mac.com wrote: > Sorry for this fundamental and maybe silly question, but I didn't > get the point in this. > What's the difference in declaring a method: - (void)..... and + > (void)... > > In other words, what difference does the - versus the + make in > Objective C environment. See The "+" means you're declaring/defining a class method rather than an instance method. That is, a message that can be sent to a class rather than to an object (which is an instance of a class). Kind regards, Alastair. -- http://alastairs-place.net From georg.seifert at gmx.de Sun Apr 20 15:44:44 2008 From: georg.seifert at gmx.de (Georg Seifert) Date: Sun Apr 20 15:44:48 2008 Subject: get multiple instances of NSView from nib Message-ID: hello, I have a view with several controls in my nib file. I need to have multiple instances of the view to put it in several tabViewItems. How do I do this? Many Thanks Georg From cmhofman at gmail.com Sun Apr 20 15:58:40 2008 From: cmhofman at gmail.com (Christiaan Hofman) Date: Sun Apr 20 15:58:56 2008 Subject: get multiple instances of NSView from nib In-Reply-To: References: Message-ID: <8952D0CE-53F5-4AA7-B377-4A2847AC2076@gmail.com> On 21 Apr 2008, at 12:44 AM, Georg Seifert wrote: > hello, > > I have a view with several controls in my nib file. I need to have > multiple instances of the view to put it in several tabViewItems. > How do I do this? > > Many Thanks > Georg Use a separate controller object for the nib owner. This best be a subclass of NSViewController (or NSWindowController if you want to support Tiger). Each view instance will have its own controller object. Christiaan From johnyatforums at gmail.com Sun Apr 20 21:39:34 2008 From: johnyatforums at gmail.com (JanakiRam) Date: Sun Apr 20 21:39:38 2008 Subject: get multiple instances of NSView from nib In-Reply-To: References: Message-ID: <3f7852640804202139h7aafce96r4005c5d7882969e2@mail.gmail.com> Hi George, Drop your custom class from XCode ( from files section) onto Interface builder classes section. Change the custom class for the NSView to that of your custom class. Hope this would fix your issue. Thanks, -JanakiRam. On Mon, Apr 21, 2008 at 4:14 AM, Georg Seifert wrote: > hello, > > I have a view with several controls in my nib file. I need to have > multiple instances of the view to put it in several tabViewItems. How do I > do this? > > Many Thanks > Georg > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev > From cmhofman at gmail.com Mon Apr 21 04:38:01 2008 From: cmhofman at gmail.com (Christiaan Hofman) Date: Mon Apr 21 04:38:12 2008 Subject: get multiple instances of NSView from nib In-Reply-To: <5FEA41B2-EA8D-4C06-805C-ED4172E5DC09@gmx.de> References: <8952D0CE-53F5-4AA7-B377-4A2847AC2076@gmail.com> <5FEA41B2-EA8D-4C06-805C-ED4172E5DC09@gmx.de> Message-ID: <536289DB-5382-4826-9D48-E9C514B738B7@gmail.com> On 21 Apr 2008, at 1:32 PM, Georg Seifert wrote: >>> I have a view with several controls in my nib file. I need to have >>> multiple instances of the view to put it in several tabViewItems. >>> How do I do this? >>> >>> Many Thanks >>> Georg >> >> Use a separate controller object for the nib owner. This best be a >> subclass of NSViewController (or NSWindowController if you want to >> support Tiger). Each view instance will have its own controller >> object. >> > > Is there any way doing this inside one nib file. When the window > (with the tabView) and the view are in the same nib? > > Georg > I'm not sure what you're asking. You can add as many views and windows to a nib as you like. Bu a nib just contains what it contains. Christiaan From cmhofman at gmail.com Mon Apr 21 05:28:30 2008 From: cmhofman at gmail.com (Christiaan Hofman) Date: Mon Apr 21 05:29:04 2008 Subject: get multiple instances of NSView from nib In-Reply-To: <2D138039-F141-44F8-90A3-B673480DD911@gmx.de> References: <8952D0CE-53F5-4AA7-B377-4A2847AC2076@gmail.com> <5FEA41B2-EA8D-4C06-805C-ED4172E5DC09@gmx.de> <536289DB-5382-4826-9D48-E9C514B738B7@gmail.com> <2D138039-F141-44F8-90A3-B673480DD911@gmx.de> Message-ID: On 21 Apr 2008, at 2:12 PM, Georg Seifert wrote: >>>>> I have a view with several controls in my nib file. I need to >>>>> have multiple instances of the view to put it in several >>>>> tabViewItems. How do I do this? >>>>> >>>>> Many Thanks >>>>> Georg >>>> >>>> Use a separate controller object for the nib owner. This best be >>>> a subclass of NSViewController (or NSWindowController if you want >>>> to support Tiger). Each view instance will have its own >>>> controller object. >>>> >>> >>> Is there any way doing this inside one nib file. When the window >>> (with the tabView) and the view are in the same nib? >>> >>> Georg >>> >> >> I'm not sure what you're asking. You can add as many views and >> windows to a nib as you like. Bu a nib just contains what it >> contains. >> > > 1) I have on nib file. It contains my window, the view and several > controllers I bind to. > 2) In the window I have a Tab view with a tabbar. > 3) Each tab should contain a instance of my view. > Yes, *that's* all obvious. But it seems stupid to me to have several copies of exactly the same view displaying exactly the same information. I'd expect you'd want to make some distinction to them, either by binding differently or having different outlets, or whatever. That's why I proposed to have different controller instances, so you can make a distinction between the different view instances. Making al the views *exact* copies (including the bindings) seems pretty useless to me. > If I have a outlet to my view and add this to more than one > tabViewItem they all show the same instance. An view can exist only at one place in the view hierarchy. If you add it somewhere else it automatically is removed from it's old place in the hierarchy. > > > - I tried to use a NSViewController but it seems to expect a single > view in ist own nib. You can add as many objects and outlets for them as you want. Typically you subclass NSViewController. > > - I can?t make a copy of the view since it does not comply with > NSCopying > You can copy a view using archiving+unarchiving. It won't preserve bindings though, and may also loose some connections. And you won't be able to find the controls back through outlets, unless you walk through the view hierarchy. Anyway, though you *can* do it this way, I cannot imagine it to be useful in any real life app. That's why I said that I don't know what you're asking, because IMHO, I believe you're asking the wrong questions. Christiaan > Many Thanks for you replies > Georg From mah at jump-ing.de Mon Apr 21 10:37:39 2008 From: mah at jump-ing.de (Markus Hitter) Date: Mon Apr 21 10:36:57 2008 Subject: get multiple instances of NSView from nib In-Reply-To: References: <8952D0CE-53F5-4AA7-B377-4A2847AC2076@gmail.com> <5FEA41B2-EA8D-4C06-805C-ED4172E5DC09@gmx.de> <536289DB-5382-4826-9D48-E9C514B738B7@gmail.com> <2D138039-F141-44F8-90A3-B673480DD911@gmx.de> Message-ID: <8336BF6E-D5A3-44BD-B5BA-26FAC45947CE@jump-ing.de> Am 21.04.2008 um 14:28 schrieb Christiaan Hofman: >> 1) I have on nib file. It contains my window, the view and several >> controllers I bind to. >> 2) In the window I have a Tab view with a tabbar. >> 3) Each tab should contain a instance of my view. One solution would be to not include the view into the NSTabView. Put tabs at the top and a single view below it. Change the view according to changes of the tabs. Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ From mailinglists at jasonandannette.us Fri Apr 25 13:36:47 2008 From: mailinglists at jasonandannette.us (J. Todd Slack) Date: Fri Apr 25 13:36:50 2008 Subject: Using Eclipse rather than Xcode Message-ID: Hello All, I have used Eclipse for Java development a few years ago. I have a client that wants a cross-platform C++/OpenGL app written and wants a nice way to build cross-platform. I was thinking Eclipse. But is this possible? Can one link to OS X Frameworks? Can Eclipse build .apps? Does anyone have any advice? Thanks! _Jason From bcully at gmail.com Tue Apr 29 18:18:13 2008 From: bcully at gmail.com (Brian Cully) Date: Tue Apr 29 18:18:27 2008 Subject: Using Eclipse rather than Xcode In-Reply-To: References: Message-ID: If you're going cross-platform, target make (GNU, if you need to). It's extensible enough and old enough that it's pretty much everywhere there's a development stack. -bjc On 25-Apr-2008, at 16:36, J. Todd Slack wrote: > Hello All, > > I have used Eclipse for Java development a few years ago. > > I have a client that wants a cross-platform C++/OpenGL app written > and wants a nice way to build cross-platform. > > I was thinking Eclipse. But is this possible? > > Can one link to OS X Frameworks? > > Can Eclipse build .apps? > > Does anyone have any advice? > > Thanks! > > _Jason > > _______________________________________________ > MacOSX-dev mailing list > MacOSX-dev@omnigroup.com > http://www.omnigroup.com/mailman/listinfo/macosx-dev From ahoesch at smartsoft.de Wed Apr 30 09:47:06 2008 From: ahoesch at smartsoft.de (=?ISO-8859-1?Q?Andreas_H=F6schler?=) Date: Wed Apr 30 09:47:18 2008 Subject: First steps in xCode Message-ID: <1174F899-16D5-11DD-804E-000393CA0072@smartsoft.de> Hello all, I am an old OPENSTEP developer and have been working with ProjectBuidlerWO.app on MacOSX 10.2.8 until now. We needed to upgrade to 10.5.X now for several reasons, so it's time to get our hands dirty with xCode. I am trying to create a simple framework SRTest exporting a class Person with only one method + (void)print { NSLog(@"Hello World!"); } and call that from main.m of a cocoa tool linking to that framework. I spent hours on this simple first step and and tearing my hairs out. The framework project builds successfully and put a SRTest.framework into /Build/Release. However, this framework does not contain a Headers directory. So it's clear that building TestTool fails with error: SRTest/Person.h: No such file or directory How can I convince xCode to create a framework with a Headers directory? I have Targets SRTest Copy Headers Person.h in Groups & Files and assumed this would tell xCode to copy to create the Headers dir. But this does not seem to be the case. A framework without a Headers is absolutely useless. I googled for hours but found nothing. I am currently running xCode 3.0 but have also already tried newer builds. Nope! Hints are greatly appreciated! Thanks a lot! Regards, Andreas From joar at joar.com Wed Apr 30 10:07:28 2008 From: joar at joar.com (j o a r) Date: Wed Apr 30 10:16:36 2008 Subject: First steps in xCode In-Reply-To: <1174F899-16D5-11DD-804E-000393CA0072@smartsoft.de> References: <1174F899-16D5-11DD-804E-000393CA0072@smartsoft.de> Message-ID: <1CAF0455-205C-42AC-AFAC-1AC0A04D4846@joar.com> On Apr 30, 2008, at 9:47 AM, Andreas H?schler wrote: > How can I convince xCode to create a framework with a Headers > directory? I have > > Targets > SRTest > Copy Headers > Person.h > > in Groups & Files and assumed this would tell xCode to copy to > create the Headers dir. But this does not seem to be the case. A > framework without a Headers is absolutely useless. I googled for > hours but found nothing. I am currently running xCode 3.0 but have > also already tried newer builds. Nope! Select the "Copy Headers" build phase and look in the Detail View where you will find the header files listed. Look for the "Role" column, and make sure to mark all headers that you want to have copied to the Headers folder as "Public". j o a r