Re: Can an app query the values in its own Info.plist?

2009-09-27 Thread Kiel Gillard
Generally one does not put custom keys in the Info.plist. You might want to consider a separate plist resource for yo

Re: Can an app query the values in its own Info.plist?

2009-09-27 Thread Kiel Gillard
On 28/09/2009, at 2:23 PM, Graham Cox wrote: On 28/09/2009, at 1:47 PM, Kiel Gillard wrote: Generally one does not put custom keys in the Info.plist. Why not? As long as you're careful to ensure no conflict now or in the future with Apple's defined keys, you'll be fine

Re: Can I make custom pasteboard type for an object reference?

2009-10-14 Thread Kiel Gillard
You could archive and unarchive your object as data using NSKeyedArchiver and NSKeyedUnarchiver.

Re: Can I make custom pasteboard type for an object reference?

2009-10-14 Thread Kiel Gillard
t a new copy of the object. On Oct 14, 2009, at 17:34:06, Kiel Gillard wrote: You could archive and unarchive your object as data using NSKeyedArchiver and NSKeyedUnarchiver. <http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Archiving/Tasks/creating.html#//apple_ref/d

Re: Serial comm in Cocoa?

2009-10-15 Thread Kiel Gillard
Look for AMSerialPort on this page: Kiel On 16/10/2009, at 11:12 AM, Oftenwrong Soong wrote: Hi All, What is the Cocoa-fied way to communicate via a serial port? Using a kext to support the Prolific PL2303 chip and a shell utility like cu, it is po

Re: Core Data design question: receiving KVO notifications of partially mutated objects

2009-10-30 Thread Kiel Gillard
On 31/10/2009, at 9:01 AM, Sean McBride wrote: Hi all, What is considered best practice when it comes to mutating many properties of a managed object, specifically with regard to KVO observers getting notified before all mutations are finished? In situations like these I personally tend to av

Re: menu action never being called?

2009-11-03 Thread Kiel Gillard
On 04/11/2009, at 12:25 PM, David M. Cotter wrote: i have a menu that lives in the menu bar (top level) but i also use it in a context menu This is the source of your problem. Your design is working against you. I would suggest using one instance of NSMenu for the main menu and another in

Re: How can a plug-in bundle get access to its own resources?

2009-11-10 Thread Kiel Gillard
On 10/11/2009, at 10:51 PM, Benjamin Miller wrote: On 10 Nov 2009, at 11:45, Motti Shneor wrote: This may seem a silly question, but I cannot find any decent way for my Plug-In bundle code to access its own resources! ... snip ... Is there a way out? Is there any trick, or technique to wor

Re: using xcode ,how to compile .c file as .m file?

2010-03-30 Thread Kiel Gillard
On 30/03/2010, at 8:32 PM, simon Scylla wrote: > i need to port some code to iphone and now i find that i can not call system > interface of objc. i can rename my files from 888.c to ***.m and it works. > but i do not wanna rename my files. > what should i do?i think there must be some choice in

Re: CGPoint and KVO

2010-04-03 Thread Kiel Gillard
On 04/04/2010, at 1:40 AM, Roland King wrote: > I have a property which is a CGPoint and I'm observing it. I didn't really > know what to expect in the change dictionary (I have NSKeyValueObservingOld > as the observation flags) so I stuck in a breakpoint and went looking. After > messing about

Re: Wondering about that iPad page curling

2010-04-06 Thread Kiel Gillard
Can UIViewAnimationTransitionCurlUp/Down be of any use? On 07/04/2010, at 2:10 AM, Alex Kac wrote: > Well they may have done it with a private API for CoreImage if that exists > (not sure). THey may have done it with OpenGL. They may have taken their > CoreImage code on desktop and ported a par

Change management using CFRunLoopObserver

2010-04-28 Thread Kiel Gillard
Hi there, My application's model is observing a particular stage of the run loop. When this stage occurs, pending changes to my model are applied. Which stage of the run loop is best to do this? I cannot seem to find a recommendation in the documentation. Thanks in advance for your time, Kiel

Re: new to cocoa

2010-05-13 Thread Kiel Gillard
On 12/05/2010, at 6:36 AM, Alejandro Marcos Aragón wrote: > Hi all, > > I'm new to Cocoa, and I couldn't find information about an error that I'm > getting on the web. I'm trying to create an NSMutableDictionary where the > keys are of type UIButton*: > > > // create but

