Re: Input Managers perspective

2008-11-19 Thread Charles Srstka
On Nov 18, 2008, at 12:42 PM, Donnie Lee wrote: I plan to use Input Managers hack to add functionality to closed-source software. I know that these hacks are not a good programming technics, but there is no other way except using it. I have only one question: will Input Managers be available in

Re: release and reference counting query

2008-11-19 Thread Marc Stibane
Am 18.11.2008 um 20:05 schrieb Andy Lee: On Nov 18, 2008, at 1:33 PM, Marc Stibane wrote: Am 07.11.2008 um 13:17 schrieb Roland King: On Nov 7, 2008, at 7:59 PM, Calum Robertson wrote: Below is a snippet of code from the "Creating an iPhone Application" document from the iPhone DevCenter.

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread mmalcolm crawford
On Nov 18, 2008, at 10:01 AM, Brian Stern wrote: OK Erik, I'll bite. What you describe above is correct as far as it goes. However, when you say all the memory management is handled in one place, of course it's two. The object has to be released. The normal place to release objects is

Re: Opening Ports in Leopard

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 12:08 AM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: > In an other programm (doing Distributed Objects between computers) I found > out that >int y = bind( newSocket, (struct sockaddr *)&serverAddress, > sizeof(serverAddress) ); > wants to have the data in "truc

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread mmalcolm crawford
On Nov 17, 2008, at 9:33 PM, Jeff Laing wrote: How about: http://developer.apple.com/samplecode/CacheInfo-MacOSX/listing1.html (for example) which has the IBOutlet tag on the instance variables rather than the properties; I'll bet its different because properties and instance vars have the same

Re: release and reference counting query

2008-11-19 Thread mmalcolm crawford
On Nov 18, 2008, at 10:33 AM, Marc Stibane wrote: Lets forget for a moment that the dealloc never get's called at all on the iPhone This is simply untrue. viewController = [[UIViewController alloc] initWithNibName:@"MoveMeView" bundle:[NSBundle mainBundle]]; since "viewC

Re: Binding a CoreData string value to an NSTextView

2008-11-19 Thread mmalcolm crawford
On Nov 18, 2008, at 8:42 PM, John Joyce wrote: Has anyone had any success Binding a CoreData string value to an NSTextView? Everything I try seems to be flumoxed by the NSAttributedString of the NSTextStorage backing store.

Re: Noobie Question: NSTableView and XML-RPC

2008-11-19 Thread Kyle Sluder
On Tue, Nov 18, 2008 at 1:42 PM, Kennard Smith <[EMAIL PROTECTED]> wrote: > I'd imagine just setting a dataSource then querying the XML-RPC server for > data when tableView:objectValueForTableColumn:row: is called. The documentation tells you this is a very bad idea: "Note: tableView:objectValue

Re: Window title bar accessory view

2008-11-19 Thread Houdah - ML Pierre Bernard
Hi Andrew, No I am not talking about the toolbar. I am referring to the lock icon and the new green certificate information text displayed by Safari in the window's title bar. iCal displays a pop-up menu where one can pick the time zone. Pierre On 19 Nov 2008, at 03:52, Andrew Merenbach wr

Re: Window title bar accessory view

2008-11-19 Thread Houdah - ML Pierre Bernard
Hi Kyle! Thanks a lot. This sounds like a great idea. I will give it a try ASAP. Pierre On 19 Nov 2008, at 04:03, Kyle Sluder wrote: On Tue, Nov 18, 2008 at 9:26 PM, Houdah - ML Pierre Bernard <[EMAIL PROTECTED]> wrote: I would like to replicate the accessory views found in the top right o

Re: Opening Ports in Leopard

