Re: Using non-id sender in IBAction methods

2009-06-08 Thread Marc Liyanage
On 08.06.2009, at 03:09, Bryan Henry wrote: As someone already said, if your action method is specific enough to the type of sender object I should have been clearer about that. Yes, I am only talking about action methods that are pretty specific and that will not get connected to

- windowDidLoad not getting called !

2009-06-08 Thread Arjun SM
Hi all, I have written an application for which in the about box there is a link to a website. Below is the code for it NSMutableAttributedString *tempCompanyURLString = [[NSMutableAttributedString alloc] initWithString:@www.mycompany.com]; // assume string exists NSRange selectedRange =

NSOpenPanel : Resolving the file paths for symbolic links

2009-06-08 Thread Arun
Hi All, I have an application in which i use NSOpenPanel to select the files. If i login as a root user (System Administrator) and then choose the desktop in NSOpenPanel of my application, then i will get /var/root/Desktop. I need a way that will help me in resolving the path as

Re: NSOpenPanel : Resolving the file paths for symbolic links

2009-06-08 Thread Ken Thomases
On Jun 8, 2009, at 5:41 AM, Arun wrote: I have an application in which i use NSOpenPanel to select the files. If i login as a root user (System Administrator) and then choose the desktop in NSOpenPanel of my application, then i will get /var/root/Desktop. I need a way that will help me in

Re: selecting tab in a tabless NSTabView in IB

2009-06-08 Thread Stephen Blinkhorn
On 7 Jun 2009, at 22:13, Rob Keniger wrote: On 06/06/2009, at 6:08 AM, Stephen Blinkhorn wrote: Does anyone know if it is possible to change the current tab in a tabless NSTabView from within Interface Builder without having to go into the inspector and change tabless style to top tabs,

Re: generation of software license keys

2009-06-08 Thread Tom Hohensee
Try AquaticPrime. It is very good and has good documentation. Tom On Jun 8, 2009, at 2:57 AM, Matthew Delves wrote: Hey Folks, I'm looking for a tutorial or some sample code for creating software licenses for an app I'm developing. Unfortunately the interwebs seem to be rather confusing

RE: generation of software license keys

2009-06-08 Thread Jon C. Munson II
Namaste! While this isn't a direct answer, you may want to just go here: http://www.aquaticprime.com Licensing all done for you! I don't have any affiliation with him/them. I spent a considerable amount of time looking that the problem myself and decided it wasn't worth the headache,

Re: Replacing a tableView Cell with null

2009-06-08 Thread Corbin Dunn
- (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger) row AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER; Thanks a lot, that seems to work really well. However, because I'm only specifying the cell for one column how do I get out of

Re: How to detect a click on app's dock icon (when the app is active)?

2009-06-08 Thread Vadim
Another delegate method also works: - (BOOL)applicationShouldHandleReopen:(NSApplication *)theApplication hasVisibleWindows:(BOOL)flag Could you please tell me if it's OK to use it to ‘unhide’ main window. Thanks! On 08.06.2009, at 4:05, Andy Lee wrote: On Jun 7, 2009, at 8:50 PM, Stuart

Re: Using non-id sender in IBAction methods

2009-06-08 Thread Bill Bumgarner
On Jun 7, 2009, at 6:09 PM, Bryan Henry wrote: I hope you aren't suggesting that he use assertions in production code - that's much worse practice than specifying a non-id parameter for an action method. As someone already said, if your action method is specific enough to the type of

-replaceTextStorage: problem

2009-06-08 Thread Philip White
Hello, I'm not sure I understand what is wrong with my program well enough to ask an intelligent question but here goes: I have subclassed NSTextStorage. Everything works fine when I initially setup the text system objects; my NSTextView displays what I want it to. However, when I

Re: Shadow is inside of the object. After Clipping object does not show.

2009-06-08 Thread Kyle Sluder
You need to post your code. It sounds like you're trashing the graphics context somehow. --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

How to tell if a Panel is Open

2009-06-08 Thread K. Darcy Otto
In my -validateUserInterfaceItem: method, I need to know whether a particular panel is open (and this panel comes down as a sheet in front of the main window). How can I determine whether that panel has come down as a sheet? I have tried the following: (1) Setting a flag in

Anyone at WWDC?

2009-06-08 Thread Martin Stoufer
Any interest in meeting fellow list members for some beer activities near by? Yes, we can also talk shop if you so feel inclined. -Martin P.S. reply directly for ph#/meeting location. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Accessing variable set in 'Other C Flags'