Re: new to cocoa

2010-05-13 Thread Kiel Gillard
On 14/05/2010, at 3:15 PM, Ken Thomases wrote: > On May 13, 2010, at 11:38 PM, Kiel Gillard wrote: > >> This most certainly is happening because you cannot use UIButton objects as >> keys in a dictionary because NSDictionary copies the objects used as keys. >> Fu

Re: My Custom Framework Is Not Exporting One of My Header Files

2010-06-08 Thread Kiel Gillard
Have you set the scope of the necessary header files to public? file:///Developer/Documentation/DocSets/com.apple.ADC_Reference_Library.DeveloperTools.docset/Contents/Resources/Documents/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/100-Targets/bs_targets.html On 09/06/2010, at 11:20 A

Re: Need help debugging this

2011-07-17 Thread Kiel Gillard
Hi Andre, To help you debug this problem, I suggest you set a breakpoint on the objc_exception_throw exception symbol. Using Xcode 4, this can be done by: 1) From the main menu bar choose View > Navigators > Breakpoint. 2) At the very bottom left of the project window, click the "+" button. 3) F

Re: Need help debugging this

2011-07-17 Thread Kiel Gillard
Reference to documentation: http://developer.apple.com/library/mac/#recipes/xcode_help-breakpoint_navigator/articles/adding_an_exception_breakpoint.html%23//apple_ref/doc/uid/TP40010433-CH1-SW1 Kiel On 18/07/2011, at 10:34 AM, Andre Masse wrote: > Hi, > > I'm having problems tracking down this

Re: Leopard for development / testing.

2009-12-09 Thread Kiel Gillard
On 10/12/2009, at 3:37 PM, Dan Ribe wrote: > Hi All, > > I want to get a copy of Leopard for development/testing purpose. Can anyone > please let me know. > > - Is there anyway to download it from apple's site ? Yes I know they offer Snow L

Re: App works when launched from Xcode, not from Finder

2009-12-15 Thread Kiel Gillard
In Xcode, are you running the target's executable with any command line arguments? Kiel On 16/12/2009, at 11:34 AM, PCWiz wrote: > I'm having a *really* strange issue here. First of all, my app works fine in > Debug mode. I can launch it from Xcode or from Finder and it will work fine. > > Th

Re: Commit Editing Changes as I Type

2010-01-06 Thread Kiel Gillard
Are you using bindings for your user interface? If you are using bindings, each binding has an option which reads something like "Continuously updates value". Enable this option for the text field's value binding. This will give you the desired effect. Kiel "The best way to cheer yourself up is

Re: What is the equivalent of SetSystemUIMode() in Leopard and above?

2010-01-26 Thread Kiel Gillard
On 27/01/2010, at 3:03 PM, Arun wrote: > I wanted to use SetSystemUIMode() to hide the dock item and menu of my > application. Do you know how can we achieve using the same? Please see the LSBackgroundOnly Info.plist key:

Spotlight while running windows modal

2010-02-17 Thread Kiel Gillard
Hi all, I'm trying to cancel a modal NSAlert when Spotlight determines a file exists in the file system. I create and start the NSMetadataQuery before I run the alert modal. However I do not receive notifications of changes to my metadata query while my application is running modal. The docs i

Re: cocoa API to get List of hard disk Partitions

