Splitting model I/O for optimization

2008-11-01 Thread Oleg Krupnov
In my app all model data are saved in a single file. For the purpose of optimizing file I/O, I'm looking for a solution that would not force me to resave the entire model when only a tiny bit of it has changed, and also allow loading (fetching) the model only partially - lazily upon request. A sol

new build phase and other framework topics

2008-11-01 Thread John Love
I know that my knowledge of Frameworks is dismal; however, I desperately need help. I have read Apple's Framework Programming Guide and several posted web sites which are based on the old XCODE 2, that is to say, the old dialog presented with CMD-I, rather than the XCODE 3 expanded CMD-I

Saving window to a PDF File

2008-11-01 Thread amy
I'm not sure this is actually what I want to do. Basically at the moment I have a window with a tableview, and I want to save the contents of the table with some other stuff to a PDF file. I've been reading up on it all as a print operation, and it looks like I will need to create a new view so I

Re: Porting from Windows to Mac

2008-11-01 Thread Rakesh Singhal
I do not know about porting Windows code (MFC based) to Mac OS. The existing code is written in C++. As suggested that it is possible then how to do it? Do I need to change the existing code (Windows code) very much. I have not used Qt before this. Does Qt support the MFC? Regards On Fri, Oct 31,

build phase and other issues of a framework

2008-11-01 Thread John Love
** 2nd message after editing by John Love ** I know that my knowledge of Frameworks is dismal; however, I desperately need help. I have read "Apple's Framework Programming Guide" and several posted web sites which are based on the old XCODE 2, that is to say, the old dialog presented wi

Re: Porting from Windows to Mac

2008-11-01 Thread Phil
On Sat, Nov 1, 2008 at 11:35 PM, Rakesh Singhal <[EMAIL PROTECTED]> wrote: > Do I need to change the existing code (Windows code) very much. I have not > used Qt before this. Does Qt support the MFC? > If your code is written for MFC, then any code that depends on it will require re-writing---rega

Re: Porting from Windows to Mac

2008-11-01 Thread Jason Stephenson
Rakesh Singhal wrote: I do not know about porting Windows code (MFC based) to Mac OS. The existing code is written in C++. As suggested that it is possible then how to do it? Do I need to change the existing code (Windows code) very much. I have not used Qt before this. Does Qt support the MFC?

Re: Saving window to a PDF File

2008-11-01 Thread amy
On Sat, 1 Nov 2008 11:45:43 +, dreamcat7 <[EMAIL PROTECTED]> wrote: > > On 1 Nov 2008, at 10:20, <[EMAIL PROTECTED]> > <[EMAIL PROTECTED] > > wrote: > >> I'm not sure this is actually what I want to do. Basically at the >> moment I >> have a window with a tableview, and I want to save the co

Re: Porting from Windows to Mac

2008-11-01 Thread Andy Bell
Have you seen http://doc.trolltech.com/solutions/qtwinmigrate/index.html ? If you need a hand then drop me a line, I have been coding with Qt for the last 6 years, using it on Mac and Windows. I guess starting from scratch is somewhat of a sledge hammer solution, but if you really want a native Ma

Re: Porting from Windows to Mac

2008-11-01 Thread Rakesh Singhal
Thanks Andy. I do not need to port to Qt but it is good to know. I will have to write it from scratch using Carbon C++ application template. The given link is very useful. Regards Rakesh On Sat, Nov 1, 2008 at 7:27 PM, Andy Bell <[EMAIL PROTECTED]> wrote: > Have you seen http://doc.trolltech.com

LaunchServices/Finder refuses to recognize my NSDocument subclass

2008-11-01 Thread John Pannell
Hi all- I'm working on a document-based application, but having trouble getting the Finder to match my document to my application. On disk, the document is a package. I am successfully writing the directory and the contents to disk, and the directory is written with the proper extension

UIScrollViewDelegate methods and touches with customized UITextView

2008-11-01 Thread Ignacio Enriquez
Hello everyone, I am quite new in implementing Delegates protocols and assignating them. And I am having some kind of problems here. I am trying to get the exact position of a text (using offset method of UITextView) when scrolled for that reason I have decide to adopt UIScrollViewDelegate and im

Re: LaunchServices/Finder refuses to recognize my NSDocument subclass

2008-11-01 Thread Julien Jalon
If your document type is a package, it does not conform to public.data but to com.apple.package. -- Julien On Sat, Nov 1, 2008 at 5:12 PM, John Pannell <[EMAIL PROTECTED]>wrote: > Hi all- > > I'm working on a document-based application, but having trouble getting the > Finder to match my documen

