Generating variable frequency tones
Hi, I'm looking for some way to generate a tone that resembles the sound of an instrument. I need precise control of the base frequency (pitch). I'm wondering what would be the best way to generate it on an iPhone. Store a file with a know frequency and resample it to the desired frequency? Synthesize a tone by calculating a bunch of sines? Doing some FFT trick on a file? If someone can give some insight into what would best fit the H/W available it would be grateful. Kind regards, Remco Poelstra ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: A/B testing
That would be one option. On Sep 9, 2010, at 11:52 PM, Anna Billstrom wrote: > I am using nibs, so you're suggesting switching the nib according to... > Whether the device id ends in an odd or even #, or some other logic? > > Sent from my iPhone > > On Sep 9, 2010, at 7:33 PM, Scott Anguish wrote: > >> >> On Sep 9, 2010, at 5:31 PM, banane wrote: >> >>> Sorry Mark, didn't know the thread info was still attached, if I >>> changed the subject. >>> >>> Right- I don't want automated testing, but to release a version A of >>> the app, and a Version B, and see which one performs better. This post >>> (http://www.markj.net/ab-testing-iphone-app-names-360idev/) advises >>> doing it over time, to determine which version performs better, but >>> that is of course, a longer process. >>> >>> That link requires me to have a DC ticket, interesting. I too thought >>> they were available to all developers. >> >> If you’re using .nibs, then you should be able to switch between designs >> fairly simply. >> >> Otherwise... proper design as far as inheritance and subclassing goes could >> make this easier. If the MVC model is in use... ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: A/B testing
I am using nibs, so you're suggesting switching the nib according to... Whether the device id ends in an odd or even #, or some other logic? Sent from my iPhone On Sep 9, 2010, at 7:33 PM, Scott Anguish wrote: > > On Sep 9, 2010, at 5:31 PM, banane wrote: > >> Sorry Mark, didn't know the thread info was still attached, if I >> changed the subject. >> >> Right- I don't want automated testing, but to release a version A of >> the app, and a Version B, and see which one performs better. This post >> (http://www.markj.net/ab-testing-iphone-app-names-360idev/) advises >> doing it over time, to determine which version performs better, but >> that is of course, a longer process. >> >> That link requires me to have a DC ticket, interesting. I too thought >> they were available to all developers. > > If you’re using .nibs, then you should be able to switch between designs > fairly simply. > > Otherwise... proper design as far as inheritance and subclassing goes could > make this easier. If the MVC model is in use... ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: A/B testing
On Sep 9, 2010, at 5:31 PM, banane wrote: > Sorry Mark, didn't know the thread info was still attached, if I > changed the subject. > > Right- I don't want automated testing, but to release a version A of > the app, and a Version B, and see which one performs better. This post > (http://www.markj.net/ab-testing-iphone-app-names-360idev/) advises > doing it over time, to determine which version performs better, but > that is of course, a longer process. > > That link requires me to have a DC ticket, interesting. I too thought > they were available to all developers. If you’re using .nibs, then you should be able to switch between designs fairly simply. Otherwise... proper design as far as inheritance and subclassing goes could make this easier. If the MVC model is in use...___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: A/B testing
Sorry Mark, didn't know the thread info was still attached, if I changed the subject. Right- I don't want automated testing, but to release a version A of the app, and a Version B, and see which one performs better. This post (http://www.markj.net/ab-testing-iphone-app-names-360idev/) advises doing it over time, to determine which version performs better, but that is of course, a longer process. That link requires me to have a DC ticket, interesting. I too thought they were available to all developers. Thanks Anna ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about architecture
Sure Greg Guerin, I couldn't agree more. I have 10 years of experience in software development and this is the process to be an expert in anything, in cocoa it will not be different. But my approach to learn any new language is read at least three books entirely before do any serious development (commercial). It worked very for me and make me much more productive to solve specific bugs that I never experienced before. My question is more related to Cocoa specific things like Laurent answered. My idea to separate the app in diferent nibs is the same principle of single responsibility and make my view layer easier to maintain. For example, with a custom nib my Controller for that specific view in that nib can do less things than handle all view in the same window. Make sense or I should create a custom view (and a different controller for that view) and keep everything in the same nib until I need speed up the launch? Thanks. Daniel Lopes On Thu, Sep 9, 2010 at 6:04 PM, Richard Somers wrote: > On Sep 9, 2010, at 2:25 PM, Greg Guerin wrote: > > Try it. See what happens. Repeat as needed. >> >> A lot of design questions can only be answered well by experience. Either >> you already have the experience from an earlier project, or you plan to get >> the experience by writing one to throw away. >> >> If you're a newcomer to a language, there is almost no chance that you'll >> do everything right the first time. You have to try things and see what >> works and what fails. You can read books all day, but you will eventually >> have to try some things that aren't in the book. When you do, you will find >> that every situation has its own unique set of constraints, even if they are >> slight variations on what's in the book. Only the simplest things are >> exactly the same as what's found in books. >> >> All software is exploration. If someone had already done exactly what you >> want, then you'd be using that existing software instead of creating a new >> thing yourself. >> > > Agreed, agreed and agreed. But sometimes you need something to obtain lift > off, something to get you off the ground. A friend, hard work, schooling, > and or experience help. For me the books and the documentation were > invaluable but so was trial and error combined with a lot of hard work. > > --Richard > > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/danielvlopes%40gmail.com > > This email sent to danielvlo...@gmail.com > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: A/B testing
Hey! On 9/Sep/2010, at 2:01 PM, Anna Billstrom wrote: > Other ideas? 1) Please start a new thread instead of replying to another with a different subject... Messes up thread tracking. ;-) 2) I think that you actually want the opposite, but in case that's not the case: the Automated User Testing session from WWDC this year might be of interest. It was session 306 and the description is here: https://developer.apple.com/wwdc/sessions/details/?id=306 (You need to login with your AppleID first but it should be accessible as Apple has granted all developers access to WWDC content this year ;-) Enjoy! M. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about architecture
On Sep 9, 2010, at 2:25 PM, Greg Guerin wrote: Try it. See what happens. Repeat as needed. A lot of design questions can only be answered well by experience. Either you already have the experience from an earlier project, or you plan to get the experience by writing one to throw away. If you're a newcomer to a language, there is almost no chance that you'll do everything right the first time. You have to try things and see what works and what fails. You can read books all day, but you will eventually have to try some things that aren't in the book. When you do, you will find that every situation has its own unique set of constraints, even if they are slight variations on what's in the book. Only the simplest things are exactly the same as what's found in books. All software is exploration. If someone had already done exactly what you want, then you'd be using that existing software instead of creating a new thing yourself. Agreed, agreed and agreed. But sometimes you need something to obtain lift off, something to get you off the ground. A friend, hard work, schooling, and or experience help. For me the books and the documentation were invaluable but so was trial and error combined with a lot of hard work. --Richard ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: isTemporaryID unrecognized selector - how do I debug this?
On Thu, 9 Sep 2010 13:37:01 -0700, Mark Ritchie said: >On 9/Sep/2010, at 1:27 PM, John C. Randolph wrote: >> This was covered in a couple of WWDC talks. Look for the sessions on >debugging. > >And it was covered on this list last week: ;-) >http://lists.apple.com/archives/cocoa-dev/2010/Sep/msg00103.html Yeah, sorry about that. The question was asked in a different thread, and no one answered, so I did. I discovered later that someone renamed the thread/created a new one and that there were answers there. -- Sean McBride, B. Eng s...@rogue-research.com Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
A/B testing
I have a relatively simple game, and I wanted to test some UI elements, to see which is more popular and useful for customers. Does anyone have a practice of setting up a testing harness in their app, so they can readily show different versions to different users, and report back on those metrics? I've done this on web sites, but, seems near impossible or at least very difficult to do it for the iPhone. What I'm thinking is: - use some kind of Device ID naming system to display certain elements and functionality - check back to a server and log the deviceID/version and somehow track that to emails from the user (populate the deviceID in the message), or other comments. Other ideas? Anna Sent from my iPad On Sep 9, 2010, at 1:53 PM, Laurent Daudelin wrote: > One of the main reason to split different views in different nibs is that it > speeds up launch time. If all your views are in the same, "MainWindow" nib, > then all those views need to be instantiated and their outlets connected when > your app starts. So, the idea is to segment those views in different nibs > that you can load on demand only when you need them. For example, if you have > a preferences window, you can put it into a separate nib. That way, it's not > loaded until the user choose the preferences. > > -Laurent. > -- > Laurent Daudelin > AIM/iChat/Skype:LaurentDaudelin > http://www.nemesys-soft.com/ > Logiciels Nemesys Software > laur...@nemesys-soft.com > > On Sep 9, 2010, at 12:58, Daniel Lopes wrote: > >> Thanks Richard, actually I already read Hillegass book. Right now, my >> material to study is http://pragprog.com/titles/dscpq/cocoa-programming it >> is pretty good. I also already watched all PragProg screencasts related to >> cocoa. >> >> But the problem with learn Cocoa is how apply the best pratices that are >> exclusevely to Cocoa. Things like how to organize nibs, when I should >> separate or not views, create custom views or not and etc. As soon as finish >> Coco Programming I will read Cocoa Design Patterns. >> >> But what you think about separate custom views in diferent nibs? Is that >> right? >> >> Thanks. >> >> -- >> Daniel Lopes >> >> >> On Thu, Sep 9, 2010 at 4:44 PM, Richard Somers >> wrote: >> >>> On Sep 9, 2010, at 8:32 AM, Daniel Lopes wrote: >>> >>> Hello, I'm learning Cocoa and Objc and enjoying a lot, especially because my background is in Ruby and both languages are basically the same thing except for the syntax. But what I don't understand very well and neither find good guidelines is how architect my app. >>> >>> You might try 'Cocoa Programming for Mac OS X', Third Edition, by >>> Hillegass. You might also take a look at 'Cocoa Design Patterns' by Buck and >>> Yacktman. >>> >>> I am not familiar with Ruby, but if you are having problems in cocoa seeing >>> the forest for the trees, perhaps you need to do some more homework. > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/banane%40gmail.com > > This email sent to ban...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about architecture
One of the main reason to split different views in different nibs is that it speeds up launch time. If all your views are in the same, "MainWindow" nib, then all those views need to be instantiated and their outlets connected when your app starts. So, the idea is to segment those views in different nibs that you can load on demand only when you need them. For example, if you have a preferences window, you can put it into a separate nib. That way, it's not loaded until the user choose the preferences. -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/ Logiciels Nemesys Software laur...@nemesys-soft.com On Sep 9, 2010, at 12:58, Daniel Lopes wrote: > Thanks Richard, actually I already read Hillegass book. Right now, my > material to study is http://pragprog.com/titles/dscpq/cocoa-programming it > is pretty good. I also already watched all PragProg screencasts related to > cocoa. > > But the problem with learn Cocoa is how apply the best pratices that are > exclusevely to Cocoa. Things like how to organize nibs, when I should > separate or not views, create custom views or not and etc. As soon as finish > Coco Programming I will read Cocoa Design Patterns. > > But what you think about separate custom views in diferent nibs? Is that > right? > > Thanks. > > -- > Daniel Lopes > > > On Thu, Sep 9, 2010 at 4:44 PM, Richard Somers > wrote: > >> On Sep 9, 2010, at 8:32 AM, Daniel Lopes wrote: >> >> Hello, I'm learning Cocoa and Objc and enjoying a lot, especially because >>> my background is in Ruby and both languages are basically the same thing >>> except for the syntax. >>> >>> But what I don't understand very well and neither find good guidelines is >>> how architect my app. >>> >> >> You might try 'Cocoa Programming for Mac OS X', Third Edition, by >> Hillegass. You might also take a look at 'Cocoa Design Patterns' by Buck and >> Yacktman. >> >> I am not familiar with Ruby, but if you are having problems in cocoa seeing >> the forest for the trees, perhaps you need to do some more homework. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: isTemporaryID unrecognized selector - how do I debug this?
On 9/Sep/2010, at 1:27 PM, John C. Randolph wrote: > This was covered in a couple of WWDC talks. Look for the sessions on > debugging. And it was covered on this list last week: ;-) http://lists.apple.com/archives/cocoa-dev/2010/Sep/msg00103.html M. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: isTemporaryID unrecognized selector - how do I debug this?
This was covered in a couple of WWDC talks. Look for the sessions on debugging. -jcr On Sep 9, 2010, at 12:23 PM, Sean McBride wrote: > On Fri, 3 Sep 2010 19:52:54 -0700, Jerry Krinock said: > >> http://developer.apple.com/mac/library/technotes/tn2004/tn2124.html > >> "Architecture Considerations" > > Sadly this awesome technote has not been updated in 3 years. We should > all file bugs. :) > >> But there's a problem. I see you've got a 64-bit machine. The first >> article says that "64-bit Intel restores sanity to the equation by >> passing arguments in registers", but he doesn't say which registers, and >> neither does the Apple Technical Note. >> >> I'm going to have to get a 64-bit Mac one of these days. Does anyone >> know the register mapping for Intel 64? > > Forgot where I got this (ie credit not mine), but: > > given: > -(id)method:(id)arg2 bar:(id)arg3 baz:(id)arg4 > >ppc/ppc64: x86_64: i386: > arg0 (self) $r3 $rdi*(id*)($ebp + 8) > arg1 (_cmd) $r4 $rsi*(SEL*)($ebp + 12) > arg2$r5 $rdx*(id*)($ebp + 16) > arg3$r6 $rcx*(id*)($ebp + 20) > arg4$r7 $r8 ? > arg5$r8 $r9 ? > > -- > > Sean McBride, B. Eng s...@rogue-research.com > Rogue Researchwww.rogue-research.com > Mac Software Developer Montréal, Québec, Canada > > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/jcr%40mac.com > > This email sent to j...@mac.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about architecture
Daniel Lopes wrote: But what you think about separate custom views in diferent nibs? Is that right? Try it. See what happens. Repeat as needed. A lot of design questions can only be answered well by experience. Either you already have the experience from an earlier project, or you plan to get the experience by writing one to throw away. If you're a newcomer to a language, there is almost no chance that you'll do everything right the first time. You have to try things and see what works and what fails. You can read books all day, but you will eventually have to try some things that aren't in the book. When you do, you will find that every situation has its own unique set of constraints, even if they are slight variations on what's in the book. Only the simplest things are exactly the same as what's found in books. All software is exploration. If someone had already done exactly what you want, then you'd be using that existing software instead of creating a new thing yourself. http://en.wikipedia.org/wiki/The_Mythical_Man-Month -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about architecture
On Sep 9, 2010, at 1:58 PM, Daniel Lopes wrote: But the problem with learn Cocoa is how apply the best pratices that are exclusevely to Cocoa. Things like how to organize nibs, when I should separate or not views, create custom views or not and etc. As soon as finish Coco Programming I will read Cocoa Design Patterns. But what you think about separate custom views in diferent nibs? Is that right? When I was learning Cocoa I would often ask myself why did they do this or how does this work. The book 'Cocoa Design Patterns' by Buck and Yacktman answered a lot of my questions. I am currently working on an application where I swap custom programmatic views into a window which came from a nib. It works great. I started with Hillegass Chapter 29 which talks about view swapping and then extended it to my specific situation. --Richard ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about architecture
Thanks Richard, actually I already read Hillegass book. Right now, my material to study is http://pragprog.com/titles/dscpq/cocoa-programming it is pretty good. I also already watched all PragProg screencasts related to cocoa. But the problem with learn Cocoa is how apply the best pratices that are exclusevely to Cocoa. Things like how to organize nibs, when I should separate or not views, create custom views or not and etc. As soon as finish Coco Programming I will read Cocoa Design Patterns. But what you think about separate custom views in diferent nibs? Is that right? Thanks. -- Daniel Lopes On Thu, Sep 9, 2010 at 4:44 PM, Richard Somers wrote: > On Sep 9, 2010, at 8:32 AM, Daniel Lopes wrote: > > Hello, I'm learning Cocoa and Objc and enjoying a lot, especially because >> my background is in Ruby and both languages are basically the same thing >> except for the syntax. >> >> But what I don't understand very well and neither find good guidelines is >> how architect my app. >> > > You might try 'Cocoa Programming for Mac OS X', Third Edition, by > Hillegass. You might also take a look at 'Cocoa Design Patterns' by Buck and > Yacktman. > > I am not familiar with Ruby, but if you are having problems in cocoa seeing > the forest for the trees, perhaps you need to do some more homework. > > --Richard > > ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to debug this?
Thanks for your reply - solved. The problem was because of a goto: placed before any init happened. 2010/9/9 Bill Bumgarner > > On Sep 9, 2010, at 4:27 AM, Luca C. wrote: > > > 0 libobjc.A.dylib 0x7fff8766c11c objc_msgSend + > 40 > > 1 com.apple.CoreFoundation 0x7fff882e9cc6 > > _CFAutoreleasePoolPop + 230 > > 2 com.apple.Foundation 0x7fff87a4881a > > Classic overrelease problem. Something, somewhere, is being over-released. > > First, run "build and analyze" on your source and fix (or explain) every > issue it identifies. > > If still not fixed, run with zombie detection enabled (using Instruments, > most easily). > > b.bum > > -- Luca C. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about architecture
On Sep 9, 2010, at 8:32 AM, Daniel Lopes wrote: Hello, I'm learning Cocoa and Objc and enjoying a lot, especially because my background is in Ruby and both languages are basically the same thing except for the syntax. But what I don't understand very well and neither find good guidelines is how architect my app. You might try 'Cocoa Programming for Mac OS X', Third Edition, by Hillegass. You might also take a look at 'Cocoa Design Patterns' by Buck and Yacktman. I am not familiar with Ruby, but if you are having problems in cocoa seeing the forest for the trees, perhaps you need to do some more homework. --Richard ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to debug this?
On Sep 9, 2010, at 4:27 AM, Luca C. wrote: > 0 libobjc.A.dylib 0x7fff8766c11c objc_msgSend + 40 > 1 com.apple.CoreFoundation 0x7fff882e9cc6 > _CFAutoreleasePoolPop + 230 > 2 com.apple.Foundation 0x7fff87a4881a Classic overrelease problem. Something, somewhere, is being over-released. First, run "build and analyze" on your source and fix (or explain) every issue it identifies. If still not fixed, run with zombie detection enabled (using Instruments, most easily). b.bum ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Phone lock/Apple sounds
This is what push notifications are for. http://developer.apple.com/library/ios/#documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Introduction/Introduction.html Luke On Sep 9, 2010, at 5:47 AM, Dan Hopwood wrote: > Hi all, > > My iPhone application continuously pings a back-end server to check for new > documents. If a new document is found an alert is triggered which consists > of a dialogue and sound alert. If the phone is locked then neither of these > events occur, which is undesirable. With a bit of googling I have discovered > you can disable the standby timer, which helps but doesn't cover the use > case when a user locks the phone manually. > > Is there any way to allow the alerts to continue to fire even when the phone > is locked? Obviously Apple achieve this with calls/messages etc but perhaps > it is not possible with 3rd party applications? > > I also have a query about using Apple's alert sounds. Firstly how would I > get hold of for example the top three Apple alert tones (i.e. Tri-tone, > Chime and Glass). Secondly, are these sounds copyrighted or are you able to > use them in a 3rd party app. > > Many thanks in advance, > > Dan > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com > > This email sent to luket...@apple.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Animating the view layer
You are using Private API. Don't do that. On Sep 9, 2010, at 12:07 AM, Sivakumar Kandappan Singaravadivelu wrote: > Hi Everybody > I need to bring the ripple effect animation in iphone that is present > in widget application when you drop a new widget. I tried posting in > various forums including apple forum I cant find the answer for it. I > hope you guyz can help. The following is the code which I used for the > animation. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Phone lock/Apple sounds
Hi all, My iPhone application continuously pings a back-end server to check for new documents. If a new document is found an alert is triggered which consists of a dialogue and sound alert. If the phone is locked then neither of these events occur, which is undesirable. With a bit of googling I have discovered you can disable the standby timer, which helps but doesn't cover the use case when a user locks the phone manually. Is there any way to allow the alerts to continue to fire even when the phone is locked? Obviously Apple achieve this with calls/messages etc but perhaps it is not possible with 3rd party applications? I also have a query about using Apple's alert sounds. Firstly how would I get hold of for example the top three Apple alert tones (i.e. Tri-tone, Chime and Glass). Secondly, are these sounds copyrighted or are you able to use them in a 3rd party app. Many thanks in advance, Dan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: core data structure?
When you say a product can link to more than one order, then I assume you use an array to store the orders. Why not just creating an array of dictionaries, where in each dictionary you set the order, the number of products, and possibly other information. This way when you want to know how many products are in an order, just go serch for your order in the array of dictionaries and get it. This is just to clarify that you haven't to search for strange things. This is not performant - it's just to help you figure it out. -- Luca C. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
How to debug this?
Hi everybody, unfortunately I can't be more precise than the title. Here's what I get Thread 0 Crashed: Dispatch queue: com.apple.main-thread 0 libobjc.A.dylib 0x7fff8766c11c objc_msgSend + 40 1 com.apple.CoreFoundation 0x7fff882e9cc6 _CFAutoreleasePoolPop + 230 2 com.apple.Foundation 0x7fff87a4881a __NSThreadPerformPerform + 698 3 com.apple.CoreFoundation 0x7fff88302e91 __CFRunLoopDoSources0 + 1361 4 com.apple.CoreFoundation 0x7fff88301089 __CFRunLoopRun + 873 5 com.apple.CoreFoundation 0x7fff8830084f CFRunLoopRunSpecific + 575 6 com.apple.HIToolbox 0x7fff810cb91a RunCurrentEventLoopInMode + 333 7 com.apple.HIToolbox 0x7fff810cb67d ReceiveNextEventCommon + 148 8 com.apple.HIToolbox 0x7fff810cb5d8 BlockUntilNextEventMatchingListInMode + 59 9 com.apple.AppKit 0x7fff82ef329e _DPSNextEvent + 708 10 com.apple.AppKit 0x7fff82ef2bed -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 155 11 com.apple.AppKit 0x7fff82eb88d3 -[NSApplication run] + 395 12 com.apple.AppKit 0x7fff82eb15f8 NSApplicationMain + 364 13 com.yourcompany.PrettyApp0x000114ec start + 52 I have checked all the source files, and there is no problem with memory management - everything gets released if necessary, I use and release autorelease pools in sub threads, etc. What happens is that the app crashes randomly. Usually 2 times will crash, and the 3rd will run normally. How can I fix this? Where should I look? P.S. I'm on Snow Leopard. Thanks in advance -- Luca C. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Animating the view layer
Hi Everybody I need to bring the ripple effect animation in iphone that is present in widget application when you drop a new widget. I tried posting in various forums including apple forum I cant find the answer for it. I hope you guyz can help. The following is the code which I used for the animation. UIButton *Button1=[UIButton alloc] init]; Button1.frame=CGRectMake(0,0,50,50,50); [baseUIView addSubview:Button1]; CATransition *animation= [CATransition animation]; animation.timingFunction=UIViewAnimationCurveEaseInOut; animation.duration=1.0f; animation.type=@"rippleEffect"; [[BaseUIView layer] addAnimation:animation forKey:animation]; If I use the above code I get the ripple animation for the entire view . But I just need to animate around the button. So I tried animating a view formed around the button and adding it to the base view I`m not getting the animation. Can somebody please help me I`m trying hard to crack for 3 weeks. Thanks in advance Sivakumar ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: isTemporaryID unrecognized selector - how do I debug this?
On Fri, 3 Sep 2010 19:52:54 -0700, Jerry Krinock said: >http://developer.apple.com/mac/library/technotes/tn2004/tn2124.html > >"Architecture Considerations" Sadly this awesome technote has not been updated in 3 years. We should all file bugs. :) >But there's a problem. I see you've got a 64-bit machine. The first >article says that "64-bit Intel restores sanity to the equation by >passing arguments in registers", but he doesn't say which registers, and >neither does the Apple Technical Note. > >I'm going to have to get a 64-bit Mac one of these days. Does anyone >know the register mapping for Intel 64? Forgot where I got this (ie credit not mine), but: given: -(id)method:(id)arg2 bar:(id)arg3 baz:(id)arg4 ppc/ppc64: x86_64: i386: arg0 (self) $r3 $rdi*(id*)($ebp + 8) arg1 (_cmd) $r4 $rsi*(SEL*)($ebp + 12) arg2$r5 $rdx*(id*)($ebp + 16) arg3$r6 $rcx*(id*)($ebp + 20) arg4$r7 $r8 ? arg5$r8 $r9 ? -- Sean McBride, B. Eng s...@rogue-research.com Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: core data structure?
On 2010 Sep 09, at 04:14, Amy Gibbs wrote: > I didn't really want to save the values as attributes, as I'd like the values > to reflect changes to the product prices. I only need to display these in a > label onscreen. > > Is this what transient attributes are for? Yes, but before you use transient attributes, be sure to study all their limitations given in the Core Data Programming Guide. I am not a fan of transient attributes, as you can read here: http://www.cocoabuilder.com/archive/cocoa/237109-only-one-reason-to-ever-use-transient-properties-in-core-data.html?q=only+reason+transient+attributes#237109 http://www.cocoabuilder.com/archive/cocoa/234791-core-data-fetches-transient-properties-nspredicateeditor-sadness.html?q=only+reason+transient+attributes#234899 Unless you have a user base of millions, or are a fantastic programmer, it's hard to beat today's hard drive prices of less than a dollar per gigabyte. So the smartest solution is often to just leave the "unnecessary" attributes in the persistent store, and start on your next project. Another alternative is to add a regular instance variable to your managed object. Regular ivars still work. Or, in this case, it appears that calculating them as needed and implementing +keyPathsForValuesAffectingX to make them KVObserveable would work and get you home on time. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Controls created at runtime aren't drawn as enabled until a mouse click...
Nope, it's a regular window with a title bar and everything. All of the controls that are instantiated from the nib are fine; only the controls created manually at runtime are showing this behavior. On Sep 9, 2010, at 11:41 AM, Kevin Wojniak wrote: > Any chance you're using an NSBorderlessWindowMask window? If so, you may need > to override canBecomeKeyWindow. > > Kevin > > > On Sep 9, 2010, at 11:12 AM, Steve Christensen wrote: > >> I have a window and controls that are loaded from a nib. One of the controls >> builds a subview hierarchy to control a set of parameters that aren't known >> until runtime. What I'm finding is that all of the controls in that >> hierarchy are drawn as if they're disabled until you click on them, then >> they're redrawn with the blue highlights. As far as I can tell, all the >> controls are completely enabled and work just fine, except for that odd look. >> >> I've attached a small screenshot showing the difference between a slider >> that has been clicked and one that hasn't. Any ideas what I might be doing >> wrong? >> >> ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Controls created at runtime aren't drawn as enabled until a mouse click...
Any chance you're using an NSBorderlessWindowMask window? If so, you may need to override canBecomeKeyWindow. Kevin On Sep 9, 2010, at 11:12 AM, Steve Christensen wrote: > I have a window and controls that are loaded from a nib. One of the controls > builds a subview hierarchy to control a set of parameters that aren't known > until runtime. What I'm finding is that all of the controls in that hierarchy > are drawn as if they're disabled until you click on them, then they're > redrawn with the blue highlights. As far as I can tell, all the controls are > completely enabled and work just fine, except for that odd look. > > I've attached a small screenshot showing the difference between a slider that > has been clicked and one that hasn't. Any ideas what I might be doing wrong? > > ___ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/kainjow%40kainjow.com > > This email sent to kain...@kainjow.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSOutlineView
Thanks all for the helpful comments and insights. -koko On Sep 9, 2010, at 10:42 AM, Kyle Sluder wrote: On Sep 9, 2010, at 7:59 AM, k...@highrolls.net wrote: It is my understanding that an NSOutlineView is only 'populated' by using its Delegate Methods. My manager (a Windows guy with no Cocoa) claims the NSOutlineView can be directly manipulated as in add root, add child etc. NSOutlineView does not have any methods for manipulating the tree of items displayed therein, because conceptually speaking it has no items. They belong to the datasource, and the outline view asks for them anew every time it needs to display a region of itself. NSTreeController does offer some direct manipulation functionality, and its support for bindings will make it easy to use with NSOutlineView—that is until you run into one of the many infamous NSController bugs or limitations. But often you really want to make your changes to the model rather than the controller, particularly if your model is already in the same hierarchy you intend to display in the outline view. In that case your controller object mightn't need any hierarchy management of its own, rather only serving as a connection point between the model and view. HTH, --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Controls created at runtime aren't drawn as enabled until a mouse click...
I have a window and controls that are loaded from a nib. One of the controls builds a subview hierarchy to control a set of parameters that aren't known until runtime. What I'm finding is that all of the controls in that hierarchy are drawn as if they're disabled until you click on them, then they're redrawn with the blue highlights. As far as I can tell, all the controls are completely enabled and work just fine, except for that odd look. I've attached a small screenshot showing the difference between a slider that has been clicked and one that hasn't. Any ideas what I might be doing wrong? <>___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
indexedUITableView question
Quick question: the rounded rect badge with the letter (for instance) that comes up while scrubbing an indexedUITableView... is that custom by Apple (I've seen it in their iPhone apps), or is that supposed to appear on it's own while scrubbing through the index? I imagine that it's custom and we could trigger based on sectionForSectionIndexTitle? Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSOutlineView
On Sep 9, 2010, at 7:59 AM, k...@highrolls.net wrote: > It is my understanding that an NSOutlineView is only 'populated' by using its > Delegate Methods. > > My manager (a Windows guy with no Cocoa) claims the NSOutlineView can be > directly manipulated as in add root, add child etc. NSOutlineView does not have any methods for manipulating the tree of items displayed therein, because conceptually speaking it has no items. They belong to the datasource, and the outline view asks for them anew every time it needs to display a region of itself. NSTreeController does offer some direct manipulation functionality, and its support for bindings will make it easy to use with NSOutlineView—that is until you run into one of the many infamous NSController bugs or limitations. But often you really want to make your changes to the model rather than the controller, particularly if your model is already in the same hierarchy you intend to display in the outline view. In that case your controller object mightn't need any hierarchy management of its own, rather only serving as a connection point between the model and view. HTH, --Kyle Sluder___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSOutlineView
Nothing stops you from directly manipulating the Data Source and reloading to do just that - MVC is the paradigm. On Sep 9, 2010, at 10:59 AM, k...@highrolls.net wrote: > It is my understanding that an NSOutlineView is only 'populated' by using its > Delegate Methods. > > My manager (a Windows guy with no Cocoa) claims the NSOutlineView can be > directly manipulated as in add root, add child etc. > > Comments please before I pull my hair out. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSOutlineView
What he is referring to is using a NSTreeController. You bind the controller to the NSOutlineView and provide KVC compliant methods to enumerate the children and it can optionally create nodes for you as well. Check out the sample SourceView from Apple. Tony Romano http://www.cocoaegghead.com On Sep 9, 2010, at 7:59 AM, k...@highrolls.net wrote: It is my understanding that an NSOutlineView is only 'populated' by using its Delegate Methods. My manager (a Windows guy with no Cocoa) claims the NSOutlineView can be directly manipulated as in add root, add child etc. Comments please before I pull my hair out. -koko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/tonyrom%40hotmail.com This email sent to tony...@hotmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
NSOutlineView
It is my understanding that an NSOutlineView is only 'populated' by using its Delegate Methods. My manager (a Windows guy with no Cocoa) claims the NSOutlineView can be directly manipulated as in add root, add child etc. Comments please before I pull my hair out. -koko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Question about architecture
Hello, I'm learning Cocoa and Objc and enjoying a lot, especially because my background is in Ruby and both languages are basically the same thing except for the syntax. But what I don't understand very well and neither find good guidelines is how architect my app. I'm doing my studies in a small pet project but I would like to make that project as close as possible to a real polished commercial app. The goal of the app is access my snippets in gist.github.com and manage that with ability to search, add, edit, delete and some shortcuts (I also want to put an icon in menu bar). Today I going with that UI: http://cl.ly/2JYu On the left side of Splitview I have a Custom View for the header (because I want a diferrent background) and TableView where I will display all my gist snippets. On the right side another Custom View for the header and a TextView. My idea for organization is separate the entire content on the left side in a new Nib called sidebar and set the FileOwner to a controller in Window Nib. Also do the same thing for the right part of the Split View. That behavior the behavior to separate big "components" of the UI in diferent nib's is right? Create custom views for the header is a good pratice? I know this a big question but the answer will help me a lot. Thanks in advance. -- Best regards Daniel Lopes ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: core data structure?
I've made the changes to my model, and the UI for this. I was just wondering how I should achieve the following: (a similar relationship in my app, productss and kits, I had to do the same, add a third inbetween entity) Previously I summed the price attribute of the item to give me a total, now I have the extra entity and quantities how would I be best doing this. For example, I have products and kits (in reality), in the datamodel I have products, kit, and kitItems. kitItems have a qty attribute, and relationships to kits and products. For each kit, I want to calculate the total price of the included items (items can also be partial quantities). Previously I just used the bindings to @sum.price for the arrangedObjects I didn't really want to save the values as attributes, as I'd like the values to reflect changes to the product prices. I only need to display these in a label onscreen. Is this what transient attributes are for? Thanks for your help, Amy On 6 Aug 2010, at 1:20PM, Amy Gibbs wrote: Hi, I was wondering if anyone could point me in the right direction? I have 2 entities, product and order. At the moment they are linked with a many to many relationship as an order will have many products, and products may be in more than one order. My issue is that when I link them I cannot link quantities. For example, I may want to order 10 of a product in an order. I figure I need to split out the relationships, so I need a third entity, for example orderItem, which has relationships to both the product and order entities, but also has a quantity attribute. Am I right here? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: scrolling content view resizes visibly but bounds and frame don't change
On Sep 9, 2010, at 00:20, Christopher Corbell wrote: > This one is really bugging me. I have a WebView in a scrolling view and > content gets appended to it periodically (new tables appended; the entire > content of the WebView is reset each time via loadHTMLString on the > mainFrame). You don't want to put the WebView inside a scroll view because it handles its own scrolling. Take a look at: http://www.cocoadev.com/index.pl?HowDoIScrollAWebView (which was the first hit I got googling "webview scrollview"). I think it has the solution to your problem. (But read all the way to the end. The first couple of suggestions seem to be flubs.) ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: First trials in Cocoa app
Op 9-9-2010 6:52, Dave Carrigan schreef: No, I missed that part about his VC being stored in the app delegate. So, yeah, if he isn't able to pass context to the C library, he can easily get to the VC in that way rather than resorting to a global. Hi, Thanks for the replies. I never expected it to be difficult, but there is so much information to process at the moment, that I'm about to miss some details here and there. Thanks for pointing them out. Regards, Remco Poelstra ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
scrolling content view resizes visibly but bounds and frame don't change
This one is really bugging me. I have a WebView in a scrolling view and content gets appended to it periodically (new tables appended; the entire content of the WebView is reset each time via loadHTMLString on the mainFrame). VIsually, the webView correctly expands to include new content including proper updating of the scrollbars; it looks fine and you can scroll up and down the document as it grows. The problem is that in code the bounds and frames of all views involved never change to reflect the larger content of the webView. This means that I can't make the view scroll to the bottom programmatically when new content is appended which is what I want. To make extra sure, I hooked up a lot of logging as follows; the output never changes even when the content is clearly scrolling offscreen. std::stringstream ssDbg; NSRect docFrame = [[scrollView documentView] frame]; NSRect docBounds = [[scrollView documentView] bounds]; NSRect webFrame = [webView frame]; NSRect webBounds = [webView bounds]; NSRect contentFrame = [[scrollView contentView] frame]; NSRect contentBounds = [[scrollView contentView] bounds]; NSSize contentSize = [scrollView contentSize]; ssDbg << "\ndocFrame: (" << docFrame.origin.x << "," << docFrame.origin.y << ") " << docFrame.size.width << " x " << docFrame.size.height << std::endl; ssDbg << "docBounds: (" << docBounds.origin.x << "," << docBounds.origin.y << ") " << docBounds.size.width << " x " << docBounds.size.height << std::endl; ssDbg << "webFrame: (" << webFrame.origin.x << "," << webFrame.origin.y << ") " << webFrame.size.width << " x " << webFrame.size.height << std::endl; ssDbg << "webBounds: (" << webBounds.origin.x << "," << webBounds.origin.y << ") " << webBounds.size.width << " x " << webBounds.size.height << std::endl; ssDbg << "contentFrame: (" << contentFrame.origin.x << "," << contentFrame.origin.y << ") " << contentFrame.size.width << " x " << contentFrame.size.height << std::endl; ssDbg << "contentBounds: (" << contentBounds.origin.x << "," << contentBounds.origin.y << ") " << contentBounds.size.width << " x " << contentBounds.size.height << std::endl; ssDbg << "contentSize: " << contentSize.width << " x " << contentSize.height << std::endl; my_log_debug(ssDbg.str().c_str()); The output forever even when the webView content has resized and become scrollable: [DEBUG 2010-09-08T23:57:02PDT] docFrame: (0,0) 297 x 378 docBounds: (0,0) 297 x 378 webFrame: (0,0) 297 x 378 webBounds: (0,0) 297 x 378 contentFrame: (1,1) 298 x 379 contentBounds: (0,0) 298 x 379 contentSize: 298 x 379 I do find that the webView has one subView in its subviews array, and its dimensions also never change, its bounds always are the same as its frame. Anyone know what gives? Shouldn't the countentBounds and/or webBounds get larger (taller) as new scrollbar-updating content is appended in the webView? Then the following sample code to scroll to the bottom should work: if ([[scrollview documentView] isFlipped]) { newScrollOrigin=NSMakePoint(0.0,NSMaxY([[scrollview documentView] frame]) -NSHeight([[scrollview contentView] bounds])); } else { newScrollOrigin=NSMakePoint(0.0,0.0); } ...but it doesn't work because the contentView bounds never change even though I can plainly see the webView now has a larger vertical dimension and is vertically scrollable. TIA, Chris ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com