2010-02-18 Thread Kiel Gillard
On 18/02/2010, at 8:44 PM, Arjun SM wrote: > Hi, > > Can any one help me out on How I can get the List of all hard disk > partions mounted on the the System along with the Icon, just like Disk > Utility application does. (Image below.) > > > [image: > ?ui=2&view=att&th=126df98c109f6b52&attid=

Re: Any Good Core Animation Tutorials?

2009-06-15 Thread Kiel Gillard
Bill Dudney's Core Animation book is the best, high quality and inexpensive resource for any Core Animation developer . Matt Gallagher's four part Core Animation powered Asteroids tutorials are pretty good, to

Re: Switching Contents of NSView

2009-07-05 Thread Kiel Gillard
If you are suggesting Google was the right place to look, unfortunately you are mistaken. Directly underneath the toolbar of the documentation window should be a scope bar that attempts to help you find the information you're looking for. Perhaps you're searching the documentation by Title

Re: Cocoa System Requirements

2009-07-06 Thread Kiel Gillard
Cocoa has been around since wham and has always been a part of Mac OS X. However, certain API has been added or removed. Those changes are identifiable in the documentation for that API. For example, Core Animation was added in Mac OS X 10.5 Leopard. The documentation clearly indicates Core

Re: Why do I receive KVO notification when new value IS the old value?

2009-07-08 Thread Kiel Gillard
To prevent this behaviour, you could override setName: to only change the value when the pointers are not the same. Kiel On 09/07/2009, at 8:05 AM, Jerry Krinock wrote: Why do I receive KVO notifications when a key is set to the same value that it already is? This happens not only when th

Is sdp generating incomplete header files?

2009-07-08 Thread Kiel Gillard
Hi all, In an attempt to start using the scripting bridge, I followed the instructions available here If use the sdef tool with the application I would like to

Re: Use Cocoa in QL Generator

2009-07-14 Thread Kiel Gillard
Read the documentation: http://devworld.apple.com/documentation/UserExperience/Conceptual/Quicklook_Programming_Guide/Introduction/Introduction.html The samples there use Cocoa as well as CoreFoundation. On 15/07/2009, at 10:34 AM, David Blanton wrote: I want to use Cocoa calls in my Generate

Re: Use Cocoa in QL Generator

2009-07-15 Thread Kiel Gillard
and include Cocoa.h ? On Jul 14, 2009, at 6:48 PM, Kiel Gillard wrote: Read the documentation: http://devworld.apple.com/documentation/UserExperience/Conceptual/Quicklook_Programming_Guide/Introduction/Introduction.html The samples there use Cocoa as well as CoreFoundation. On 15/07/2009, at 10:34

Re: hide main menu, not appear in dock, "run in background".

2009-07-16 Thread Kiel Gillard
http://www.cocoadev.com/index.pl?LSBackgroundOnly On 17/07/2009, at 10:43 AM, Piotr Grzybowski wrote: Hello Everyone, For some time I wanted my cocoa application not to appear in the dock, nor to show the main menu bar. After some searching and screaming, I managed to achieve this by adding

Re: something I can't understand

2009-07-28 Thread Kiel Gillard
On 29/07/2009, at 12:52 PM, Agha Khan wrote: Hi: I have a struct @interface PngButton : UIButton { @public bool OffPos; CGPoint horizontalLoc; CGPoint verticalLoc; } @property (assign) bool OffPos; @property (assign) CGPoint horizontalLoc; @property (assign) CGPoint verti

Re: Diagramming (a bit OT)

2009-07-30 Thread Kiel Gillard
I've always used OmniGraffle with UML stencils in the past. I'm not sure if you know about these already Hope this is of some help, Kiel On 31/07/2009, at 1:19 PM, Loukas Kalenderidis wrote: Hey guys, Sorry, this is a bit off topic for this list, but

Re: Avoiding KVO in dealloc?

2009-08-03 Thread Kiel Gillard
On 04/08/2009, at 9:46 AM, Kyle Sluder wrote: On Mon, Aug 3, 2009 at 4:35 PM, Todd Heberlein wrote: Both methods seem to me to do the same thing (releasing foo), but I presume the first one would trigger any KVO observers where as the second wouldn't. Is that why the simple "release" is us

Re: Avoiding KVO in dealloc?

2009-08-03 Thread Kiel Gillard
On 04/08/2009, at 10:26 AM, Kyle Sluder wrote: On Aug 3, 2009, at 5:03 PM, Kiel Gillard wrote: Unless, of course, you have code in your setter method that handles changes to and from nil. For example, you may add or remove self as an observer for keypaths of an different object value

Re: Avoiding KVO in dealloc?

2009-08-03 Thread Kiel Gillard
On 04/08/2009, at 10:59 AM, Kyle Sluder wrote: On Mon, Aug 3, 2009 at 5:47 PM, Kiel Gillard wrote: Do you have a documentation reference for that? I would have expected the isa swizzling to be an implementation detail of the runtime that is handled before my subclass inits. Of course, what

Re: Intel Mac prefpane error

2009-08-07 Thread Kiel Gillard
What OS are those few people running? Kiel :-) "If video games affected us as kids, we'd all be running around in darkened rooms, munching on magic pills and listening to repetitive electronic music." On 08/08/2009, at 7:47 AM, Trygve Inda wrote: Although my app is a universal binary (32/6

Re: Rotation and translation of an image

2009-08-12 Thread Kiel Gillard
Hi Agha, An appropriate answer depends entirely on what you want to do with the image. Do you want to draw the image into a view? Do you want to save the image to the hard disk? You'll have to give us more information to help you out. Kiel On 13/08/2009, at 11:22 AM, Agha Khan wrote: HI

Re: Rotation and translation of an image

2009-08-12 Thread Kiel Gillard
howed you just to explain. I am confused because I want to rotate the image of the center of the image. I am not sure how to rotate image at the center. Thank you for prompt reply. Best regards Agha On Aug 12, 2009, at 6:49 PM, Kiel Gillard wrote: Hi Agha, An appropriate answer depends ent

Popup button cells in a table view

2010-07-27 Thread Kiel Gillard
Hi all, I have a table view with a column whose data cell is a NSPopupButtonCell. I am using one array controller to provide the table view rows and a seperate array controller to provide the popup button menu items. My table column (as opposed to the cell) has its content bound to the arranged

Re: Set the Cursor Position

2010-08-19 Thread Kiel Gillard
http://developer.apple.com/mac/library/documentation/GraphicsImaging/Reference/Quartz_Services_Ref/Reference/reference.html#//apple_ref/c/func/CGDisplayMoveCursorToPoint On 20/08/2010, at 10:30 AM, k...@highrolls.net wrote: > I haven't seen anything in the docs ... is there a way to set the curso

Re: NSScanner Failing with EXC_BAD_ACCESS

2010-10-15 Thread Kiel Gillard
http://developer.apple.com/library/ios/documentation/cocoa/reference/foundation/Classes/NSScanner_Class/Reference/Reference.html#//apple_ref/occ/instm/NSScanner/scanCharactersFromSet:intoString: You pass by reference to the - [NSScanner scanCharactersFromSet:intoString:] method an uninitialised p

Programmatically adjusting NSValueTransformer of a bound NSTextField

2010-10-26 Thread Kiel Gillard
Hi all, Can you please look at this very small and rough reproduction of my problem . I want to present measured values of my model with respect to the user's locale. For example, I want to present a distance in imperial units of measure

Re: Programmatically adjusting NSValueTransformer of a bound NSTextField

2010-10-26 Thread Kiel Gillard
Hey guys, Please ignore my post. It's been a long day and I had one very bad return value in one of my value transformers. It always helps to take a break and return to the problem with a fresh perspective! Kiel On 27/10/2010, at 3:45 PM, Kiel Gillard wrote: > Hi all, > >

Re: What is Mac's "custom" for an agent to display its GUI?

2010-11-16 Thread Kiel Gillard
http://developer.apple.com/library/mac/#documentation/UserExperience/Conceptual/PreferencePanes/PreferencePanes.html On 17/11/2010, at 12:27 PM, eveningnick eveningnick wrote: > Hello! > I have to write an application, that should run on the background. > When the user needs, it should display so

Re: OS X Desktop

2010-12-06 Thread Kiel Gillard
I'm not sure if this will help, but check out the NDAlias source here, specifically the - (void)finderLocation method on line 187. https://github.com/nathanday/ndalias/blob/master/Classes/NSString%2BNDCarbonUtilities.m Kiel On 07/12/2010, at 10:11 AM, Charlie Dickman wrote: > In the days of Sy

Re: Add a view (xib) to a project

2011-01-30 Thread Kiel Gillard
1) Click once the Xcode icon in your Dock to ensure Xcode is the frontmost application. 2) From the menu bar, choose File > "New...". You will be presented with a window titled "New File". 3) Locate the column on the left hand side of the window which just opened and the section of the column la