Re: Porting from Windows to Mac

2008-11-01 Thread Bill Bumgarner
On Nov 1, 2008, at 8:23 AM, Rakesh Singhal wrote: Thanks Andy. I do not need to port to Qt but it is good to know. I will have to write it from scratch using Carbon C++ application template. The given link is very useful. Use Cocoa, not Carbon. Carbon is not (and will not) be supported on

Re: Simple Flipbook Animation?

2008-11-01 Thread Jeshua Lacock
On Oct 31, 2008, at 12:13 PM, John Harper wrote: I described how to do this using a CAKeyframeAnimation in a previous thread: http://www.cocoabuilder.com/archive/message/cocoa/2008/8/3/214715 I am trying to adapt this technique for the iPhone SDK, but attempting to add the images NSArray

Re: Simple Flipbook Animation?

2008-11-01 Thread Tito Ciuro
Hi Jeshua, Is the CGImageRelease(im) in the for loop really needed? I think you're over-releasing the image in the array... -- Tito On Nov 1, 2008, at 10:26, Jeshua Lacock <[EMAIL PROTECTED]> wrote: On Oct 31, 2008, at 12:13 PM, John Harper wrote: I described how to do this using a CAKey

Re: new build phase and other framework topics

2008-11-01 Thread John Love
If you're not seeing the header files in the framework, my guess is that your headers are marked Private. Select the Copy Headers build phase, choose Detail from the View menu, and look at the Role column. Headers marked "Public" will be copied; headers marked "Project" or "Private" will

Re: Simple Flipbook Animation?

2008-11-01 Thread Ashley Clark
Your crash is happening because you're releasing something you shouldn't be. The CGImage you're getting from the UIImage was not accessed through a Create* or Copy* function and therefore you are not responsible for it and have no need to call the CGImageRelease function. __ Ashley On

Need help to make this method prettier

2008-11-01 Thread Andre Masse
Hi, I'm implementing a custom NSFormatter. I want a number with 9 digits displayed as "123 456 789". So before implementing the formatter I made a test project to check the conversion. The version I did get the job done but its not pretty :-) Any more good looking solutions? Thanks, Andr

Re: NSTextView actions

2008-11-01 Thread Randall Meadows
On Oct 31, 2008, at 12:48 PM, Michael Ash wrote: So rather than this, just get notified when the text view *actually* redraws. There's no built-in way to do this (that I can think of right now), but it's easy with a simple subclass. Subclass NSTextView, and override -viewWillDraw, and have your

Re: Simple Flipbook Animation?

2008-11-01 Thread Jeshua Lacock
On Nov 1, 2008, at 11:44 AM, Ashley Clark wrote: Your crash is happening because you're releasing something you shouldn't be. The CGImage you're getting from the UIImage was not accessed through a Create* or Copy* function and therefore you are not responsible for it and have no need to ca

Re: Need help to make this method prettier

2008-11-01 Thread Graff
On Nov 1, 2008, at 1:56 PM, Andre Masse wrote: I'm implementing a custom NSFormatter. I want a number with 9 digits displayed as "123 456 789". So before implementing the formatter I made a test project to check the conversion. The version I did get the job done but its not pretty :-) Any more g

[Q] Buttons with Menus

2008-11-01 Thread Eric Gorr
Back in Carbon, it was easy to use a nice square bevel button and tie a menu to the button with a little black triangle. Does the same ability exist in Cocoa? I assume it does because the common gear menus have the look and functionality I want. I do also see that a NSButton has a menu outl

Re: Need help to make this method prettier

2008-11-01 Thread Andre Masse
Thanks Graff and to Gregory who answered off-list. Andre Masse On Nov 1, 2008, at 15:30, Graff wrote: On Nov 1, 2008, at 1:56 PM, Andre Masse wrote: I'm implementing a custom NSFormatter. I want a number with 9 digits displayed as "123 456 789". So before implementing the formatter I made a

Re: Simple Flipbook Animation?

2008-11-01 Thread Ashley Clark
On Nov 1, 2008, at 1:02 PM, Jeshua Lacock wrote: On Nov 1, 2008, at 11:44 AM, Ashley Clark wrote: Your crash is happening because you're releasing something you shouldn't be. The CGImage you're getting from the UIImage was not accessed through a Create* or Copy* function and therefore you a

Re: Simple Flipbook Animation?

