Re: Drawing over a transparent background

2009-09-01 Thread Ron Fleckner
s something I'm doing or not doing that I should/shouldn't. Thanks in advance to anyone with the time to look at it. Ron Fleckner On 24/08/2009, at 9:33 AM, Ron Fleckner wrote: Hi, I asked about this on quartz-dev but go no reply after a few days so I'm asking here. My b

Re: Drawing over a transparent background

2009-09-01 Thread Ron Fleckner
On 01/09/2009, at 8:36 PM, Dave Keck wrote: I believe you need to tell the window to invalidate its shadow. The end of ClockView's drawRect: is a bad place to do it, but as a proof of concept: - (void)drawRect: (NSRect)rect { ... lots of drawing code ... [[self window] invalidate

Re: Drawing over a transparent background

2009-09-01 Thread Ron Fleckner
On 01/09/2009, at 10:47 PM, Dave Keck wrote: Probably wherever you do the -setNeedsDisplay: for the view would be about right... ;-) Unfortunately that's not a good place either - the window's shadow needs to be invalidated after the drawing actually occurs, not just when the dirty flag is s

Re: Drawing over a transparent background

2009-09-01 Thread Ron Fleckner
On 01/09/2009, at 11:31 PM, Dave Keck wrote: For the record... It's considered best practice to limit your drawRect: methods to strictly drawing. Often it's handy to take advantage of drawRect: for testing, but in production code, my original suggestion isn't a good idea. 8) In the past I've

Re: login items hide box

2009-09-24 Thread Ron Fleckner
On 24/09/2009, at 10:14 PM, Rick C. wrote: hello, i have an app that when added to a user's login items with the hide box checked it still shows its main window when starting up on leopard. on snow leopard it properly stays hidden. on a personal note i had this same issue with mail on

Re: NSView clicking through to superview

2009-09-27 Thread Ron Fleckner
On 28/09/2009, at 12:36 PM, PCWiz wrote: Hi, I have a transparent black NSView that I layer over my window using NSView's addSubview method. This works fine, but I want to make it so that all clicks are captured by the NSView, because right now I can click through to the superview undern

Re: [iPhone] Application running for the very first time...