Re: Cocoa Classes from C++?

2008-05-27 Thread Kiel Gillard
Hi Jason, Addressing point one, you must use ObjC to use the Cocoa frameworks. For the other points, I suggest you take a look at < http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_12_section_2.html> to begin with. Also see < https://developer.apple.com/samplec

Re: Attaching file to an email using Cocoa APIs

2008-05-28 Thread Kiel Gillard
Hi Palav, Please see for more information. Searching this list may also give you other answers. Kiel Hi all, > > I want to create an email using email client & want to attach a file to that > email. I did some analysis on this. With Apple Ma

Re: Making use of a static library?

2008-06-11 Thread Kiel Gillard
Hi Graham, In my experience, this warning generally does mean that there is something wrong in the build target settings for either the static library or the application including the library. Until I know more, this is the only thing I can suggest. Assuming you are using Xcode for the project of

NSTableView problems when 0 items

2008-06-15 Thread Kiel Gillard
Howdy, Are there any messages in your Run Log or in Console that might help you figure out the problem? Can you verify the table data source method implementations are returning the right values? Kiel I have an NSTableView object and an NSPopUpButton that I use to select a > category of informati

Attributed menu titles

2008-07-09 Thread Kiel Gillard
Hi all, I have a menu of items whose titles are attributed strings. I have specified custom colours for parts of those strings. The documentation reads: If you do not set a text color for the attributed string, it is black when not selected, white when selected, and gray when disabled. Colored tex