2008-11-01 Thread Jeshua Lacock
On Nov 1, 2008, at 1:51 PM, Ashley Clark wrote: On Nov 1, 2008, at 1:02 PM, Jeshua Lacock wrote: On Nov 1, 2008, at 11:44 AM, Ashley Clark wrote: Your crash is happening because you're releasing something you shouldn't be. The CGImage you're getting from the UIImage was not accessed thro

Re: Need help to make this method prettier

2008-11-01 Thread Louis Demers
On 1-Nov-08, at 13:56 , Andre Masse wrote: The version I did get the job done but its not pretty :-) Any more good looking solutions? if (first < 10) { str0 = [NSString stringWithFormat:@"00%d", first]; } else if (first < 100){

Re: Need help to make this method prettier

2008-11-01 Thread Bill Bumgarner
On Nov 1, 2008, at 1:56 PM, Andre Masse wrote: I'm implementing a custom NSFormatter. I want a number with 9 digits displayed as "123 456 789". So before implementing the formatter I made a test project to check the conversion. The version I did get the job done but its not pretty :-) Any more

Re: [Q] Buttons with Menus

2008-11-01 Thread Nick Zitzmann
On Nov 1, 2008, at 1:44 PM, Eric Gorr wrote: Back in Carbon, it was easy to use a nice square bevel button and tie a menu to the button with a little black triangle. Does the same ability exist in Cocoa? Yes. I've got to be missing something painfully obvious, but what that is, I am not

Re: Simple Flipbook Animation?

2008-11-01 Thread Ashley Clark
On Nov 1, 2008, at 2:58 PM, Jeshua Lacock wrote: On Nov 1, 2008, at 1:51 PM, Ashley Clark wrote: What are the values of anim and images before you try to add them to the animator? In the code portion you posted you don't show where you're creating your "anim" object. Yes, sorry, I realize

Re: Porting from Windows to Mac

2008-11-01 Thread Kyle Sluder
On Sat, Nov 1, 2008 at 12:18 PM, Bill Bumgarner <[EMAIL PROTECTED]> wrote: > Carbon is a legacy technology. Cocoa is the focus of all future > development. Do you really mean this? As far as I've heard, Apple's official stance has never been to classify Carbon as a legacy technology (though they

Re: Porting from Windows to Mac

2008-11-01 Thread Uli Kusterer
On 30.10.2008, at 23:49, Stefan Werner wrote: You are aware that MFC (1992) is younger than NextStep (1988)? ;-) Well, not many of the '88 classes are around in today's Cocoa. The move from NX to NS changed things a lot, so we really don't have much from '88 left. And if age is a criter

Re: Porting from Windows to Mac

2008-11-01 Thread Bill Bumgarner
On Nov 1, 2008, at 1:33 PM, Kyle Sluder wrote: Do you really mean this? As far as I've heard, Apple's official stance has never been to classify Carbon as a legacy technology (though they've certainly taken all the steps). Can we finally settle this issue and start calling things as they are?

Re: Porting from Windows to Mac

2008-11-01 Thread Uli Kusterer
On 01.11.2008, at 16:23, Rakesh Singhal wrote: Thanks Andy. I do not need to port to Qt but it is good to know. I will have to write it from scratch using Carbon C++ application template. The given link is very useful. Don't use Carbon for GUI work. HIToolbox, the GUI part of Carbon, is

Re: Simple Flipbook Animation?

2008-11-01 Thread Jeshua Lacock
On Nov 1, 2008, at 2:20 PM, Ashley Clark wrote: As well I don't see in my version of the SDK where UIAnimator is defined. If you're trying to use private API here, don't. Just set the duration on the anim object directly and add it to your CALayer. You can get the layer used by a view by s

Re: Finder like wrapping + truncation

2008-11-01 Thread Mudi Dandan
OK, I have spent the last night by digging into the cocoa text system and this is what I could come up with. I'm sure this is not the best way to do it, but the result is very close to what I want to achieve. Basically I use the NSLayoutmanager to find how it would lay out the first line of t

Re: Splitting model I/O for optimization

2008-11-01 Thread Jean-Daniel Dupas
Le 1 nov. 08 à 09:31, Oleg Krupnov a écrit : In my app all model data are saved in a single file. For the purpose of optimizing file I/O, I'm looking for a solution that would not force me to resave the entire model when only a tiny bit of it has changed, and also allow loading (fetching) the m

Re: Simple Flipbook Animation?

2008-11-01 Thread Ashley Clark
On Nov 1, 2008, at 4:22 PM, Jeshua Lacock wrote: On Nov 1, 2008, at 2:20 PM, Ashley Clark wrote: As well I don't see in my version of the SDK where UIAnimator is defined. If you're trying to use private API here, don't. Just set the duration on the anim object directly and add it to your

Re: Tracking changes to NSTableView datasource

2008-11-01 Thread Michael Ash
On Fri, Oct 31, 2008 at 6:37 PM, Andre Masse <[EMAIL PROTECTED]> wrote: > Hi, > > I have a datasource for an NSTableView which is a NSMutableArray (call it > mainArray for the moment) and I'm not sure which way is better to manage > add, update and delete rows. I can use either one array for each o

Re: Simple Flipbook Animation?

2008-11-01 Thread Scott Anguish
On 1-Nov-08, at 1:26 PM, Jeshua Lacock wrote: I heard that last week an iPhone dev list was created at Apple, but I have not been able to find it. I hope this is similar enough to be on-topic here, as I am using the same classes for the most part. [moderator] Yes, it's fine. ___

Re: Splitting model I/O for optimization

2008-11-01 Thread Michael Ash
On Sat, Nov 1, 2008 at 4:31 AM, Oleg Krupnov <[EMAIL PROTECTED]> wrote: > In my app all model data are saved in a single file. For the purpose > of optimizing file I/O, I'm looking for a solution that would not > force me to resave the entire model when only a tiny bit of it has > changed, and also

Re: [MEET] CocoaHeads Mac Developer Meetings

2008-11-01 Thread Dale Thatcher
London, UK CocoaHeads seems to be defunct. Anyone else interested in starting it up again? - Dale On 30 Oct 2008, at 17:22, Torsten Curdt wrote: Greetings, CocoaHeads is an international Mac programmer's group. We specialize in Cocoa, but everything Mac programming related is welcome.

Re: Saving window to a PDF File

2008-11-01 Thread dreamcat7
On 1 Nov 2008, at 10:20, <[EMAIL PROTECTED]> <[EMAIL PROTECTED] > wrote: I'm not sure this is actually what I want to do. Basically at the moment I have a window with a tableview, and I want to save the contents of the table with some other stuff to a PDF file. I've been reading up on it a

Need help to make these methods prettier

2008-11-01 Thread Andre Masse
Hi, I'm implementing a custom NSFormatter. I want a number with 9 digits displayed as "123 456 789". So before implementing the formatter I made a test project to check the conversion. The version I did get the job done but its not pretty :-) Any more good looking solutions? Thanks, Andr

Re: Need help to make these methods prettier

2008-11-01 Thread Bill Bumgarner
On Nov 1, 2008, at 10:31 AM, Andre Masse wrote: - formatting a number from 123456789 to 123 456 789 and to get the number back: - (IBAction)rollback:(id)sender { NSString *strWithSpaces = [aResult stringValue]; ... } I didn't see this part of your original question. NSNumberFormatt

Re: UIScrollViewDelegate methods and touches with customized UITextView

2008-11-01 Thread Roland King
yes there seems to be some confusion here. 1) the delegate for a UITextView is a UITextViewDelegate, the UIScrollViewDelegate is irrelevant. 2) It may well be that UITextView itself is a delegate of a scroll view behind the scenes and your override of its delegate method scrollViewDidScro

Re: Simple Flipbook Animation?

2008-11-01 Thread Matt Long
Jeshua, I put together a little demo app that works in the simulator. Haven't tried on my device yet, though. Take a look here: http://www.cimgf.com/files/ImageFlip.zip And one comment about the code. If you don't want a transition between images when using a keyframe animation for the co

Re: Simple Flipbook Animation?

2008-11-01 Thread Roland King
NSArray *redExplode; NSMutableArray *images; images = [NSMutableArray array]; CGImageRef im; UIImage *thisImg; int p; //frames ommitted for brevity redExplode = [[NSArray arrayWithObjects: [UIImage imageNamed:@"redExlode.0.png"], [UIImage imageNamed:@"redExlode.1.png"], nil] retain];

Re: Simple Flipbook Animation?

2008-11-01 Thread Jeshua Lacock
On Nov 1, 2008, at 10:31 PM, Matt Long wrote: I put together a little demo app that works in the simulator. Haven't tried on my device yet, though. Take a look here: http://www.cimgf.com/files/ImageFlip.zip And one comment about the code. If you don't want a transition between images whe