2008-11-19 Thread Gerriet M. Denkmann
On 19 Nov 2008, at 15:59, Kyle Sluder wrote: On Wed, Nov 19, 2008 at 12:08 AM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: In an other programm (doing Distributed Objects between computers) I found out that int y = bind( newSocket, (struct sockaddr *)&serverAddress, sizeof(serverAd

Binding to managedObjectContexts using dictionary hangs

2008-11-19 Thread Arthur C.
I have a Core Data application with a double Core Data implementation, that is, there are two managedObjectModels, persistentStoreCoordinators and managedObjectContexts. These are referenced by the following methods: // appDelegate.h - (NSPersistentStoreCoordinator *) persistentStoreCoordinatorFor

[MyClass class] returning superclass's class

2008-11-19 Thread Ken Tozier
Hi I wrote a subclass of NSCharacterSet and at runtime, when I do [MyClass class] it returns the superclass's class rather than the class value. I suspect this is "normal" but was wondering if there is a way to get my subclass's class rather than it's superclass. __

Re: Writing a more usable AppleEvent logger

2008-11-19 Thread Ken Tozier
On Nov 17, 2008, at 3:51 AM, Jean-Daniel Dupas wrote: Le 17 nov. 08 à 08:06, Ken Tozier a écrit : What do you mean by "this tool" ? export is used to set an environment variable. I guess that system functions that send and receive event just check if the env var is set and log appropriat

Re: OpenGL + NSTextView/NSTextContainer?

2008-11-19 Thread Karan, Cem (Civ, ARL/CISD)
On Tue, 18 Nov 2008 12:26:04 -0800 (PST) Erik Buck wrote: > Open GL has no built-in capability for drawing text. Open GL > provides lower level primitives like lines and curves and > meshes. Open GL also provides texture compositing. > > There are some free and some open text drawing/font so

editWithFrame:inView:editor:delegate:event: in mouseDown:

2008-11-19 Thread Alexander Spohr
Hi list, I am trying to make a subclass of NSControl that is capable of showing variable width (and maybe height) content. Something like a one-row NSTableView without a header. Or like an NSMatrix with variable cell sizes. I tried to do it with only one cell to draw the content which works

Changing Services HotKey at Runtime

2008-11-19 Thread Xavier Snark
Greetings, In my application I would like to change the Services Hotkey combination at runtime. So far, the only Apple documentation that I have found states that the hotkey is configured via the Info.plist file in the application bundle. http://developer.apple.com/documentation/Cocoa/Concep

Re: [MyClass class] returning superclass's class

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 13:32, Ken Tozier a écrit : Hi I wrote a subclass of NSCharacterSet and at runtime, when I do [MyClass class] it returns the superclass's class rather than the class value. I suspect this is "normal" What make you think this is normal ? How do you create your instance ?

Re: [MyClass class] returning superclass's class

2008-11-19 Thread Andy Lee
On Nov 19, 2008, at 7:32 AM, Ken Tozier wrote: I wrote a subclass of NSCharacterSet and at runtime, when I do [MyClass class] it returns the superclass's class rather than the class value. I suspect this is "normal" but was wondering if there is a way to get my subclass's class rather than i

RE: Core data save error with multiple persistent stores [SOLVED]

2008-11-19 Thread Arthur C.
A solution is to have 2 persistentStoreCoordinators and 2 managedObjectContexts, with the Coordinators each having one single persistent store. It is clear that there can be no reassignment problems anymore. However, I don't understand why this seems to be required; that is, why can't I have two m

Re: NSDecimalNumber & NSString question

2008-11-19 Thread Steven Riggs
I would like to add, if you don't use something to validate the user input of your text fields you, will crash with non numeric characters. Steven Riggs On Nov 19, 2008, at 2:36 AM, Ashley Clark <[EMAIL PROTECTED]> wrote: On Nov 18, 2008, at 4:28 PM, Brooke Gravitt wrote: Hello, I'm tryin

InputManagers in Leopard

2008-11-19 Thread Gerriet M. Denkmann
I know that InputManagers are "now officially unsupported." And also that "this functionality is likely to be disabled in a future release." But while it is still possible I would like to continue using them. So I copied my thing into the /Library/InputManagers folder. Then did sudo chown -R r

NSNumberFormatter problem with percentage

2008-11-19 Thread Graham Cox
I'm a bit puzzled by NSNumberFormatter when trying to use it to display values from 0-1 as 0-100% in a text field. In IB, I'm simply choosing the 'Percent' preset from the menu, and using it with floats from 0 to 1, but the field ends up displaying everything 100x too big, i.e. input is 0.5

Re: Writing a more usable AppleEvent logger

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 13:36, Ken Tozier a écrit : On Nov 17, 2008, at 3:51 AM, Jean-Daniel Dupas wrote: Le 17 nov. 08 à 08:06, Ken Tozier a écrit : What do you mean by "this tool" ? export is used to set an environment variable. I guess that system functions that send and receive event just

Re: OpenGL + NSTextView/NSTextContainer?

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 13:39, Karan, Cem (Civ, ARL/CISD) a écrit : On Tue, 18 Nov 2008 12:26:04 -0800 (PST) Erik Buck wrote: Open GL has no built-in capability for drawing text. Open GL provides lower level primitives like lines and curves and meshes. Open GL also provides texture compositing. Th

Re: Writing a more usable AppleEvent logger

2008-11-19 Thread Ken Tozier
On Nov 19, 2008, at 8:52 AM, Jean-Daniel Dupas wrote: The logging is performed by the application itself (I guess this is done in AESendMessage or a lower level private function for send events and in AEDecodeMessage or a lower level private function for received event). I guess the ea

Re: InputManagers in Leopard

2008-11-19 Thread Michael Ash
On Wed, Nov 19, 2008 at 7:04 AM, Gerriet M. Denkmann <[EMAIL PROTECTED]> wrote: > I know that InputManagers are "now officially unsupported." And also that > "this functionality is likely to be disabled in a future release." > But while it is still possible I would like to continue using them. > >

placing a window in the top left corner

2008-11-19 Thread Nick Rogers
Hi, whenever my app opens a second preview window, I want it to be positioned at the top left corner of the desktop screen. I have come across two methods in NSWindow, they are: – setFrameTopLeftPoint: and – cascadeTopLeftFromPoint: But these require a point as input. How do I calculate this p

Re: placing a window in the top left corner

2008-11-19 Thread Joseph Crawford
Wouldn't the point just be 0, 0 in that case? I'm a beginner so I am not positive. On Nov 19, 2008, at 9:47 AM, Nick Rogers wrote: Hi, whenever my app opens a second preview window, I want it to be positioned at the top left corner of the desktop screen. I have come across two methods in NS

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread Brian Stern
On Nov 19, 2008, at 3:59 AM, mmalcolm crawford wrote: On Nov 18, 2008, at 10:01 AM, Brian Stern wrote: OK Erik, I'll bite. What you describe above is correct as far as it goes. However, when you say all the memory management is handled in one place, of course it's two. The object has t

display callbacks

2008-11-19 Thread Alexander Cohen
Hi, Is there a callback available when the display profile is changed by the user or programmatically? Also, is there a calllabck available when the user drags a window between different screens? thx AC ___ Cocoa-dev mailing list (Cocoa-dev@list

RE: placing a window in the top left corner

2008-11-19 Thread Etienne Guérard
Did you look at -[NSScreen visibleFrame]? "The returned rectangle is always based on the current user-interface settings and does not include the area currently occupied by the dock and menu bar. Because it is based on the current user -interface settings, the returned rectangle can change betw

RE: display callbacks

2008-11-19 Thread Etienne Guérard
Did you read the documentation reference for NSWindow? NSWindowDidChangeScreenNotification Posted whenever a portion of an NSWindow object's frame moves onto or off of a screen. NSWindowDidChangeScreenProfileNotification Posted whenever the display profile for the screen containing the window c

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread Greg Titus
On Nov 19, 2008, at 7:00 AM, Brian Stern wrote: This leaves us for now with two solutions: (a) Greg's (override setView:) which is more future-proof but is in many respects academically unsatisfying. (b) For non-top-level-object, specify an assign attribute for the property -- and risk dang

Re: Writing a more usable AppleEvent logger

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 15:43, Ken Tozier a écrit : On Nov 19, 2008, at 8:52 AM, Jean-Daniel Dupas wrote: The logging is performed by the application itself (I guess this is done in AESendMessage or a lower level private function for send events and in AEDecodeMessage or a lower level private fun

Re: display callbacks

2008-11-19 Thread Alexander Cohen
Excellent. I did read the docs but i guess i stopped reading before the end of the page. thx AC On Nov 19, 2008, at 10:24 AM, Etienne Guérard wrote: Did you read the documentation reference for NSWindow? NSWindowDidChangeScreenNotification Posted whenever a portion of an NSWindow object's

Re: Writing a more usable AppleEvent logger

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 16:42, Jean-Daniel Dupas a écrit : Le 19 nov. 08 à 15:43, Ken Tozier a écrit : On Nov 19, 2008, at 8:52 AM, Jean-Daniel Dupas wrote: The logging is performed by the application itself (I guess this is done in AESendMessage or a lower level private function for send event

-(BOOL)handleEvent:(NSEvent*)event client:(id)sender doesn't work

2008-11-19 Thread BirdSong
Hi all,As the documents said, there are three ways to receive input from the client.one of them is keybinding(-(BOOL)inputText:(NSString*)string client:(id)sender;) which works in the sample code.another is -(BOOL) handleEvent:(NSEvent*)event client:(id)sender;I tried to use this one instead o

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread Brian Stern
On Nov 19, 2008, at 10:29 AM, Greg Titus wrote: On Nov 19, 2008, at 7:00 AM, Brian Stern wrote: This leaves us for now with two solutions: (a) Greg's (override setView:) which is more future-proof but is in many respects academically unsatisfying. (b) For non-top-level-object, specify an a

RE: OpenGL + NSTextView/NSTextContainer?

2008-11-19 Thread Karan, Cem (Civ, ARL/CISD)
On Wednesday, November 19, 2008 9:04 AM Jean-Daniel Dupas wrote: > Do you need text editing capability, or just text drawing ? > > If this is text drawing, I don't see what NSTextView provide > that is not possible with NSAttributedString, and so, with > the GLString class that convert an attri

UITextView textViewDidBeginEditing issue

2008-11-19 Thread Bob Sabiston
Hi, I've got a UITextView and I am trying to add a "save" button to the top bar when the user clicks it to start editing. The UIView which contains the textview is a delegate for the TextView, so I have a textViewDidBeginEditing function something like this: - (void)textViewDidBeginEdi

Re: OpenGL + NSTextView/NSTextContainer?

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 17:16, Karan, Cem (Civ, ARL/CISD) a écrit : On Wednesday, November 19, 2008 9:04 AM Jean-Daniel Dupas wrote: Do you need text editing capability, or just text drawing ? If this is text drawing, I don't see what NSTextView provide that is not possible with NSAttributedString,

Info request on developing codec

2008-11-19 Thread Arnab Ganguly
Hi All, I am planning to write a Codec for my application.Can you help on the things I need to take care also please let me know how to integrate the codec. Thanks in advance. Arnab ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not po

Re: Passing TableView information into a new dialog

2008-11-19 Thread Corbin Dunn
Le Nov 18, 2008 à 1:22 PM, Luis a écrit : Hello My objective is to when a user right-clicks on a row in a TableView and selects from the context menu an option, to show a new dialog that handles that option. How would I go to let the new dialog to know the information that was present in

Cocoa apps protection software

2008-11-19 Thread Donnie Lee
Hi! Does anybody know software protection systems for Cocoa apps and bundles? Like in Windows ASProtect, Themida, etc. Donnie. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: Info request on developing codec

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 17:49, Arnab Ganguly a écrit : Hi All, I am planning to write a Codec for my application.Can you help on the things I need to take care also please let me know how to integrate the codec. Thanks in advance. Arnab Image Codec ? Audio Codec ? Video Codec ? Codec for Quic

Re: Cocoa apps protection software

2008-11-19 Thread Nick Zitzmann
On Nov 19, 2008, at 9:53 AM, Donnie Lee wrote: Does anybody know software protection systems for Cocoa apps and bundles? Like in Windows ASProtect, Themida, etc. You're best off making your own. The only one I know of that's out there is AquaticPrime, and it's trivial to crack globally.

Re: NSNumberFormatter problem with percentage

2008-11-19 Thread Quincey Morris
On Nov 19, 2008, at 03:37, Graham Cox wrote: I'm a bit puzzled by NSNumberFormatter when trying to use it to display values from 0-1 as 0-100% in a text field. In IB, I'm simply choosing the 'Percent' preset from the menu, and using it with floats from 0 to 1, but the field ends up displayi

Re: editWithFrame:inView:editor:delegate:event: in mouseDown:

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 7:51 AM, Alexander Spohr <[EMAIL PROTECTED]> wrote: > I am trying to make a subclass of NSControl that is capable of showing > variable width (and maybe height) content. Not entirely sure what you're trying to describe here. It almost sounds like you just want to embed you

Simple single file renaming application ...

2008-11-19 Thread vince
Thanks for the help ... I want to build a simple single file re-namer. Just a window and a textField that displays the current filename, and a text Field and Save option for the edit. So right click a file/"open with" ... the app runs and loads up the current file name prepared for the edit. D

Re: SOLVED Re: NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)

2008-11-19 Thread Rua Haszard Morris
Even better... thanks for the tip. A much simpler approach... On Nov 19, 2008, at 12:53 pm, 11(November)/19/08, Douglas Davidson wrote: On Nov 18, 2008, at 1:57 PM, Rua Haszard Morris wrote: What are the different options for flipping the coordinates of the destination view? I've tried d

Re: Input Managers perspective

2008-11-19 Thread Charles Srstka
On Nov 19, 2008, at 10:06 AM, Donnie Lee wrote: 3. Since there's already an "Input Methods" folder in Leopard that replaces the (supported) functionality of input managers and which developers are encouraged to use instead of input managers, since Apple clearly disapproves of this sort of h

Re: How to get notification of rerun application

2008-11-19 Thread Macarov Anatoli
No. The program starts up automatically upon system logon, and the icon appears in the system tray (near clock). A user may not notice the icon , thus he/she starts the program manually, and then pops up program's main window. Вы у

RE:Window title bar accessory view

2008-11-19 Thread [EMAIL PROTECTED]
There is already some info in the list on this. http://www.cocoabuilder.com/archive/message/cocoa/2004/11/11/121369 The following can be added to an NSWindow category /* window toolbar height */ - (float) toolbarHeight { return NSHeight([NSWindow contentRectForFrameRect:[self frame]

Programmatic NSTableView selection changes

2008-11-19 Thread Brent Burton
Hi, I think I have this figured out, but I wanted to bounce it off the list to see if there's a better way. I wrote a small app that reads in a text file containing a chat log, which contains lines in the format "Speaker: something they said", like a script. The application allows you to select

Decomposing an interface into separate nibs

2008-11-19 Thread Frank Wilson
I'm a newbie to cocoa development and this is my first post to this list, so please bear with me! :) What I want to do is be able to decompose a particular interface into several nibs. Sometimes this feels right to me because I feel that one component on the interface can be reused separately.

NSButton ical Like

2008-11-19 Thread Emmanuel Pinault
How do I make a button like the mini calendar in ical (the one that show the days and when one is selected , it shows the day with a blue gradient)? I looked at the NSButton and NSButtonCell and nothing can set the background directly nor having an image and text on top... My understandin

Re: Cocoa apps protection software

2008-11-19 Thread Robert Černý
2008/11/19 Nick Zitzmann <[EMAIL PROTECTED]>: > > On Nov 19, 2008, at 9:53 AM, Donnie Lee wrote: > >> Does anybody know software protection systems for Cocoa apps and >> bundles? Like in Windows ASProtect, Themida, etc. > > > You're best off making your own. The only one I know of that's out there

Question about NSThread?

2008-11-19 Thread Jean-Nicolas Jolivet
I have an app that generates a bunch of images... the process can be long so I wanted to start it in a separate thread so that the UI can be responsive etc... basically the only thing I did was: [NSThread detachNewThreadSelector:@selector(doLongProcess) toTarget:self withObject:nil]; and

Re: NSButton ical Like

2008-11-19 Thread Nick Zitzmann
On Nov 19, 2008, at 12:37 PM, Emmanuel Pinault wrote: How do I make a button like the mini calendar in ical (the one that show the days and when one is selected , it shows the day with a blue gradient)? You've got to write one yourself and do all of the drawing, calendrical calculations

Re: How to get notification of rerun application

2008-11-19 Thread Kyle Sluder
On Wed, Nov 19, 2008 at 5:49 AM, Macarov Anatoli <[EMAIL PROTECTED]> wrote: > No. The program starts up automatically upon system logon, and the icon > appears in the system tray (near clock). A user may not notice the icon , > thus he/she starts the program manually, and then pops up program's m

Re: NSButton ical Like

2008-11-19 Thread Emmanuel Pinault
On Nov 19, 2008, at 1:01 PM, Nick Zitzmann wrote: On Nov 19, 2008, at 12:37 PM, Emmanuel Pinault wrote: How do I make a button like the mini calendar in ical (the one that show the days and when one is selected , it shows the day with a blue gradient)? You've got to write one yourself

Re: Changing Services HotKey at Runtime

2008-11-19 Thread Peter Ammon
On Nov 19, 2008, at 4:49 AM, Xavier Snark wrote: Greetings, In my application I would like to change the Services Hotkey combination at runtime. So far, the only Apple documentation that I have found states that the hotkey is configured via the Info.plist file in the application bundle.

Re: Simple single file renaming application ...

2008-11-19 Thread Iceberg-Dev
On Nov 19, 2008, at 8:09 PM, vince wrote: Thanks for the help ... I want to build a simple single file re-namer. Just a window and a textField that displays the current filename, and a text Field and Save option for the edit. So right click a file/"open with" ... the app runs and loads

Re: Question about NSThread?

2008-11-19 Thread Jean-Nicolas Jolivet
Mmm I see Well, right now I would say my worker thread is pretty much just reading values (size of image to generate etc)... but it's not "modifying" anything... it doesn't change any variables etc... just reads the info it needs to generate the images and ...well, generates the image

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread Ricky Sharp
On Nov 19, 2008, at 10:13 AM, Brian Stern wrote: I think that you're probably right and that it's redundant. Needless to say, mmalc's best practice has the outlets being released in dealloc. That's why I had that code there in the first place. FWIW, I don't think that UIViewController

NSComboBox beep

2008-11-19 Thread James Walker
If I use the Return key to select an item from the list of a non-editable combo box, there is a beep and the action message is not sent. This does not happen if the mouse is used to select an item. Is this a bug, or am I missing something? The reason I want to use an uneditable NSComboBox in

RE: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread Jeff Laing
> But if your dealloc is like this... > > - (void)dealloc > { > self.thisProp = nil; > self.thatProp = nil; > ... > } > > then you'll be calling the accessors and the right thing will happen > (i.e. release if necessary). This is what I currently do for all dev > work (iPhone or M

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread Brian Stern
On Nov 19, 2008, at 4:41 PM, Ricky Sharp wrote: From Apple's template code, didReceiveMemoryWarning does have these code comments generated: [super didReceiveMemoryWarning]; // Releases the view if it doesn't have a superview // Release anything that's not essential, such as cached data

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread mmalcolm crawford
On Nov 19, 2008, at 7:00 AM, Brian Stern wrote: There are competing issues. Following this best practice forces me to add public properties for all my outlets that my code never uses. This violates encapsulation and seems wasteful and error-prone. No, it's not. The nib-loading mechanis

Re: Cocoa apps protection software

2008-11-19 Thread Michael Ash
On Wed, Nov 19, 2008 at 12:11 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > > On Nov 19, 2008, at 9:53 AM, Donnie Lee wrote: > >> Does anybody know software protection systems for Cocoa apps and >> bundles? Like in Windows ASProtect, Themida, etc. > > > You're best off making your own. The only on

Re: Question about NSThread?

2008-11-19 Thread Kai
It depends... You may well just be lucky that it seems to work (or unlucky, this again depends...). If your worker thread is only reading any data shared with other threads, it will indeed never disturb these other threads (probably just the main thread in your case). But if the main thre

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread j o a r
On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: My understanding (and I'm a noob in this) is that "best practices" recommend that you shouldn't start sending additional messages to an object from inside its dealloc. That is indeed correct. The official guideline is, AFAIK, to not call throu

Re: Changing Services HotKey at Runtime

2008-11-19 Thread Jean-Daniel Dupas
Le 19 nov. 08 à 22:30, Peter Ammon a écrit : On Nov 19, 2008, at 4:49 AM, Xavier Snark wrote: Greetings, In my application I would like to change the Services Hotkey combination at runtime. So far, the only Apple documentation that I have found states that the hotkey is configured via t

Re: Question about NSThread?

2008-11-19 Thread Jean-Daniel Dupas
Yes, as long as you do not access directly your UI from the background thread (you can do it, but using you should use the performOnMainThread: method). Note that you may want to release and recreate your auto release pool from time to time (between each image for example), else your autore

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread mmalcolm crawford
On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: My understanding (and I'm a noob in this) is that "best practices" recommend that you shouldn't start sending additional messages to an object from inside its dealloc. Correct. (This is the one thing I hate the *most* about properties - they re

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread Brian Stern
On Nov 19, 2008, at 5:11 PM, j o a r wrote: On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: My understanding (and I'm a noob in this) is that "best practices" recommend that you shouldn't start sending additional messages to an object from inside its dealloc. That is indeed correct. The of

Re: SOLVED Re: NSAttributedString rendering bugs when rendered with Cocoa Text (rdar://6379047)

2008-11-19 Thread Ken Ferry
On Tue, Nov 18, 2008 at 1:57 PM, Rua Haszard Morris <[EMAIL PROTECTED]> wrote: > What are the different options for flipping the coordinates of the > destination view? I've tried doing it by scaling and translating the > CGContext, but this results in problems with underlining or the character > or

Re: Question about NSThread?

2008-11-19 Thread Michael Ash
On Wed, Nov 19, 2008 at 3:57 PM, Jean-Nicolas Jolivet <[EMAIL PROTECTED]> wrote: > I have an app that generates a bunch of images... the process can be long so > I wanted to start it in a separate thread so that the UI can be responsive > etc... > > basically the only thing I did was: > > [NSThread

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread Michael Ash
On Wed, Nov 19, 2008 at 5:18 PM, mmalcolm crawford <[EMAIL PROTECTED]> wrote: > > On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: >> >> (This is the one thing I hate the *most* about properties - they really >> feel glued on, at this point, rather than being a language feature that >> the "whole com

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread j o a r
On Nov 19, 2008, at 2:22 PM, Brian Stern wrote: That is indeed correct. The official guideline is, AFAIK, to not call through your properties in init / dealloc. For whatever reason UIViewController sets its view property to nil from its dealloc method. Greg's override of setView is based

Autorelease Question

2008-11-19 Thread Carmen Cerino Jr.
I am not sure the best way to phrase this question into words, so I will phrase it using example code. - (NSString*)foo { NSString blah = [NSString string]; . //Now do I do: return blah; //Or: return [[blah retain] autorelease]]; } _

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread mmalcolm crawford
On Nov 19, 2008, at 2:29 PM, Michael Ash wrote: On Wed, Nov 19, 2008 at 5:18 PM, mmalcolm crawford <[EMAIL PROTECTED] > wrote: On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: (This is the one thing I hate the *most* about properties - they really feel glued on, at this point, rather than b

Re: Autorelease Question

2008-11-19 Thread Joseph Crawford
I believe that would better be done like this - (NSString *)foo { NSString blah = [[[NSString alloc] init] autorelease] ... return blah; } I might not be correct as I am a newbie too.. Thanks, Joseph Crawford On Nov 19, 2008, at 5:37 PM, Carmen Cerino Jr. wrote:

Re: Outlets / IBOutlet declarations (was Re: Interface Builder & Wiring Objects)

2008-11-19 Thread mmalcolm crawford
On Nov 19, 2008, at 1:57 PM, Brian Stern wrote: I'm starting to think that maybe using the assign properties is the better way to handle this. That's certainly one approach, and one that was considered. The problem is that you then have to think through every outlet declaration to make s

Re: Question about NSThread?

2008-11-19 Thread Jean-Nicolas Jolivet
Thanks for all the reply! By digging a little deeper I can see that everything isn't working quite as smoothly as I thought it was...! All the info is quite welcomed! Jean-Nicolas Jolivet On 19-Nov-08, at 3:57 PM, Jean-Nicolas Jolivet wrote: I have an app that generates a bunch of images.

Re: Autorelease Question

2008-11-19 Thread Luke the Hiesterman
This is really an objective-c question (and there is an obj-c list). Anyway, whenever you call a convenience class method +[NSString stringWithString:] as opposed to doing an alloc/init you're getting back an autoreleased object. So, if you're returning that value, it would make sense to si

Re: Autorelease Question

2008-11-19 Thread Filip van der Meeren
As long as you do not contain the "blah" in a NSAutoreleasePool, then you do not have an issue... Just use "return blah;". Filip van der Meeren http://www.sourceforge.net/projects/xlinterpreter On 19 Nov 2008, at 23:37, Carmen Cerino Jr. wrote: I am not sure the best way to phrase this quest

Re: Autorelease Question

2008-11-19 Thread Filip van der Meeren
Just one little addition to my previous mail; it is: NSString *blah = [NSString string]; You forgot the star ;-) Filip van der Meeren http://www.sourceforge.net/projects/xlinterpreter On 19 Nov 2008, at 23:47, Filip van der Meeren wrote: As long as you do not contain the "blah" in a NSAutorel

Re: Autorelease Question

2008-11-19 Thread Filip van der Meeren
It will not be contained in a NSAutoreleasePool per-se. Lets say you create a console application, then you would have to make the choice, will I use the NSAutoreleasePool, or try it without (most likely you will, or you wouldn't be able to use autorelease or use any methods that use this me

Re: Autorelease Question

2008-11-19 Thread Shawn Erickson
On Wed, Nov 19, 2008 at 2:45 PM, Luke the Hiesterman <[EMAIL PROTECTED]> wrote: > This is really an objective-c question Actually Cocoa memory management isn't and objective-c topic (unless you are using GC then you get more toward a language level concept)... retain/release/autorelease is a Cocoa

Re: Autorelease Question

2008-11-19 Thread Shawn Erickson
On Wed, Nov 19, 2008 at 2:37 PM, Carmen Cerino Jr. <[EMAIL PROTECTED]> wrote: > I am not sure the best way to phrase this question into words, so I > will phrase it using example code. > > - (NSString*)foo > { > >NSString blah = [NSString string]; > >. > > >//Now do I do: >r

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread Ricky Sharp
On Nov 19, 2008, at 4:11 PM, j o a r wrote: On Nov 19, 2008, at 1:57 PM, Jeff Laing wrote: My understanding (and I'm a noob in this) is that "best practices" recommend that you shouldn't start sending additional messages to an object from inside its dealloc. That is indeed correct. The of

Re: Autorelease Question

2008-11-19 Thread Filip van der Meeren
I disagree, the retain, autorelease and release are all defined within the Foundation framework. And that is something that belongs together with the Objective-C language (according to me); I know it does not need it to exist as a language, but Objective-C is kind of useless without the Found

Re: Autorelease Question

2008-11-19 Thread DKJ
If you've done this: NSString *str = [NSString string]; then you can simply do this: return str; Whoever is getting the returned value should retain it, and then release it when they're done. If you'd done this instead: NSString *str = [[NSString alloc] init]; the

Re: Outlets / IBOutlet declarations (was Re: Interface Builder &Wiring Objects)

2008-11-19 Thread j o a r
On Nov 19, 2008, at 3:05 PM, Ricky Sharp wrote: Now, when you say "call through your properties in init/dealloc", is that explicitly for things set up with @property? Or, has what I've been doing all these years with calls to accessors in init/dealloc really "bad"? There's no differenc

Re: Autorelease Question

2008-11-19 Thread Luke the Hiesterman
Agreed. libc can be considered a part of C, so Foundation is a part of Objective-C. Luke On Nov 19, 2008, at 3:06 PM, Filip van der Meeren wrote: I disagree, the retain, autorelease and release are all defined within the Foundation framework. And that is something that belongs together with

Re: NSButton ical Like

2008-11-19 Thread Andre Masse
I've not used it but this may worth taking a look at: http://code.google.com/p/calendarcontrol/ Andre Masse On Nov 19, 2008, at 14:37, Emmanuel Pinault wrote: How do I make a button like the mini calendar in ical (the one that show the days and when one is selected , it shows the day with a

Re: Autorelease Question

2008-11-19 Thread Filip van der Meeren
I feel the need to express one concern about this topic: If you already know you will autorelease the object and return it, then you should call the autorelease at the same moment you create the object. NSString *str = [[[NSString alloc] init] autorelease]; If you wait until the end of you

Re: Autorelease Question

2008-11-19 Thread Kyle Sluder
Read this document: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Concepts/ObjectOwnership.html#//apple_ref/doc/uid/2043-BEHDEDDB Then read this one: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/MemoryManagementRules.html If you are just

  1   2   >