Re: Basic question on /Library/Application Support

2008-07-22 Thread Kiel Gillard
Hi John, If you use Carbon, you can use FSFindFolder() to find the application support folder and have Carbon create it for you by passing kCreateFolder as an argument. However, if you are using Cocoa, I'm not sure if NSSearchPathForDirectoriesInDomains() creates folders when you search for a path

Framework and NSApplication

2008-08-07 Thread Kiel Gillard
@synthesize greeting; I'm writing a Cocoa framework that links with an old Carbon application. The Carbon application indirectly interacts with it through a wrapper framework. Within the Cocoa framework, I want to observe the NSApplicationWillTerminateNotification notification, posted by the NSApp

Re: Calling an object from a C function

2008-08-19 Thread Kiel Gillard
Hi Charlie, The format is like any normal C function. int MyStaticCFunction(int someArg) { //invoke myMethod and return the int the myMethod returns return [objcObject myMethod:someArg]; } You wrote: What is the syntax? For example, how do I invoke the method - (int) myMethod: (int) in

Re: Newbie question re Xcode on Leopard

2008-08-21 Thread Kiel Gillard
Hi Paul, Hope you're enjoying Cocoa ;-) As you probably noticed, the Classes tab has been removed in Interface Builder 3 (the Leopard Interface Builder). The projects header files are automagically synced with the xib. To instansiate your custom class; 1) Drag an Object (plain blue cube) from the

Re: How to call functions of a C dylib on a C++ dylib

2008-09-18 Thread Kiel Gillard
Howdy, I think the following syntax is the right idea: extern "C" { extern void MyFunction(void *args); } However, because it is insanely late, I may be wrong. If you have a look at the headers for Apple's frameworks (eg: one of the Core Foundation headers) you'll see how you should do it.

Re: how to separate the path name from a file name

2008-12-17 Thread Kiel Gillard
Hi there, Not too sure what you mean by "path name", but the API you'll want to look at could be here . Kiel :-) "Violence is the last refug

Re: Sorting a bound NSTableView programatically

2008-12-17 Thread Kiel Gillard
Have you tired [arrayController rearrangeObjects]? You may need to ensure that the sort descriptors of the

Overlay controls a la iTunes and QuickTime

2009-01-06 Thread Kiel Gillard
Howdy all, What would be the best way to implement a HUD-like overlay of controls in the same manner as iTunes and QuickTime? These overlays can be seen when playing a video in iTunes 8 or a full screen video in (at least) the free version of QuickTime. Is there example code or open sourc

Re: Memory management question in Objective-C 2.0 @property notation

2009-02-04 Thread Kiel Gillard
Hi Devraj, If you have declared and synthesized a property: @property (retain, nonatomic) NSString *name; ...then any value assigned to name will retain it. Therefore, to initialise it, you could do something like: self.name = [NSString string]; However, doing this will yield a memory leak:

Re: Memory management question in Objective-C 2.0 @property notation

2009-02-04 Thread Kiel Gillard
On 05/02/2009, at 4:20 PM, Chris Suter wrote: On Thu, Feb 5, 2009 at 4:10 PM, Kiel Gillard wrote: However, doing this will yield a memory leak: self.name = [[NSString alloc] init]; ...because the property definition tells the compiler the methods it synthesizes should retain the value

Re: Memory management question in Objective-C 2.0 @property notation

2009-02-05 Thread Kiel Gillard
Thanks mmalc, that clears things up for me. On 05/02/2009, at 8:08 PM, mmalc Crawford wrote: On Feb 4, 2009, at 10:01 PM, Kiel Gillard wrote: I'm confused as to why else the memory would be leaking? Can you please identify my error? The error is in your explanation. However,

Re: Help with recursive includes

2009-02-21 Thread Kiel Gillard
On 22/02/2009, at 10:27 AM, Aaron Wallis wrote: if I remove the #import "TMPSTManagedFile.h" from the header of the class and change it to @class TMPSTManagedFile the error goes away, and the application *would* run fine, if I didn't start getting errors caused from the ObjC 2.0 style prop

[OT] How do people use and contribute to this list?

2008-10-19 Thread Kiel Gillard
ve to copy and paste relevant information such as previous messages and subject headers into the new reply. Can anyone offer any advice or suggestions? Or should I settle for the cumbersome digest mode? Thanks, Kiel Gillard ___ Cocoa-dev mailing list

Re: [OT] How do people use and contribute to this list?

2008-10-19 Thread Kiel Gillard
On Mon, Oct 20, 2008 at 11:47 AM, Rob Keniger <[EMAIL PROTECTED]> wrote: > > On 20/10/2008, at 10:32 AM, Kiel Gillard wrote: > >> Can anyone offer any advice or suggestions? Or should I settle for the >> cumbersome digest mode? > > > Why not just create a mail

Re: [OT] How do people use and contribute to this list?

2008-10-19 Thread Kiel Gillard
and multiple answers for all sorts of problems. > Nate > > On Oct 19, 2008, at 20:32, Kiel Gillard <[EMAIL PROTECTED]> wrote: > >> Hi all, >> >> I subscribe to the cocoa-dev list RSS feed instead of receiving >> individual or digest emails. I find this

Re: Unregistered weak referrer

2008-10-22 Thread Kiel Gillard
Hi Ross, Do you have garbage collection enabled? Can you give us any hints as to why you'd be getting that message? Kiel On 23/10/2008, at 10:31 AM, Ross Carter wrote: What does this console message mean? malloc: auto malloc[542]: attempted to remove unregistered weak referrer 0x128538c

Re: Unregistered weak referrer

2008-10-22 Thread Kiel Gillard
The removed subview contains 3 NSTextViews, 2 of which have their own layoutManager and textStorage. A lot of code fires at that time. Without knowing what "unregistered weak referrer" means, or how to find what the offending object is, it's hard to know where to start. On Oct

Re: Creating Toolbar Items in IB

2008-10-22 Thread Kiel Gillard
On 23/10/2008, at 12:33 PM, Quincey Morris wrote: On Oct 22, 2008, at 17:39, Graham Cox wrote: I can place a toolbar in my window, and I can add items to it. I can set the delegate outlet of the toolbar to my document controller. What I can't do is to tie any outlets to the toolbar items or

Re: CGPoint wrapper?

2008-10-22 Thread Kiel Gillard
Use NSValue's valueWithPoint class method. Kiel On 23/10/2008, at 1:06 PM, DKJ wrote: I've just found NSPointFromCGPoint() etc,. On 22 Oct, 2008, at 18:49, DKJ wrote: Is there some straightforward way of wrapping a CGPoint so I can put it in an NSArray? I don't want to use a C array beca

Re: /Library/Logs vs. user/Library/Logs

2008-10-22 Thread Kiel Gillard
Hi Chris and welcome to Mac OS X development, The only helpful suggestion I can think of is to have a read of the following document: It *may* help you determine where you want to sto

Re: Hud window controls

2008-10-23 Thread Kiel Gillard
This framework looks pretty good too Kiel On 24/10/2008, at 3:06 AM, I. Savant wrote: On Thu, Oct 23, 2008 at 11:52 AM, Sandro Noel <[EMAIL PROTECTED]> wrote: I am trying to design a HUD window, but the controls (buttons, edit boxes)

Re: When and how often do you mix C++ with Objective C in your project?

2008-10-30 Thread Kiel Gillard
On 31/10/2008, at 10:33 AM, Boon Chew wrote: Hi all, I am a newbie to the cocoa world (PC -> Mac switcher). I have a fair amount of experience coding in C and C++ and I am just getting into Obj C now. Right now I am trying to learn the language idioms and patterns in the Obj C world, sp

Re: deep deep copies, or shallow deep copies?

2008-11-13 Thread Kiel Gillard
Hi Graham, If you do want a deep copy of a collection, check out . NSPropertyListSerialization would be the Cocoa equivalent of this AP

Re: Difference between "Target" and "Executable" ?

2008-11-20 Thread Kiel Gillard
Exectuables specify settings that the running executable should honour (for example, run-time arguments). Targets describe how the source should be compiled, linked, packaged, etc. Therefore, the name of your (compiled, linked, packaged etc) product will be defined in the active target. O

Re: Difference between "Target" and "Executable" ?

2008-11-20 Thread Kiel Gillard
On 21/11/2008, at 12:08 PM, Jean-Nicolas Jolivet wrote: thanks you for all the information! I'm still reading However, this makes me think: Even though the "Executable" (in XCode that is) has the old name, if I look in my project directory under / Build/Debug or /Build/Release , my resu

Re: Autorelease Question

2008-11-20 Thread Kiel Gillard
On 21/11/2008, at 2:55 PM, Adam Leonard wrote: I think this is a bug in the documentation. I am curious to know what others think. While your discovery is interesting, maybe we're not supposed to know how NSString is implemented. Even if on your computer you do not get double free messa

Re: Autorelease Question

2008-11-20 Thread Kiel Gillard
On 21/11/2008, at 3:45 PM, Jim Correia wrote: On Nov 20, 2008, at 11:36 PM, Kiel Gillard wrote: While your discovery is interesting, maybe we're not supposed to know how NSString is implemented. Even if on your computer you do not get double free messages in your run log, a cra

Re: Using a string as filepath

2008-11-26 Thread Kiel Gillard
On 27/11/2008, at 11:09 AM, Knut Lorenzen wrote: Dear list, I would like to name a file according to an user defined entry. However, the user's name entry might be illegal as a filepath, containing illegal characters for a pathname like "." or "-" as 1st character, "/", ":", etc. I've l

Re: how to manage two nib files

2008-12-07 Thread Kiel Gillard

Advice on the suitability of Core Animation in this situation

2009-03-26 Thread Kiel Gillard
Hi all, We're developing a document based app that displays many potentially small and large shapes within a given document, much like a CAD app. We've gone down the path of Core Animation so far and it works for the most part. But we're often limited by the 2048x2048 OpenGL texture size

Re: Storing API keys in plist file

2009-03-27 Thread Kiel Gillard
[NSUserDefaults standardUserDefaults] Kiel :-) "Love does not consist in gazing at each other but looking together in the same direction." Antoine de Saint-Exupery On 28/03/2009, at 2:38 PM, Devraj Mukherjee wrote: Hi all, My app relies on an external RESTful services, the service issues a