2009-10-01 Thread Ron Fleckner
On 02/10/2009, at 3:57 PM, James Lin wrote: Thank you for the code snipet, but I am confused at the logic here... the following code will be executed EVERY time the program runs, right? NSMutableDictionary *dictionary = [[NSMutableDictionary alloc] initWithCapacity:10]; [dictionary se

Re: Keeping NSWindow below all other windows

2009-10-03 Thread Ron Fleckner
On 04/10/2009, at 3:12 AM, PCWiz wrote: Hi, I have a full screen borderless NSWindow. The problem is that it covers all other windows (Finder windows and app windows). How do I make it so that the window is kept below ALL other windows. Thanks [myWindow setLevel:]; check the docs. ___

Re: A distinct group of pictures in the bundle

2009-10-28 Thread Ron Fleckner
When you add your folder of jpgs to your project, be sure to set "Create folder references for any added folders" to true. Also don't forget to check the checkbox with "Copy items into destination group's folder, if needed." Then you can do, for example: NSString *bellSoundPath = [[NSBun

Re: A distinct group of pictures in the bundle

2009-10-29 Thread Ron Fleckner
his was fixed. I should have gone to the doc first Thanks Pierre 2009/10/29 Ron Fleckner When you add your folder of jpgs to your project, be sure to set "Create folder references for any added folders" to true. Also don't forget to check the checkbox with "Copy items

Re: The ghost in the bundle

2009-10-29 Thread Ron Fleckner
On 30/10/2009, at 3:16 PM, Graham Cox wrote: On 30/10/2009, at 2:51 PM, Pierre Berloquin wrote: It looks like the app is going to carry a ghost load forever, that I don't need. What can I do? Are you sure you did a clean build? If not, the new folder will be added, but the OLD resourc

Re: The ghost in the bundle

2009-10-30 Thread Ron Fleckner
c pictures, and all of them distinct from the basic navigation pictures and icons. Starting each time from scratch doesn't seem to be the right iPhone philosophy so there must be a catch somewhere. Pierre 2009/10/30 Ron Fleckner On 30/10/2009, at 3:16 PM, Graham Cox wrote: On 30

Pausing an NSThread

2009-11-07 Thread Ron Fleckner
Hi all, I've finally worked out a way to pause a thread and would like to know if what I'm doing is dangerous or bad or...? This is a small proof-of-concept/test kind of project. I've had a look at NSConditionLock, but I don't get the concepts. So I've got this naïve solution, which is a

Re: Pausing an NSThread

2009-11-07 Thread Ron Fleckner
le, that I need to do some (or a lot of) general background research on threading and locks and what it all means. Thanks very much to both of you. On 08/11/2009, at 2:36 PM, Kyle Sluder wrote: On Sat, Nov 7, 2009 at 7:28 PM, Ron Fleckner > wrote: The CPU usage goes down to zero accordin

Re: Pausing an NSThread

2009-11-08 Thread Ron Fleckner
On 08/11/2009, at 4:34 PM, Greg Guerin wrote: Ron Fleckner wrote: I've finally worked out a way to pause a thread and would like to know if what I'm doing is dangerous or bad or...? Exactly what problem are you trying to solve? Pausing a thread is always potentially dangerous.

Re: Pausing an NSThread

2009-11-08 Thread Ron Fleckner
Many thanks to all who helped with this. I've had some very useful discussion off-list with Roland King and I'm on my way to threading nirvana. Ron ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Re: beginner question, NSNumber, NSDecimalAsNumber

2009-11-09 Thread Ron Fleckner
On 09/11/2009, at 3:53 AM, Jay Swartzfeger wrote: Hi all, I'm an absolute beginner to Objective-C (and programming in general). I have lots of books on order, but I've been messing with Xcode/Cocoa/iPhone SDK with online resources while I wait. My question -- for my next project, I want to do

Re: Lock a file in cocoa

2010-03-19 Thread Ron Fleckner
On 19/03/2010, at 8:59 PM, Nikhil Khandelwal wrote: Hi, Is there any way to lock a file in cocoa? I want to lock a file on desktop programmatically so that I can't move that file to trash until I unlock the file. Thanks, Nikhil Hi Nikhil, here's how I do it: NSFileManager *f

Re: ATTR_CMN_CHGTIME

2010-03-21 Thread Ron Fleckner
On 22/03/2010, at 10:01 AM, gMail.com wrote: Hi, I cannot find a Cocoa API to set the "Attribute Modification Date" of a file. If there is a way, may you please let me know? In the meantime, on MacOS X 10.5.8, I have been trying to use setattrlist with ATTR_CMN_CHGTIME, unsuccessfully. A

Re: ATTR_CMN_CHGTIME

2010-03-21 Thread Ron Fleckner
On 22/03/2010, at 11:28 AM, James W. Walker wrote: On Mar 21, 2010, at 4:20 PM, Ron Fleckner wrote: On 22/03/2010, at 10:01 AM, gMail.com wrote: Hi, I cannot find a Cocoa API to set the "Attribute Modification Date" of a file. If there is a way, may you please let me know?

Re: programmitically creating nstextfield

2010-04-14 Thread Ron Fleckner
On 15/04/2010, at 2:24 PM, mark wrote: Would someone please tell me why this text field will not show. It is driving me spastic. The window and text field are valid. And there are no errors. The window shows but the text field does not. relativeToWindow is valid. NSRect w=[relativeToWindow f

Re: NSTableView delete row with key?

2010-04-21 Thread Ron Fleckner
On 21/04/2010, at 5:15 PM, Chris Idou wrote: What would be the appropriate way to have an NSTableView notice that you hit the delete key and delete the current row? Rough guess: override delete, remove the item in your storage class that the row represents, reload the tableview. Ro

Re: Make About window respond to ⌘W in UI-le ss application

2010-04-26 Thread Ron Fleckner
On 27/04/2010, at 8:21 AM, Michael Dippery wrote: I'm building a Cocoa application that runs as an item in the status bar, and I'm using LSUIElement to prevent the app's icon from appearing in the Dock. This application has an About window and an item to activate that window, using the sta

Re: Make About window respond to ⌘W in UI-le ss application

2010-04-27 Thread Ron Fleckner
On 27/04/2010, at 11:49 PM, Michael Dippery wrote: Don't why it's not working for you. My LSUIElement app similarly has no menu bar or dock icon, but it's various ancillory windows (About plain vanilla version, Preferences) respond to key board short cuts which are set in the main menu ni

Re: Make About window respond to ⌘W in UI-le ss application

2010-04-27 Thread Ron Fleckner
On 27/04/2010, at 11:49 PM, Michael Dippery wrote: Don't why it's not working for you. My LSUIElement app similarly has no menu bar or dock icon, but it's various ancillory windows (About plain vanilla version, Preferences) respond to key board short cuts which are set in the main menu ni

Re: Make About window respond to ⌘W in UI-le ss application

2010-04-27 Thread Ron Fleckner
On 28/04/2010, at 5:06 AM, Michael Dippery wrote: Sorry, didn't read your email properly. If you've already created a menu in your MainMenu nib and it's not working, perhaps you haven't actually made the connection in the nib. If that's the case, then you just need to Control-drag from y

Re: Help w/ first step of creating Help Book for app

2010-05-28 Thread Ron Fleckner
On 29/05/2010, at 2:29 PM, Shane wrote: I'm trying to create a help book for my app using the "Apple Help Programming Guide", which is not easy for me to follow... Stop right there! Fortunately, Matt Neuburg has created a very helpful short movie showing exactly how to do this. As Matt sa

Re: A problem with PopupButtonCell --- submenu selection not available

2010-07-05 Thread Ron Fleckner
On 05/07/2010, at 9:32 PM, Motti Shneor wrote: > This works nicely until the menu has submenus. If a user selects an > item that belongs to a submenu --- then > > resultIndex = [popUpButtonCell indexOfSelectedItem]; returns -1 (unknown) > result = [popUpButtonCell selectedItem]; returns n

Re: Adding an image to a project

2010-07-15 Thread Ron Fleckner
On 15/07/2010, at 5:18 PM, Vincenzo Morgante wrote: > The path for resource is not displayed because the object 'imageName' is > nil.Why this object is nil?I added the file "report.png" to the folder > Resources of my project: Hello Vincenzo, just a wild guess from an amateur: Did you just p

Re: Adding an image to a project

2010-07-15 Thread Ron Fleckner
15/07/2010, at 6:12 PM, Vincenzo Morgante wrote: > Right-click on the Resources folder in Xcode's files pane on left and choose > "Add Existing files..." from the menu. > Then I selected the option "Copy..." in order to copy the image from the > source folder.

Re: Adding an image to a project

2010-07-15 Thread Ron Fleckner
On 15/07/2010, at 7:25 PM, Vincenzo Morgante wrote: > The subfolder "Resources" does not exist... The Resources folder exists inside your built executable's package. You don't add files to that after the build using the Finder. I suspect you have dragged your image into your projects folder i

Re: print object by %@

2010-07-22 Thread Ron Fleckner
On 22/07/2010, at 9:32 PM, Ariel Feinerman wrote: > Hi developers, > > I search in google, but can see nothing. Is there Cocoa fuction for objects > like printf(), without timestamps? > > -- > best regards > Ariel Depending on the information you want to see in printf, you can use NSStringFr

Re: view:(QTMovieView *)view willDisplayImage:

2011-08-06 Thread Ron Fleckner
On 06/08/2011, at 9:00 PM, julius wrote: > The need for the child window to have a minimum alpha of 0.05 in order for it > to receive mouse events has an acceptably small effect on the movie's colour. Hey Julian, this should allow you to get rid of that 0.05 of darkness: setIgnoresMouseEvents:

Persistant reference to file that is not a path?

2011-08-25 Thread Ron Fleckner
Hello all, not even sure where to start looking for this, but is there a way to have a reference to a file so that one can open it even after it has moved? That is, without having to save the path as the key to the file. I'd like to be able to allow the user to move files if s/he wants and sti

Re: Persistant reference to file that is not a path?

2011-08-25 Thread Ron Fleckner
tories/AccessingFilesandDirectories.html#//apple_ref/doc/uid/TP40010672-CH3-SW5 > > > On Aug 25, 2011, at 11:37 PM, Ron Fleckner wrote: > >> Hello all, >> >> not even sure where to start looking for this, but is there a way to have a >> reference to a file so that one

Re: Persistant reference to file that is not a path?

2011-08-25 Thread Ron Fleckner
ile reference URLs and bookmarks: > http://developer.apple.com/library/mac/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/AccessingFilesandDirectories/AccessingFilesandDirectories.html#//apple_ref/doc/uid/TP40010672-CH3-SW5 > > > On Aug 25, 2011, at 11:37 PM, Ron Fl

Re: Persistant reference to file that is not a path?

2011-08-25 Thread Ron Fleckner
On 26/08/2011, at 2:18 PM, Joar Wingfors wrote: > > On 25 aug 2011, at 21:15, Ron Fleckner wrote: > >> Oh I see now that file reference URLs and bookmarks are 10.6 only. I'm >> making a tool for musicians, most of whom aren't too well off and so I >> t

Re: Linking an NSWindow in IB

2011-08-31 Thread Ron Fleckner
On 31/08/2011, at 3:30 PM, Guy Halford-Thompson wrote: > This is somewhat of a basic question, but I am having a lot of trouble > getting it to work. > > When my app loads, I check for certain parameters, and then display an > NSWindow. > > I have created the window in IB and also created a cu

Re: Problems with firstResponder

2011-08-31 Thread Ron Fleckner
On 01/09/2011, at 7:05 AM, Geert-Jan Korsbø Nilsen wrote: > Im working on a tiny app just to learn cocoa, and Im having a hard time with > setting FirstResponder to some NSTextFields. > > When the view opens, I want the first NSTextField, clientNumber, to be > selected, so I trigger [clientNum

Re: Problems with firstResponder

2011-08-31 Thread Ron Fleckner
ow makeFirstResponder:self.invoiceCredit]; > > Now nothing works... > > > On Aug 31, 2011, at 11:22 PM, Ron Fleckner wrote: > >> >> On 01/09/2011, at 7:05 AM, Geert-Jan Korsbø Nilsen wrote: >> >>> Im working on a tiny app just to learn c

Re: How to remove items from NSCollectionView without view selection

2011-10-17 Thread Ron Fleckner
On 18/10/2011, at 4:25 PM, Sandeep Mohan Bhandarkar wrote: > Hi All, > > I have created a NSCollectionView currently i am able to add prototypeItems > to this view. For removing items i have a "-" button which i have placed > in the prototypeItemView itself. I have also written an IBAction for

Re: Transparent window not getting mouse down events

2012-01-31 Thread Ron Fleckner
On 01/02/2012, at 7:59 AM, Marshall Houskeeper wrote: > I would like to create a transparent window that spans all the screens and > that handles mouse down events. Below is the code that I use to create my > transparent window. The transparent window gets created and display > successfull

Re: 10.6 Snow Leopard API for blocking screensaver/idle?

2011-02-14 Thread Ron Fleckner
On 15/02/2011, at 9:03 AM, Eric Wing wrote: > Is there an API in Snow Leopard to suppress/block/prevent the > screensaver from coming up? (I work with a lot of games/multimedia > where I don't want the screen to go to screensaver and the input > devices in use may not reset the idle counter.) For

Re: drawRect not getting called when needed under OS X

2011-07-23 Thread Ron Fleckner
Tom, if you want to draw in a view from somewhere else, I think you need to bracket that drawing with calls to [targetView lockFocus] and [targetView unlockFocus]. Or, you could have a condition of some sort, a BOOL I suppose, in the targetView which it checks every time it redraws to see if it

Re: View sizing issue when using "disclosure view"

2009-12-01 Thread Ron Fleckner
On 02/12/2009, at 2:14 PM, Bryan Zarnett wrote: I'm having trouble making sure I have the correct springs and struts for my view. At the top of the view I have a Split View that when the user resizes the window in height or length, the split view should appropriately resize. At the botto

Re: View sizing issue when using "disclosure view"

2009-12-01 Thread Ron Fleckner
I wrote: [content addSubview:autoPilotMaxView]; whoops, meant to say: [content addSubview:myBox]; HTH, Ron ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moder

Re: help system structure

2010-01-07 Thread Ron Fleckner
On 07/01/2010, at 4:24 PM, Shane wrote: I'm trying to implement a help system and don't understand the structure. Here's how my current XCode project is laid out. MyApp |- AquaticPrime.framework |- build |- English.lproj |- images |- Importer |- includes |- MyApp-Info.plist |-

Re: Enabling NSZombieEnabled programatically

2010-01-09 Thread Ron Fleckner
On 10/01/2010, at 3:46 PM, Jim Correia wrote: On Jan 9, 2010, at 7:54 PM, Graham Cox wrote: I'm getting something odd though. If I set NSZombieEnabled during app delegate -applicationDidFinishLaunching: method from my preference, a later deliberate over-release still causes a EXC_BAD_ACC

Re: Enabling NSZombieEnabled programatically

2010-01-09 Thread Ron Fleckner
On 10/01/2010, at 5:17 PM, Dave Keck wrote: Hmm... I'm interested in this. But how can code be executed before main() gets control? Isn't main() the first thing that gets called? Or would it be in a helper app which sets your target app's environment variables? See the docs for +load

Re: Application help window size

2010-01-13 Thread Ron Fleckner
On 13/01/2010, at 7:35 PM, Alexander Bokovikov wrote: Hi, All, Does anybody know how could I define default help window width? I've created a navigation menu, which is too wide for default window, so horizontal scrollbar appears. Or should I adjust my help design to the existing help windo

Re: How to show progress indicator for background job

2010-01-17 Thread Ron Fleckner
On 17/01/2010, at 4:06 PM, Grant Christensen wrote: Hi, apologies for having a wrong topic, replied instead of created a new message. On 16/01/2010, at 11:25 PM, Grant Christensen wrote: Hi all, Somewhat new to cocoa (Mac even) development, and I have a UI layout question that I am hop

Re: View Handling

2010-01-22 Thread Ron Fleckner
On 23/01/2010, at 8:57 AM, David Blanton wrote: I have two views that need to occupy the same space and have their visibility toggled via an action. I first overlaid one on the other setting it hidden, all done in IB. Then in code set one hidden the other visible at which time it dawned o

Re: MVC design Q - remembering Core Data selections

2010-01-25 Thread Ron Fleckner
On 25/01/2010, at 8:42 PM, Ken Tabb wrote: On 25 Jan 2010, at 9:38, Tabb, Ken wrote: Hi folks, I have a Core Data app that needs to remember state of selected items between launches. The app's UI is a bit like iTunes (containers / playlists down the side and contents show in a big tablevie

Re: Rotating an NSImage around it's own center as well as offset to origin

2010-02-21 Thread Ron Fleckner
On 22/02/2010, at 10:43 AM, Alexander Hartner wrote: I would like to rotate and offset an NSImage and then draw it onto an NSImageView. So far I figured out to use Quartz and use CGContextRotateCTM and CGContextTranslateCTM. I got the offset working just fine using this, but as soon as I i

Re: Unable to receive keyDown Event in NSBorderlesswindow

2010-03-11 Thread Ron Fleckner
On 11/03/2010, at 10:57 PM, Poonam Virupaxi Shigihalli wrote: Hi, I am using NSBorderless style mask for window and I am unable to receive the NSKeyDown event for that window.But if I make the window style as titled then I am able to receive the keyDown events. I am using below functi

Drawing over a transparent background

2009-08-23 Thread Ron Fleckner
Hi, I asked about this on quartz-dev but go no reply after a few days so I'm asking here. My borderless window has a semi-transparent background. When the drawing in a subview changes, the background retains a ghost of the original drawing in the subview. I don't want that ghost image!

Re: Drawing over a transparent background

2009-08-24 Thread Ron Fleckner
On 24/08/2009, at 2:29 PM, Rob Keniger wrote: On 24/08/2009, at 9:33 AM, Ron Fleckner wrote: My borderless window has a semi-transparent background. When the drawing in a subview changes, the background retains a ghost of the original drawing in the subview. I don't want that

Re: Drawing over a transparent background

2009-08-24 Thread Ron Fleckner
On 25/08/2009, at 6:21 AM, Steve Christensen wrote: On Aug 23, 2009, at 10:00 PM, Ron Fleckner wrote: On 24/08/2009, at 2:29 PM, Rob Keniger wrote: On 24/08/2009, at 9:33 AM, Ron Fleckner wrote: My borderless window has a semi-transparent background. When the drawing in a subview

Re: Drawing over a transparent background

2009-08-24 Thread Ron Fleckner
On 25/08/2009, at 8:44 AM, Alastair Houghton wrote: On 24 Aug 2009, at 23:36, Ron Fleckner wrote: I think you are right to suggest drawing it all in one view. That would probably avoid the problem. The reason I don't is I'm too much of a maths dolt to be able to work out th

Re: Drawing over a transparent background

2009-08-24 Thread Ron Fleckner
On 25/08/2009, at 10:56 AM, Graham Cox wrote: On 25/08/2009, at 8:36 AM, Ron Fleckner wrote: I think you are right to suggest drawing it all in one view. That would probably avoid the problem. The reason I don't is I'm too much of a maths dolt to be able to work out th

64KB limit in passed in text for a service using NSTask

2010-08-19 Thread Ron Fleckner
Hi, I'm developing a stand alone text service for changing/fixing case. For the simple cases of uppercasing and lowercasing I've simply used NSString's built in methods. But to correct sentence case, where the original text may have lowercase letters following full stops (period in American?)

Re: 64KB limit in passed in text for a service using NSTask

2010-08-19 Thread Ron Fleckner
On 20/08/2010, at 2:37 PM, Ken Thomases wrote: > On Aug 19, 2010, at 10:00 PM, Ron Fleckner wrote: > >> I'm developing a stand alone text service for changing/fixing case. For the >> simple cases of uppercasing and lowercasing I've simply used NSString's >

Re: Text item delimiters

2010-09-20 Thread Ron Fleckner
On 21/09/2010, at 8:34 AM, Evan Coleman wrote: > In applescript I was able to do this: > > *set* TID *to* AppleScript's text item delimiters > > *set* AppleScript's text item delimiters *to* space > > *set* theString *to* *text** items* *of* theString > > *set* AppleScript's text item delimit

Re: NSTextView vs NSTextField

2010-11-11 Thread Ron Fleckner
On 12/11/2010, at 12:45 AM, Eric Gorr wrote: > It seems to me that NSTextView can do everything that NSTextField can and > more. For example, on a NSTextView, one can use the method > setHorizontallyResizable: and then call sizeToFit to get it to resize itself > vertically instead of horizonta

Re: NSScanner troubles

2010-12-11 Thread Ron Fleckner
On 11/12/2010, at 3:54 PM, Ken Thomases wrote: > On Dec 10, 2010, at 9:38 PM, WT wrote: > >> thank you both for the very fast response. > > You're welcome. > >> Is that behavior of NSScanner documented anywhere? I read the docs but don't >> remember coming across it. I'm a bit stunned. What's

Re: Using NSTrackingArea on overlay child windows

2008-06-08 Thread Ron Fleckner
I think you need to explicitly set the transparent window as accepting first responder. By default, borderless windows aren't included in the repsonder chain. HTH, Ron On 09/06/2008, at 9:30 AM, Markus Spoettl wrote: Hello List, I have the following code which works as expected on a n

Re: Using NSTrackingArea on overlay child windows

2008-06-08 Thread Ron Fleckner
On 09/06/2008, at 1:24 PM, Markus Spoettl wrote: On Jun 8, 2008, at 5:57 PM, Ron Fleckner wrote: I think you need to explicitly set the transparent window as accepting first responder. By default, borderless windows aren't included in the repsonder chain. I think you are right.

Re: Obtaining the number of characters in a string

2008-07-20 Thread Ron Fleckner
On 20/07/2008, at 9:56 PM, Phil Faber wrote: Still struggling with documentation! That might be because the documentation makes the reasonable assumption that you already know how to use C and Objective-C. Simple task. I have two text fields (text1 & text2) and all I'm trying to achi

Re: Obtaining the number of characters in a string

2008-07-20 Thread Ron Fleckner
On 21/07/2008, at 6:26 AM, Phil Faber wrote: On 20 Jul 2008, at 13:16, Ron Fleckner wrote: Still struggling with documentation! That might be because the documentation makes the reasonable assumption that you already know how to use C and Objective-C. You're not recognisin

Re: unsigning NSNumber

2008-07-26 Thread Ron Fleckner
On 22/07/2008, at 10:20 PM, Steven Hamilton wrote: Hi folks, Can anyone tell me the most efficient way to unsign a floatvalue in an NSNumber? Like change a -1.47 to 1.47 ? Thanks // Below reverses the sign of, in this case, a float float y, x; y = x = -12.0;

Re: Two different actions depending on the event when clicking a NSStatusItem?

2008-07-30 Thread Ron Fleckner
On 30/07/2008, at 10:08 PM, [EMAIL PROTECTED] wrote: Hi there. My application uses a NSStatusItem. When somebody left-clicks on it I want a method to be called (Which I've managed to fix) and then when somebody right-clicks on it I want a menu to be shown. I can't seem to get that to wo

Re: NSDate, NSTimer, NSTimeInterval combined question

2008-08-01 Thread Ron Fleckner
Hi Eric, The best thing to tell you to do, I think, is to read, or re-read, the documentation for NSTimer. A timer (ie, an NSTimer instance) will fire when you tell it to. In your startWatch: method, you've told it to fire every 0 (zero) seconds. I don't think that's what you want. I

Re: Cancelling screensaver/sleep from an app

2008-08-04 Thread Ron Fleckner
On 04/08/2008, at 10:23 PM, Allison Newman wrote: Hi everyone, In my current app, I have long periods where the user may not interact with the app, but where the app display updates continuously, and the user continues to watch the app (think playing a movie, or something like that). H

Re: How to check the capital letter?

2008-08-11 Thread Ron Fleckner
On 11/08/2008, at 10:52 PM, Macarov Anatoli wrote: HI! Cocoa, Obj-C. How to check the capital letter? Hi, I don't remember if there is a Cocoa solution, but of course you can use plain C: NSString *str = @"Aa"; char first = [str characterAtIndex:0]; char second = [

Re: How to check the capital letter?

2008-08-11 Thread Ron Fleckner
On 11/08/2008, at 11:29 PM, Ron Fleckner wrote: On 11/08/2008, at 10:52 PM, Macarov Anatoli wrote: HI! Cocoa, Obj-C. How to check the capital letter? Hi, I don't remember if there is a Cocoa solution, but of course you can use plain C: NSString *str = @"Aa";

Re: How to check the capital letter?

2008-08-11 Thread Ron Fleckner
On 11/08/2008, at 11:35 PM, Jean-Daniel Dupas wrote: Le 11 août 08 à 15:29, Ron Fleckner a écrit : Hi, I don't remember if there is a Cocoa solution, but of course you can use plain C: NSString *str = @"Aa"; char first = [str characterAtIndex:0];

Re: How to check the capital letter?

2008-08-11 Thread Ron Fleckner
On 11/08/2008, at 11:54 PM, Uli Kusterer wrote: On 11.08.2008, at 15:29, Ron Fleckner wrote: NSString *str = @"Aa"; char first = [str characterAtIndex:0]; char second = [str characterAtIndex:1]; NSLog(@"%c is [EMAIL PROTECTED]", first, isupper(

Displaying time

2008-08-21 Thread Ron Fleckner
Hi, I want to display the current time in a full screen window. I'm making my computer into a digital clock (for my own use). I've done it by using NSCalendarDate and extracting the hours, minutes, and seconds, formatting a string and displaying it. I use an NSTimer to update the displ

Re: Displaying time

2008-08-22 Thread Ron Fleckner
On 22/08/2008, at 8:32 PM, Nathan Kinsinger wrote: On Aug 22, 2008, at 12:59 AM, Ron Fleckner wrote: Hi, I want to display the current time in a full screen window. I'm making my computer into a digital clock (for my own use). I've done it by using NSCalendarDate and extr

Re: Displaying time

2008-08-22 Thread Ron Fleckner
On 22/08/2008, at 10:38 PM, Gregory Weston wrote: Ron Fleckner wrote: I want to display the current time in a full screen window. I'm making my computer into a digital clock (for my own use). I've done it by using NSCalendarDate and extracting the hours, minutes, and seconds, fo

Re: Displaying time

2008-08-22 Thread Ron Fleckner
On 22/08/2008, at 11:28 PM, Graham Cox wrote: On 22 Aug 2008, at 10:55 pm, Ron Fleckner wrote: Sorry, my question was very badly put. I've already apologised to two other answerers. I should have said: Is there a better way - other than using an NSTimer - to update the clock? Th

Re: Displaying time

2008-08-22 Thread Ron Fleckner
On 23/08/2008, at 1:18 AM, Michael Ash wrote: On Fri, Aug 22, 2008 at 8:51 AM, Ron Fleckner <[EMAIL PROTECTED]> wrote: Is there a way to update the time without using an NSTimer? I'd like my clock to be synchronised with the menu bar clock. Maybe this isn't a Cocoa quest

Does NSTextField sends delegate messages to itself?

2008-09-15 Thread Ron Fleckner
Greetings, I've subclassed NSTextField so that I can override - acceptsFirstResponder to return NO. I've noticed an unexpected behaviour which I hope is the right thing because now I want to rely on it. To wit: without explicitly setting the text field's delegate, I can receive delegate

Re: Does NSTextField sends delegate messages to itself?

2008-09-15 Thread Ron Fleckner
On 16/09/2008, at 4:46 PM, Graham Cox wrote: On 16 Sep 2008, at 4:37 pm, Ron Fleckner wrote: So my question is, I suppose, does NSTextField send delegate messages to instances of itself? It doesn't, but the shared field editor object does. The text field is the delegate of the s

Re: Causing CFLog error messages

2008-03-09 Thread Ron Fleckner
On 10/03/2008, at 5:34 PM, Kevin Dixon wrote: Hi, I'm new to Cocoa development...I've started an app that's going to be a simple Audio Unit host. Anyway, when I start up my app, in the Run Log I these errors 2008-03-10 02:30:08.571 StretchFix[2232] CFLog (0): CFMessagePort: bootstrap_reg

Re: warning: assignment from distinct Objective-C type

2008-03-11 Thread Ron Fleckner
On 11/03/2008, at 7:19 PM, Stuart Malin wrote: I have a line of code: xmppStream = [[XMPPStream alloc] initWithDelegate:self]; That when compiled, receives a warning: warning: assignment from distinct Objective-C type Not sure of the actual reason, but if you both forward declare t

Re: Quit application when window closes

2008-03-11 Thread Ron Fleckner
On 11/03/2008, at 9:22 PM, Felipe Monteiro de Carvalho wrote: Hello, How can I implement the behavior that the application closes when my window closes? The application contains no nib files and doesn't use the interface builder, it's every thing done by code. thanks, -- Felipe Monteiro de

Re: @class causing grief

2008-03-18 Thread Ron Fleckner
On 18/03/2008, at 6:32 PM, Scott Squires wrote: I'm starting to go in circles at this point. I know I've got a number of interconnecting files. Since I was getting errors I replaced the #import as much as possible with @class defines I'm still getting the following error: error: syntax err

Re: test if another app has hung

2008-04-01 Thread Ron Fleckner
On 01/04/2008, at 9:28 PM, Ben Dougall wrote: Hello, What's the best way to test if another app has likely hung or not? Programmatically of course. I want to be able to kill an often hanging app and restart it -- when it's hung that is. (10.3.9+) Thanks, Ben. Hi Ben, This question was

Re: About the Primary Button problems in Cocoa Mouse Event Handling

2008-04-02 Thread Ron Fleckner
On 03/04/2008, at 11:45 AM, Celery01 Lin wrote: HI , all! I have a question about how can we detect the primary button . Cocoa Mouse Event handling gives us NSEvent . Though type of the NSEvent ,we can know which mouse button is down, up or dragged ,and then We can do something according to Left

Re: Constraining a NSSlider to Certain Values

2008-04-07 Thread Ron Fleckner
On 07/04/2008, at 10:10 PM, Peter Zegelin wrote: On 07/04/2008, at 9:07 PM, Jean-Daniel Dupas wrote: Le 7 avr. 08 à 12:14, Peter Zegelin a écrit : I'm trying to constrain the value of an NSSlider (while it is being dragged) depending on the state of a modifier key and being totally new t

Re: Beginner TableView Questions

2008-04-09 Thread Ron Fleckner
On 09/04/2008, at 5:43 PM, Peter Zegelin wrote: I have an NSTableView with several columns of checkboxes. Each of my columns has an identifier. I also have an NSObjectController subclass acting as both data source and delegate. I can populate the table with some data. However I am stuck o

Re: Transparent view click-through

2008-04-12 Thread Ron Fleckner
On 12/04/2008, at 9:54 AM, Greg Hoover wrote: Is there a way to prevent click through on a transparent view? Greg Not really the answer you're looking for, but a workaround is to set the colour of the view to be white, then set the transparency to 5%. Anything less than 5% allows click-t

Re: Transparent view click-through -- SOLVED

2008-04-12 Thread Ron Fleckner
ation. Thanks. On Apr 12, 2008, at 1:19 AM, Ron Fleckner wrote: On 12/04/2008, at 9:54 AM, Greg Hoover wrote: Is there a way to prevent click through on a transparent view? Greg Not really the answer you're looking for, but a workaround is to set the colour of the view to be white, th

Re: Getting feedback from application

2008-04-16 Thread Ron Fleckner
On 16/04/2008, at 6:19 PM, parag vibhute wrote: Thanks for url. But this & earlier urls which I received in this thread are for tutorials for making an application like stuff. What I require is adding native functionality by using which user will send feedback regarding that application. I w

Re: Getting feedback from application

2008-04-16 Thread Ron Fleckner
On 16/04/2008, at 6:51 PM, parag vibhute wrote: Hi Ron, Ya it is right that I will need to implement the networking functionality for sending feedback from my application to server. But I wanted to know that has Apple mentioned some guideline for this? I would like to follow those guidel

Re: How to create shortcuts after installing the my package

2008-04-22 Thread Ron Fleckner
On 23/04/2008, at 2:53 PM, JanakiRam wrote: Hi All, I'm porting a windows based application to Mac OS X. My application in windows will create desktop shortcut once we install. I really don't whether its mac standard to create desktop shortcut and dock icon once i install my cocoa ap

Re: NSSpeechSynthesizer rate

2008-12-22 Thread Ron Fleckner
On 23/12/2008, at 5:26 AM, Reema Sardana wrote: Is there any range within which the values returned by the method rate() of the class NSSpeechSynthesizer lie? I see that the volume is always between 0.0 and 1.0. -- Reema http://www1.reemasardana.com/ Hmm... I see that the values for rate

Re: NSMenu icon

2008-12-24 Thread Ron Fleckner
On 25/12/2008, at 8:11 AM, John Nairn wrote: I wanted to make one of the main menus be an icon (like the "Script" icon in many applications). I tried to due using Apple sample code (MenuItemView) and I can insert image in items, but not in the MenuItem used for the title. How is that done?

Re: modifier key query

2008-12-26 Thread Ron Fleckner
On 26/12/2008, at 7:23 PM, Wesley Smith wrote: Mainly because I'd like to be able to control various animating behaviors via key modifiers but if the user isn't generating new mouse or key events, you can't tell if a modifier key has been pressed/released, which can make for awkward interface e

  1   2   >