2009-06-08 Thread Miles
I was reading on a couple blogs about setting 'Other C Flags' to -DTARGET_NAME=${TARGET_NAME} so that I can have multiple targets and differentiate between them in my code. But when I try to access it in my code it keeps treating the value of TARGET_NAME as a variable. In other words, if

Re: How to tell if a Panel is Open

2009-06-08 Thread Nick Zitzmann
On Jun 8, 2009, at 2:08 PM, K. Darcy Otto wrote: In my -validateUserInterfaceItem: method, I need to know whether a particular panel is open (and this panel comes down as a sheet in front of the main window). How can I determine whether that panel has come down as a sheet?

Re: Accessing variable set in 'Other C Flags'

2009-06-08 Thread Greg Parker
On Jun 8, 2009, at 1:18 PM, Miles wrote: I was reading on a couple blogs about setting 'Other C Flags' to -DTARGET_NAME=${TARGET_NAME} so that I can have multiple targets and differentiate between them in my code. But when I try to access it in my code it keeps treating the value of

Re: How to tell if a Panel is Open

2009-06-08 Thread K . Darcy Otto
Since the link isn't working for me, could you give me an idea of what part and document you are referring to? Is it, by any chance, the - attachedWindow method? I tried this, but I get (null), whether or not the sheet is open. Interestingly, if I send -isSheet to the sheet, I get YES

How to get a NSButton (check box) state