Subclassing NSClipView

2009-03-31 Thread Kiel Gillard
Hi all, Bill Dudney provides this sample app to show a CATiledLayer presenting a large image in multiple levels of detail . In his sample code, he implements a rudamentary form of scrolling with the arrow keys. I'd like to sub

Re: App icon

2009-04-01 Thread Kiel Gillard
NSApplication provides the instance method setApplicationIconImage: At startup (say, the applicationDidFinishLaunching: method) you could determine what icon you need to display and set it, using the above method, to the appropriate icns file from your bundle. Note that this will not perman

Re: App icon

2009-04-01 Thread Kiel Gillard
asking about an iPhone application (upon which assumption I based my answer). Dave On Apr 1, 2009, at 6:24 PM, Kiel Gillard wrote: NSApplication provides the instance method setApplicationIconImage: At startup (say, the applicationDidFinishLaunching: method) you could determine what icon you

Re: Looking for [NSNumber numberWithString:]

2009-04-01 Thread Kiel Gillard
As far as I know, this is the simplest way: NSNumber *number = [NSNumber numberWithDouble:[@"3.14159" doubleValue]]; Kiel On 02/04/2009, at 12:17 PM, Greg Robertson wrote: I would like to convert an NSString to an NSNumber. Is there a direct method for this or should I go NSString to double an

Re: Struct Property Key Path

2009-04-14 Thread Kiel Gillard
Hi Richard, You can't bind to the individual members of your struct. You could create a pair of accessor methods for the object containing the struct. These methods could return the values of the struct. For example: @interface MyManagedObject : NSManagedObject { NSPoint origin; }

Re: nstoolbar in tiger

2009-04-16 Thread Kiel Gillard
Hi Rick/Jo/whoever, You don't need to create a subclass of NSwindow, all you need is an object to provide the NSWindow instance a NSToolbar. Running "NSToolbar" through Google would give you this result on the first page: Hope this helps,

Re: How to show items in a list ,grid or coverflow?

2009-04-22 Thread Kiel Gillard
List: NSTableView/NSOutlineView/NSBrowser Grid: NSCollectionView Coverflow: Use a layer backed (Core Animation) NSView Kiel On 23/04/2009, at 12:36 PM, Bright wrote: Hi, In my App's ta

Re: Building a 64-bit Preferences Pane

2009-04-29 Thread Kiel Gillard
Hi Satoshi, If you run this in Terminal: Bugdom:~ kiel$ file /Applications/System\ Preferences.app/Contents/ MacOS/System\ Preferences /Applications/System Preferences.app/Contents/MacOS/System Preferences: Mach-O universal binary with 2 architectures /Applications/System Preferences.app/Conte