2009-06-08 Thread Martin Batholdy
Hi, I have added a NSButton Check Box to a window. Now I want to grab the state of this check box. I added an IBOutlet to my header file and connected it with the check box in Interface Builder; IBOutlet NSButton *launchOption; Now I want to test the state via; if([launchOption state]

Re: How to get a NSButton (check box) state

2009-06-08 Thread KK
Use [launchOption state] == NSOnState or [launchOption state] == NSOffState Keita On Mon, Jun 8, 2009 at 5:52 PM, Martin Batholdy batho...@googlemail.comwrote: Hi, I have added a NSButton Check Box to a window. Now I want to grab the state of this check box. I added an IBOutlet to my

Re: How to get a NSButton (check box) state

2009-06-08 Thread Greg Guerin
Martin Batholdy wrote: Now I want to test the state via; if([launchOption state] == 0) { NSLog(@A); } else if([launchOption state] == 1) {NSLog(@B); } The answer of this if / else statement is always A and I don't understand why. In addition to what was said about using NSOnState

Re: How to get a NSButton (check box) state

2009-06-08 Thread Martin Batholdy
Use [launchOption state] == NSOnState or [launchOption state] == NSOffState I have tried this before, but that does not change the behavior. I have checked the connection in IB again ... but that seems also ok. Is there another mistake that can be made concerning the issue ...? Am

Re: How to get a NSButton (check box) state

2009-06-08 Thread Steve Bird
On Jun 8, 2009, at 6:33 PM, Martin Batholdy wrote: Use [launchOption state] == NSOnState or [launchOption state] == NSOffState I have tried this before, but that does not change the behavior. I have checked the connection in IB again ... but that seems also ok. Is there another mistake

Re: How to get a NSButton (check box) state

2009-06-08 Thread Martin Batholdy
You are right ... there is something wrong with the connection. What I have done is the following; IBOutlet NSButton *launchOption; I have connected this Outlet with the NSButton by ctrl+dragging from the NSObject to the CheckBox in the window. Then I control+dragged from the NSButton to

Re: How to get a NSButton (check box) state

2009-06-08 Thread Martin Batholdy
WHEN are you looking at the state? I look at the state in the method that is invoked by the NSButton (clicking on it). Am 08.06.2009 um 23:58 schrieb KK: Use [launchOption state] == NSOnState or [launchOption state] == NSOffState Keita On Mon, Jun 8, 2009 at 5:52 PM,

Re: How to get a NSButton (check box) state

2009-06-08 Thread KK
in that case, you should use [sender state] K On Mon, Jun 8, 2009 at 6:54 PM, Martin Batholdy batho...@googlemail.comwrote: WHEN are you looking at the state? I look at the state in the method that is invoked by the NSButton (clicking on it). Am 08.06.2009 um 23:58 schrieb KK:

Re: How to get a NSButton (check box) state

2009-06-08 Thread Martin Batholdy
in that case, you should use [sender state] K Thanks! That did it! But what do I have to do if I want to set the state in the awakeFromNib? I tried: [launchOption setState:NSOnState]; [launchOption setState:1]; But the Button stays on Off state (like in Interface Builder set)...

Re: How to get a NSButton (check box) state

2009-06-08 Thread Ken Thomases
On Jun 8, 2009, at 5:48 PM, Martin Batholdy wrote: You are right ... there is something wrong with the connection. What I have done is the following; IBOutlet NSButton *launchOption; I have connected this Outlet with the NSButton by ctrl+dragging from the NSObject to the CheckBox in the

Add app to launch on startup list via AppleScript

2009-06-08 Thread Martin Batholdy
Hi, I have the following AppleScript that let me add an application to the launch on startup menu: tell application System Events make login item at end with properties {path:..., kind:application} end tell The script works fine when I start it in the script editor for

NSButtonCell never asked to draw its whole rect -- clips at width 54.0

2009-06-08 Thread Jerry Krinock
I need to create a couple of radio buttons programatically. So I create an NSMatrix whose cell is an NSButtonCell. Everything works fine except that when the window is drawn, the system seems to think that the cell is only 54 points wide when in fact its size.width is 54. Thus, the

Re: Add app to launch on startup list via AppleScript

2009-06-08 Thread Chunk 1978
if you're distributing for Leopard only, use this: -=-=-=-=-=-=-=- @interface Preferences (PrivateMethods) - (void)enableLoginItemWithLoginItemsReference:(LSSharedFileListRef )theLoginItemsRefs ForPath:(CFURLRef)thePath; - (void)disableLoginItemWithLoginItemsReference:(LSSharedFileListRef

Re: NSButtonCell never asked to draw its whole rect -- clips at width 54.0

2009-06-08 Thread Erik Buck
Set the frame of the NSMatrix. Use -sizeToFit. - or- create and size the matrix the way you want it in IB; save it as a stand alone view; load it; add it as a subview, and add/remove cells to suit your needs. ___ Cocoa-dev mailing list

Re: A couple questions about graphics

2009-06-08 Thread Erik Buck
Announced publicly today: Digital Asset Exchange support. Collada Digital Asset Exchange (.dae) files are a popular way to share 3D models and scenes between applications. Preview now displays these files with OpenGL-powered 3D graphics, so you can zoom and rotate around a 3D scene and play

Re: -replaceTextStorage: problem

2009-06-08 Thread Douglas Davidson
On Jun 8, 2009, at 12:00 PM, Philip White wrote: I have subclassed NSTextStorage. Everything works fine when I initially setup the text system objects; my NSTextView displays what I want it to. However, when I later call NSLayoutManager's replaceTextStorage:, it simply does not do

Re: NSButtonCell never asked to draw its whole rect -- clips at width 54.0

2009-06-08 Thread Jerry Krinock
On 2009 Jun 08, at 17:20, Erik Buck wrote: Set the frame of the NSMatrix. Use -sizeToFit. Thank you, Eric. Indeed, using -sizeToFit instead of -sizeToCells fixes it. (Did not try your other method since it does not suit my needs.) ___

no scroll bars (NSTableView)

2009-06-08 Thread Martin Batholdy
hi, I have set up a NSTableView in the Interface Builder. I have connected this with a NSObject Outlet. And I have set the data source of the NSTableView to the NSObject. The problem I have is that there don't appear any scroll bars even when the content doesn't fit. I have a method called

Re: Flipped Coordinates

2009-06-08 Thread David Duncan
On Jun 8, 2009, at 6:15 PM, David Blanton wrote: I just do not understand 'flipped coordinates', i.e. I know what they are but what should I do so this string draws in the correct orientation? drawRect is in a UIView You shouldn't have to do anything... are you finding your test is

self Changes on Open Panel

2009-06-08 Thread K. Darcy Otto
I'm having some problems pinning down what is going on when I open a panel: object variables seem to get reset somehow, and self seems to change. Here is some code, from my NSDocument subclass (MyDocument): -(void)windowWillBeginSheet:(NSNotification *)notification { sheetOpen =

Re: Flipped Coordinates

2009-06-08 Thread David Duncan
On Jun 8, 2009, at 10:12 PM, David Blanton wrote: Yes, the text is upside down. The context that you get when you draw into a UIView should be setup correctly such that you don't have to do anything to get your text right side up - if you've made any changes to the context's transform

Re: self Changes on Open Panel

2009-06-08 Thread Fritz Anderson
On 8 Jun 2009, at 10:02 PM, K. Darcy Otto wrote: The sheet opens at *. Two questions: (i) why is MyDocument at a different address before and after * (incidentally, it changes back to 0x1036290 after the sheet has closed)? (ii) Why is sheetOpen (which is a class variable) not YES after *