Re: Does Cocoa layer translate Objective-C objects to C++?

2009-05-04 Thread Kiel Gillard
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/introObjectiveC.html On 04/05/2009, at 10:17 AM, johnmadst...@yahoo.it wrote: I am confused. I was discussing with a developer about my desire to translate our C+ + code (really simple and few methods and classe

Re: Class Singleton Instantiation

2009-05-14 Thread Kiel Gillard
On 15/05/2009, at 11:32 AM, Eric Hermanson wrote: Is the above paradigm any better/worse than doing something simpler, like the following (which is the paradigm I've been using) The sample code prevents other developers from allocating subsequent instances. See

Re: Class Singleton Instantiation

2009-05-14 Thread Kiel Gillard
The first sentence of my reply should read "The sample code prevents the allocation of subsequent instances". Sorry for the ambiguity. Kiel On 15/05/2009, at 11:46 AM, Kiel Gillard wrote: On 15/05/2009, at 11:32 AM, Eric Hermanson wrote: Is the above paradigm any better/worse

Synthesized properties for scalars not KVO compliant

2009-05-19 Thread Kiel Gillard
Hi all, I have a few scalar (NSUInteger, CGRect etc) ivars in my model objects. I have declared identically named properties for these scalars and instructed the compiler to synthesize accessor methods for them. My controller objects add themselves to the model objects as observers with t

Re: Synthesized properties for scalars not KVO compliant

2009-05-19 Thread Kiel Gillard
I should also mention I am not assigning a value to the scalar directly. On 20/05/2009, at 9:52 AM, Kiel Gillard wrote: Hi all, I have a few scalar (NSUInteger, CGRect etc) ivars in my model objects. I have declared identically named properties for these scalars and instructed the

Re: Sensible way to extend base class?

2009-05-20 Thread Kiel Gillard
Can you use composition in your application to compose an instance of class E with instances of framework classes A through to D? Kiel ;-) "Peace cannot be achieved through violence, it can only be attained through understanding." Albert Einstein On 20/05/2009, at 10:09 PM, Graham Cox wrote

Re: isKindOfClass returns null instead of YES or NO

2009-05-20 Thread Kiel Gillard
%@ is a format specifier for printing Objective-C objects. isKindOfClass and isMemberofClass methods return BOOL values. BOOL values are not Objective-C objects. If you want to log a BOOL value, you could use the format specifier %i as such: NSLog(@"isKindOfClass: %i", myBool); With rega

Compiler does not synthesize KVO compliant properties for CATiledLayer subclass (was: Synthesized properties for scalars not KVO compliant)

2009-05-21 Thread Kiel Gillard
keyPath, [object valueForKey:keyPath]); if (context == &IvarChange) { NSLog(@"Float ivar change"); } else if (context == &StringIvarChange) { NSLog(@"String ivar change"); } else {

Re: Compiler does not synthesize KVO compliant properties for CATiledLayer subclass (was: Synthesized properties for scalars not KVO compliant)

2009-05-21 Thread Kiel Gillard
Hi Dave, On 22/05/2009, at 4:12 PM, Dave Keck wrote: Hello, A few days ago I was having this same issue. The reason KVO doesn't work out-of-the-box with CALayer subclasses, I believe, is because CALayer overrides +automaticallyNotifiesObserversForKey: to return NO. My solution was to override

  1   2   >