To find if a file is fragmented

2014-04-08 Thread Nick Rogers
Hi, I just need to know, if a file is fragmented or not. I don’t need the frags details etc. Its for showing extended info about the selected file, like whether it is fragmented or not. Is it possible with out raw reading the volume (for its catalog file)? I have also seen Carbon File Manager’

Re: [SOLVED] progress indicator strange partial overlay

2014-02-15 Thread Nick Rogers
is there although this time grey. So still relying on the dirtyRect checking way to solve this. Best, Nick On 16-Feb-2014, at 11:39 am, Graham Cox wrote: > > On 16 Feb 2014, at 4:36 am, Nick Rogers wrote: > >> The about last 30% of the length of the progress bar was

Fwd: [SOLVED] progress indicator strange partial overlay

2014-02-15 Thread Nick Rogers
ick Rogers > Subject: Fwd: progress indicator strange partial overlay > Date: 15 February 2014 10:46:52 pm IST > To: Cocoa-dev List List > > Hi, > > Here’s the image URL: http://i60.tinypic.com/209m6bd.jpg > > Best, > Nick > > > Begin forwarded message: >

Fwd: progress indicator strange partial overlay

2014-02-15 Thread Nick Rogers
Hi, Here’s the image URL: http://i60.tinypic.com/209m6bd.jpg Best, Nick Begin forwarded message: > From: Nick Rogers > Subject: progress indicator strange partial overlay > Date: 15 February 2014 10:41:08 pm IST > To: Cocoa-dev List List > > Hi, > > I have a blue

progress indicator strange partial overlay

2014-02-15 Thread Nick Rogers
Hi, I have a blue background view and over it in the centre is a white background view (simple custom views). In the inner white custom view, even if I create the progress bar (determinate) via code or IB (Xcode 5), the later end of the bar is enclosed in some sort of bluish wrapper. The wrappe

To find if a binary is being used/running

2013-10-04 Thread Nick Rogers
Hi, I need to know if a binary is executing or not. I just have the path to the binary e.g. /Applications/MyApp.app/Contents/MacOS/MyApp There's NSRunningApplication method runningApplicationsWithBundleIdentifier: , but I have other binaries which are embedded in this app which don't have a bu

quitting app running in status bar logs this message about some modal session

2013-09-12 Thread Nick Rogers
Hi, My app runs in status bar from where I can bring about its window and quit from the menu as well. The following msg is logged in Xcode console (when doing [NSApp terminate:self],): [25025:303] *** Assertion failure in -[NSApplication _commonBeginModalSessionForWindow:relativeToWindow:moda

custom field editor, no focus ring, no select all

2013-08-30 Thread Nick Rogers
Hi, I am using a custom field editor for a custom table view cell. When ever I click on the name field the editor comes into view, but focus ring is not there and select all doesn't work when using keyboard or mouse or programmatically. I want the focus ring to be drawn and want to select all o

Fwd: [SOLVED] custom field editor, no focus ring, no select all

2013-08-30 Thread Nick Rogers
Hi, Now I'm using a NSTextField instead of NSTexView. Best, Nick Begin forwarded message: > From: Nick Rogers > Subject: custom field editor, no focus ring, no select all > Date: 30 August 2013 8:23:12 PM IST > To: Cocoa-dev List List > > Hi, > > I am usin

editing text part in a custom NSTextFieldCell (of a NSTableView)

2013-08-17 Thread Nick Rogers
Hi, I have a NSTableView and I'm setting a particular column to have a custom NSTextFieldCell subclass object as its cell. For this I'm doing in awakeFromNib: TableViewListCell *aTableViewListCell3 = [[[TableViewListCell alloc] init] autorelease]; [[tableViewPresetsMainList tableColumnW

Thread safety, some basic questions about accessing mutable objects across threads

2013-08-06 Thread Nick Rogers
Hi, Please look at the following situations: 1. Created a mutable array in main thread, can I read its values in a secondary thread safely, while no other thread is modifying this mutable array? 2. I need to add objects to this mutable array from a secondary thread, and no other thread is modi

drawing outside the dirtyRect (of a NSView sub class) and overlapping NSTableView

2013-08-04 Thread Nick Rogers
Hi, I have a column of buttons stacked up one over the other and on clicking a button I want to draw an image on it with an arrow protruding to the right. And on the right side there is a tab view and in it there is a table view. So the arrow part of the image must overlap the tab view and table

Fwd: how to draw a elliptical pie chart?

2013-06-06 Thread Nick Rogers
Sorry earlier link to images required signup. Here are the new links: http://picturepush.com/public/13243485 and http://picturepush.com/public/13243495 Wishes, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requ

how to draw a elliptical pie chart?

2013-06-06 Thread Nick Rogers
Hi, I'm new to core graphics. The target oval (target oval.jpg) and current oval (oval.jpg) are available at http://www5.snapfish.in/snapfishin/thumbnailshare/AlbumID=9188624025/a=11429776025_11429776025/otsc=SHR/otsi=SALBlink/ . In oval after drawing the top filled ellipse I'm creating a path t

Re: way to update Apple Menu's Recents Items

2013-05-13 Thread Nick Rogers
awning. I have to do this. Please suggest. Wishes, Nick On 14-May-2013, at 9:30 AM, Kyle Sluder wrote: > On Mon, May 13, 2013, at 08:50 PM, Nick Rogers wrote: >> Hi, >> >> I can remove the recent items from the plist where they are stored. >> >> But when I

way to update Apple Menu's Recents Items

2013-05-13 Thread Nick Rogers
Hi, I can remove the recent items from the plist where they are stored. But when I try and update the Recent Items submenu, it doesn't. I'm getting Apple Menu by using [[NSApp mainMenu] itemAtIndex:0]. OR do I need to kill some process (which will then restart) to achieve this. Thanks, Nick _

Re: delaying forced sleep after initial 30 seconds delay

2013-05-03 Thread Nick Rogers
Hi, Thanks for all the inputs. The app doesn't run any scheduled operations. So the situation would occur only when the user wants it to. Best, Nick On 03-May-2013, at 10:26 AM, Kyle Sluder wrote: > On Thu, May 2, 2013, at 09:16 PM, Nick Rogers wrote: >> Hi, >> >&

delaying forced sleep after initial 30 seconds delay

2013-05-02 Thread Nick Rogers
Hi, I want my app to delay forced sleep even after requesting the initial delay of 30 seconds. This have to be specifically set by the user in the Preferences of the app and only when the user clicks a button to run some operation, for the duration of that operation which could extent to a min

Re: multiple profiles in preferences mechanism

2013-04-13 Thread Nick Rogers
Thanks for the valuable input. Thanks, Nick On 13-Apr-2013, at 9:26 PM, Jerry Krinock wrote: > > On 2013 Apr 13, at 07:39, Nick Rogers wrote: > >> Is it possible to save the same set of preferences with different profiles >> in the system provided mechanism or do I h

multiple profiles in preferences mechanism

2013-04-13 Thread Nick Rogers
Hi, I wish to use NSUserDefaultsController to ease up on writing glue code as well as for its features. But the problem is I need to have profiles (or rather Presets) for preferences. Each preset would have the same set of preferences. I am thinking of a table view on left where presets could be

Re: Hover button and tracking area questions

2013-01-24 Thread Nick Rogers
. Another was any ill effect of removing and adding tracking area, which I am not doing now as the button is not resizable. Thanks, Nick On 24-Jan-2013, at 7:24 PM, Markus Spoettl wrote: > On 1/24/13 12:06 PM, Nick Rogers wrote: >> The code that I pasted was going thru change. In the

Re: Hover button and tracking area questions

2013-01-24 Thread Nick Rogers
Hi, The code that I pasted was going thru change. In the original copy, I was removing tracking area before adding the new. So now my thinking goes that I shouldn't have added tracking areas after the initial one, at least I am now doing that and hoping it not to crash. The exception was: Exce

Hover button and tracking area questions

2013-01-23 Thread Nick Rogers
Hi, I have just a tab view on my main window and I switch tabs based on user input. First tab has three hover buttons and on clicking one of them, it takes to another tab which two hover buttons. After clicking one of the two hover buttons, I switch tab and show a table view and then show and en

Re: can update the UI from sheetDidEnd:…. ?

2013-01-23 Thread Nick Rogers
Hi, Sorry if I caused any confusion. But I don't know if _updateTrackingAreas would or would not be called by the system for its own UI display mechanism even if I don't use it in code. Best, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: can update the UI from sheetDidEnd:…. ?

2013-01-23 Thread Nick Rogers
Hi, Thanks for the replies. Sorry I didn't provide enough info in the beginning. Here it is. On 24-Jan-2013, at 9:55 AM, Graham Cox wrote: > > On 24/01/2013, at 1:30 PM, Nick Rogers wrote: > >> Hi, >> >> I was updating a few textfields from my sheetDidEnd

can update the UI from sheetDidEnd:…. ?

2013-01-23 Thread Nick Rogers
Hi, I was updating a few textfields from my sheetDidEnd:…. method. Just wondering if that was causing the crash (UI related error in main thread). Thanks, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: how to make a task less cpu intensive

2012-12-31 Thread Nick Rogers
t have any rough estimates on how much memory i'd need to malloc, some times it can be less than 1 MB and grow to 1GB. Also the tree is incremental, so can not predict its final size. Thanks again, Nick On 29-Dec-2012, at 12:53 AM, Scott Ribe wrote: > On Dec 28, 2012, at 10:40 AM,

how to make a task less cpu intensive

2012-12-28 Thread Nick Rogers
Hi, I have a tree in memory (all nodes malloc'ed blocks) and when I start freeing this large tree, I traverse the tree and free all nodes. This becomes cpu intensive and so the progress bar on my sheet doesn't animate. In similar other situations the progress bar animates, when different code is

Re: sheet is divided horizontally in two shades

2012-12-11 Thread Nick Rogers
ws with content border autosize. If > you set the window content border to none, that should fix the problem. > > -Jeff > > > On Dec 11, 2012, at 2:54 PM, Nick Rogers wrote: > >> oops! that requires a sign up >> >> here's the direct link: >> &g

Re: sheet is divided horizontally in two shades

2012-12-11 Thread Nick Rogers
oops! that requires a sign up here's the direct link: http://s13.postimage.org/ci00lrbsn/divided_sheet.jpg Best, Nick On 12-Dec-2012, at 2:20 AM, Nick Rogers wrote: > Hi, > > The image is at following link (in the album): > > http://www5.snapfish.com/snapfish/th

Re: sheet is divided horizontally in two shades

2012-12-11 Thread Nick Rogers
Dec 11, 2012, at 11:30 AM, Nick Rogers wrote: > >> Hi, >> >> The example sheet's grab is attached here. >> In this one the sheet seems divided in half, but in smaller sheets with less >> height, the lighter shaded bottom portion is smaller. >> &

sheet is divided horizontally in two shades

2012-12-11 Thread Nick Rogers
Hi, The example sheet's grab is attached here. In this one the sheet seems divided in half, but in smaller sheets with less height, the lighter shaded bottom portion is smaller. Occurs in Mac OS X Lion and Mountain Lion. On Leopard and Snow Leopard it doesn't occur. The beginSheet: modalForWin

Re: a way to clear inactive RAM

2012-11-06 Thread Nick Rogers
just 50MB. Thanks again, Nick On 06-Nov-2012, at 2:29 AM, Alex Zavatone wrote: > Not sure what RAM "clearing" means but if you want to purge the disk cache, > check out man purge in the terminal. > > On Nov 5, 2012, at 1:54 PM, Nick Rogers wrote: > >> Hi, >

a way to clear inactive RAM

2012-11-05 Thread Nick Rogers
Hi, I am assigned this small utility which should clear inactive RAM. I know Mac OS X manages memory quite efficiently and inactive RAM also has a purpose. But I have to make this. Prior to Mountain Lion I was allocating memory in my app that was roughly equivalent to free + inactive RAM. And i

to highlight a outline view row on mouse over

2012-07-20 Thread Nick Rogers
Hi, I wish to highlight a row on mouse over by changing the background color to light blue. And back to regular when mouse moves away from the row. Have seen a few examples of it on the internet. But is there any efficient way to do this? Any help would be greatly appreciated... Thanks, Nick _

vm keeps increasing when in a rigorous loop

2012-07-08 Thread Nick Rogers
Hi, The code is like: - (void)myMethod { . while (flag) { UInt32 temp; . and lot of other ints etc. if (someCondition == 1) { UInt8 *buff = (UInt8*)calloc(1, sizeof(aStruct));

GC and malloc question

2012-05-31 Thread Nick Rogers
Hi, My program has to build a tree structure, the number of nodes, in which can run into many millions. So I began to make changes to allocate a node using malloc. Earlier I was using a object for a node. I have GC enabled (required). And basically I'm making a linked list of nodes to sto

Re: Save panel showing as a blank sheet

2012-04-27 Thread Nick Rogers
n a mac, could exist? Thanks, Nick Sent from iCloud On Apr 27, 2012, at 09:22 PM, Nick Zitzmann wrote: On Apr 27, 2012, at 2:34 AM, Nick Rogers wrote: Hi, > I'm running a NSSavePanel as sheet, but on some systems the sheet is totally blank and having odd dimensions like twice th

Save panel showing as a blank sheet

2012-04-27 Thread Nick Rogers
Hi, I'm running a NSSavePanel as sheet, but on some systems the sheet is totally blank and having odd dimensions like twice the normal height. code is: NSSavePanel *panel = [NSSavePanel savePanel]; [panel setRequiredFileType:@"rrs"]; [panel setExtensionHidden:YES];

Re: table view and custom cell optimization problem

2011-03-03 Thread Nick Rogers
t.com wrote: > > On 3 Mar 2011, at 04:06, Nick Rogers wrote: > >> Hi, >> I have a table view with the custom cell class assigned to its only column >> in awakeFromNib method using setDataCell:. >> Then I'm doing some drawing in drawInteriorWithFrame: of the NSCe

table view and custom cell optimization problem

2011-03-02 Thread Nick Rogers
Hi, I have a table view with the custom cell class assigned to its only column in awakeFromNib method using setDataCell:. Then I'm doing some drawing in drawInteriorWithFrame: of the NSCell subclass. The problem is that drawing include four lines of text and an image and a few lines using NSBezie

converting app to a document based app

2011-02-15 Thread Nick Rogers
Hi, Googled a lot but didn't find anything. Can some one send definitive steps for converting a non-document based app to a document based app. In my app, there is a MainMenu.nib and an AppController class. I'd also want to convert the nib to a xib. I'd really appreciate any help on this. Wishe

running a timer while displaying a sheet

2010-10-16 Thread Nick Rogers
Hi, When I run a sheet, I want it to display a text field which has to be updated every second or so (basically showing a count down "60 Seconds", "59 Seconds" and so on. I am starting a timer in main thread using: timerRawScanMsg = [NSTimer timerWithTimeInterval:1.0 target:self selector

Re: strange horizontal line in scroll view

2010-08-01 Thread Nick Rogers
Hi, Thanks for the reply. I used matrix to display data inside a sector years ago, when I had just started learning cocoa. I know its a crude and inefficient way to make a hex viewer, but currently its not required to be sophisticated at all and I didn't have the time to make any big changes. I

strange horizontal line in scroll view

2010-08-01 Thread Nick Rogers
Hi, I have three matrices (all same sub class of NSMatrix, having prototype as a subclass of NSTextFieldCell), initially inited to have 1 row each and 1, 16 and 16 columns respectively. I'm trying to make a simple hex viewer using matrix instead of complex custom views for display. Then I add r

app crashing, some errors in console are related to drawing of UI elements

2010-06-02 Thread Nick Rogers
Hi, The app sometime (not always) crashes when run on Leopard OS (32-bit) on an old mac mini. On Leopard (64-bit) and Snow Leopard, the crash never happens. The app is GC enabled. I'm running a separate thread to do some processing, and it does update a few text fields and a progress bar on the

To know what shows in the first line of a multiline NSTextField

2010-05-12 Thread Nick Rogers
Hi, I have resized a multiline text field to show two lines of text (in IB). Now I want to know what it is displaying in the first line (or the length of it) even if the first inputted line is longer than a visible line and wraps around to the next visible line. Is it possible? Searched the docs

Re: changing dock label name of my app

2009-11-26 Thread Nick Rogers
ed name CFBundleName in the info.plist? > > --Graham > > > > On 26/11/2009, at 8:50 PM, Nick Rogers wrote: > >> hi, >> thanks for the reply. >> actually my app & project itself is named as "MyApp". Later I'm renaming it >> to "MyApp-1&q

Re: changing dock label name of my app

2009-11-26 Thread Nick Rogers
nge the dock icon label from "MyApp-1" to "MyApp". Wishes, Nick On 26-Nov-2009, at 2:53 PM, Symadept wrote: > Project=> Edit Active Target > > Search for MyApp in the search bar. Whereever you find MyApp-1, replace it to > MyApp. > > Regards > Musta

changing dock label name of my app

2009-11-26 Thread Nick Rogers
Hi, for some reasons, my app is named like "MyApp-1". And I want the label over the dock icon to appear as "MyApp". how to go about it? thanks, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderato

GC, variable optimized away wrongly?

2009-11-25 Thread Nick Rogers
Hi, In my app running on snow leopard, in a particular situation I'm getting an undesired behavior. Debugging a "for loop" shows a still in scope variable being optimized away. code: (problem occurs after the loop has been iterated thousands (may be more) of time. for loop statement her

programmatically determining whether a system would run a GC only app

2009-10-27 Thread Nick Rogers
hi, is it possible to do so, if yes how? googled, seen gestalt, sysctl()... no yield. thanks Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderator

Re: Moving from standalone apps to some internet related programming

2009-10-26 Thread Nick Rogers
hi, the package is 6 MB for the demo & 11 MB for the full version, so packaging all is not desired. thanks, Nick On 27-Oct-2009, at 4:32 AM, Philip Ershler wrote: On Oct 26, 2009, at 4:50 PM, Nick Rogers wrote: Hi, In my some 2 yrs of cocoa programming with cocoa, I have been able

Moving from standalone apps to some internet related programming

2009-10-26 Thread Nick Rogers
Hi, In my some 2 yrs of cocoa programming with cocoa, I have been able to make a main app (which is selling) and a few related small apps. Now I have to make a small utility that would download the appropriate (best) version of main app that would run on the user system by polling for the Ma

Re: is GC not available on 10.5.8?

2009-10-23 Thread Nick Rogers
-2009, at 8:48 PM, Bill Bumgarner wrote: On Oct 23, 2009, at 5:04 AM, Nick Rogers wrote: I compiled using Xcode3.2 on 10.6.1, 10.5 base sdk and for Intel 64- bit only with GC only option. The program compiles fine, but the following error is there when launching it on 10.5.8 system: (window

Re: is GC not available on 10.5.8?

2009-10-23 Thread Nick Rogers
HI, I checked all the project and target settings, they are in order and I cleaned all targets before testing. Thanks, Nick On 23-Oct-2009, at 5:34 PM, Nick Rogers wrote: Hi, I compiled using Xcode3.2 on 10.6.1, 10.5 base sdk and for Intel 64- bit only with GC only option. The program

is GC not available on 10.5.8?

2009-10-23 Thread Nick Rogers
Hi, I compiled using Xcode3.2 on 10.6.1, 10.5 base sdk and for Intel 64- bit only with GC only option. The program compiles fine, but the following error is there when launching it on 10.5.8 system: (window doesn't appear) EXC_BREAKPOINT (SIGABRT) Dyld error message: unknown required load co

Re: to implement a 1 sec repeating timer in a separate thread

2009-10-22 Thread Nick Rogers
Hi, Thanks for the reply. My question was very vague, I admit. But now I have moved to your suggestion. I'm setting up the timer via [NSTimer scheduledTimerWithTimeInterval: 1.0 target: self selector: @selector(doSomething:) userInfo: nil repeats: YES]; But the doSomething is not getting cal

to implement a 1 sec repeating timer in a separate thread

2009-10-22 Thread Nick Rogers
Hi, I have been trying to implement a 1 second repeating timer, but its leading to retaining the target object of a thread from which I'm launching this timer thread. Here's my implementation. I'm running this method from my thread. - (void)setUpTimer { timerThread = [[NSThread alloc] initW

Re: info gc-roots interpretation

2009-10-21 Thread Nick Rogers
thBool:YES] waitUntilDone:NO]; } Thanks, Nick On 21-Oct-2009, at 9:09 PM, Bill Bumgarner wrote: On Oct 21, 2009, at 1:39 AM, Nick Rogers wrote: (gdb) info gc-roots 0x2004f9340 Number of roots: 1 Root: 0 Kind: bytes rc: 1 Address: 0x000200543b40 Offset: 0x0008 1 Kind:

info gc-roots interpretation

2009-10-21 Thread Nick Rogers
Hi, I have an ivar in AppController, a pointer to the class Volume. When running info gc-roots on it before setting it nil, the results are: (gdb) info gc-roots 0x2004f9340 Number of roots: 40 Root: 0 Kind: bytes rc: 1 Address: 0x000200543b40 Offset: 0x0008 1 Kind:

GC Basic questions

2009-10-19 Thread Nick Rogers
Hi, Since the methods -release, -retain and -autorelease are no-ops with GC only enabled, How do I release everything associated with an ivar (pointer to a class) in AppController? Currently I'm doing it by setting this pointer as nil. Is it ok? Also when I follow certain steps, this pointer

Object Alloc Instrument and releasing question

2009-10-13 Thread Nick Rogers
Hi, I'm running Xcode 3.2 on Snow Leopard. There is an object of type HDIR which can contains a mutable array of children objects of type HDIR, so a tree is formed. I can go back using the Back button and release this HDIR type root object. And then again form a new tree. When a tree is forme

Should VM shrink to original when releasing huge memory

2009-10-13 Thread Nick Rogers
Hi, I'm using Snow Leopard and Xcode 3.2. When my program runs the VM grows from 50MB to around 550MB. So when I release the memory, should VM shrink to the original 50MB, in this case it isn't so? Thanks, Nick ___ Cocoa-dev mailing list (Cocoa-de

NSZombieEnabled giving rise to new bug

2009-10-12 Thread Nick Rogers
Hi, I order to track a bug which made an outline view hang the GUI, I set NSZombieEnabled with value YES in the app's environment variable. Now even before I could get to the point of GUI hangs the following is reported in console: 2009-10-12 20:28:53.651 My Program[33987:6263] *** -[CFArray

Re: releasing an object

2009-10-10 Thread Nick Rogers
wrote: On 10/10/2009, at 9:31 PM, Nick Rogers wrote: Shall I get its retainCount and then release it that many times? For heavens' sake, NO! Ignore retain counts. They are not reliable evidence of anything you can use. Instead, just follow the rules: http://developer.apple.co

releasing an object

2009-10-10 Thread Nick Rogers
Hi, There is a instance variable in my AppController class named "Volume". I'm doing alloc and initWithDictionary to get an instance of Volume. I have to do [selectedPTVolume retain]; when allocing to get it to work properly. When destroying this object to get a new one, I'm doing [selectedPT

releasing a object containing others in a array

2009-10-03 Thread Nick Rogers
Hi, I have a class as following: @interface NodeTypeOrph : NSObject { int count; ItemTypeOrph*key[4]; // Warning: indexing starts at 0, not 1 NodeTypeOrph*branch[5]; // Fake pointers to child nodes } when I'll send a release to an

Re: [Solved] NSRunLoop method - configureAsServer alternative in 10.6.1?

2009-09-30 Thread Nick Rogers
Hi, Very basic error: did [defaultConnection retain]; in server code. Seems very basic but when I was doing - configureAsServer, it was working without retaining. Thanks, Nick On 30-Sep-2009, at 7:53 PM, Nick Rogers wrote: Hi, When I use [[NSRunLoop currentRunLoop] configureAsServer

NSRunLoop method - configureAsServer alternative in 10.6.1?

2009-09-30 Thread Nick Rogers
Hi, When I use [[NSRunLoop currentRunLoop] configureAsServer]; after creating a service using NSConnection, it works. But -configureAsServer is declared as deprecated with no alternative suggested. I tried removing it and the code doesn't work. server code snippet: (doesn't work) MYMessageS

Xcode3.2 build and analyze warning for NSString allocation

2009-09-27 Thread Nick Rogers
Hi, When I alloc and init a NSString the following way, there is warning that: Potential leak of an object allocated on line 526 and stored in sizeDisp. 1. Method returns an Objective-C object with a +1 retain count (owning reference). 2. Object returned to caller as an owning reference

Stability on Snow Leopard

2009-09-22 Thread Nick Rogers
Hi, The program which worked perfectly on Leopard, crashes frequently at various stages on Snow Leopard. Also it may or may not crash at the same stage on different runs, e.g. on bringing up a NSSavePanel in a sheet. What do I need to do to make it robust on Snow Leopard. Is it less forgiv

basic threading question: if parent thread completes

2009-09-17 Thread Nick Rogers
Hi, I need to know this before going in for changes that are too complex. I spawned a thread from AppController (thread1). From thread1, I spawn another thread2. thread1 completes. Will thread2 terminate, give rise to anything else, or just keep on working usually? Wishes, Nick __

saving files/folders in foreign language names

2009-08-31 Thread Nick Rogers
Hi, I have the following hierarchy to save programatically (e.g.): my english path name/some french dir name/some french file name.file Now I'm using NSFileManager to do this: 1. create a folder at "my english path name". correctly done. 2. change current dir to "my english path name" and creati

debug control not reaching init method

2009-08-20 Thread Nick Rogers
Hi, This is my third app in Xcode3. Had to use Xcode3 becuase it has to be a 64-bit app. In earlier two apps, the control reaches to the breakpoint on the first line of the init method of AppController class, while debugging. But in this third one, it is not reaching the breakpoint, and th

which temp dir to use?

2009-05-23 Thread Nick Rogers
Hi, NSTemporaryDirectory(), returns something like /var/temp/we/weOIDM +mck Whereas I want to store files at a place with a fixed path. So where should I save temp files? and how can I get that path programatically everytime? Thanks, Nick ___

To run a block of code at every 1 second

2009-03-03 Thread Nick Rogers
Hi, Here's the code: the following method is running in a separate thread: - (void)myFucntion { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; for (;;)// for loop starts here and is very quick, 100s of iterations per second { {

Re: autorelease problem

2009-01-26 Thread Nick Rogers
= name; } Also the [innerloop release]; is crashing the first time through the loop. Regards, Nick On 26-Jan-09, at 10:53 PM, Matt Gough wrote: On 26 Jan 2009, at 18:12, Nick Rogers wrote: - (NSString*)suggestedRepeatFileName:(NSString *)fileName inDir: (HDIR *)dir { // some code

autorelease problem

2009-01-26 Thread Nick Rogers
Hi, My program is crashing when releasing the NSAutoreleasePool. I have in my code: - (void)MyFunction { while (count) { NSAutoreleasePool *innerloop = [[NSAutoreleasePool alloc] init]; HDIR *dir = [someArray objectAtIndex:count]; NSString *fileN

Re: NSTextField super imposes the text

2008-12-26 Thread Nick Rogers
Hi, Looking at the code closely, I found that I was updating this text field from a separate thread. That may be the reason. Although I have still to test the fix on Prior-Leopard machine. Thanks, Nick On 26-Dec-08, at 7:59 PM, Nick Rogers wrote: Here super-imposition means that text

Re: NSActionCell, is there a double click?

2008-12-26 Thread Nick Rogers
sired column's dataCell as both editable and non-editable. Even then it doesn't work on Prior-Leopard. Thanks, Nick On 26-Dec-08, at 8:01 PM, Jerry Krinock wrote: On 2008 Dec, 26, at 6:23, Nick Rogers wrote: I have the outlineview cell which is a subclass of NSActionCell. I can set

Re: NSTextField super imposes the text

2008-12-26 Thread Nick Rogers
Here super-imposition means that text appears garbled and is put over the previous text. Thanks, Nick On 26-Dec-08, at 7:48 PM, Nick Rogers wrote: Hi, I have to frequently show text in the status field of my app. The status field is an NSTextField. but it super imposes the text that is sent

NSActionCell, is there a double click?

2008-12-26 Thread Nick Rogers
Hi, I have the outlineview cell which is a subclass of NSActionCell. I can set its target and action with setTarget: and setAction:. But it invokes the method on single click. Whereas I want the method to be called only on double click, I have seen the docs and there is no method like setDoubleA

NSTextField super imposes the text

2008-12-26 Thread Nick Rogers
Hi, I have to frequently show text in the status field of my app. The status field is an NSTextField. but it super imposes the text that is sent to it thru setStringValue: I tried setting the text to @"", between the calls, but to no avail. This is happening only in Prior-Leopard Mac OSX. please

saving filename suggestion in NSSavePanel

2008-12-23 Thread Nick Rogers
Hi, I looked the docs for NSSavePanel, but it doesn't list any method for putting in a suggested filename to the user. How to do it? Thanks, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Memory Management Q. 1 and 2

2008-12-21 Thread Nick Rogers
Hi, While learning to program in cocoa, people usually start out without giving much thought to memory management especially about freeing the used up memory. I can say so, because I know a few people like that and also I'm one of them. My focus was on to get started on the project quickly a

splash screen how to?

2008-12-17 Thread Nick Rogers
Hi, I have to show a splash screen at the software launch. The window should have no edges etc and should stay for a few seconds. How to go about it? Is there any good resource available for this? Thanks, Nick ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: how to pass arguments by reference

2008-12-10 Thread Nick Rogers
usCatalogKey)lastKey { // code here } Still the same error: parse error before & token Thanks, Nick On 10-Dec-08, at 9:15 PM, Dave DeLong wrote: Put the & before the variable type: - (UInt32) traverseTreeStraightReturnedDirection: (&int)treeDirection... HTH, Dave On Dec 10

how to pass arguments by reference

2008-12-10 Thread Nick Rogers
Hi, I have the following in my .m file: - (UInt32)traverseTreeStraightReturnedDirection:(int&)treeDirection returnedTreeDepth:(int&)treeDepth returnedKey:(HPlusCatalogKey&)catKey lookForKey:(HPlusCatalogKe

any control over NSRunAlertPanel placing on screen

2008-12-04 Thread Nick Rogers
Hi, I want the alert panel to be placed in the middle of my main window. Is it possible? I gather that NSRunAlertPanelRelativeToWindow() is declared deprecated. Thanks, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post a

to get handle to "File/1.jpg"

2008-11-26 Thread Nick Rogers
Hi, How do I obtain a NSFileHandle to this file which has a forward slash in the name to be able to write to this file. Supplying the path to NSFileHandle with filename in quotes also fails. If not possible is there any other way to write to such a file. I can't use open(), as the file name cou

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

NSOutlineView setDoubleAction: working on 10.5, but not on 10.4.11

2008-11-15 Thread Nick Rogers
Hi, when double clicking on an item the action method is not being called in 10.4.11. While the Apple docs say it is "Available in Mac OS X v10.0 and later." Is there something I may be missing. Its working fine on Leopard. Thanks, Nick ___ Cocoa-

to raise another cocoa app's window from the dock

2008-11-04 Thread Nick Rogers
Hi, Have searched the net a lot and even tried AppleScript-enabling the app, but nothing would work. My app should be able to bring to front another cocoa app's window to the front. I have tried SetFrontProcess(), but all it does is to bring the menus to the front and not the minimized win

how to set Document type and its icon programatically

2008-09-19 Thread Nick Rogers
Hi, My cocoa app is not a document based app, but saves a binary file to the disk. I can set this file's name and extension and icon by going to the Target properties and adding a new document type there. It was working fine and the resulting saved file was given the required icon. But t

how to prevent sleep mode when app is running

2008-06-12 Thread Nick Rogers
Hi, When the computer goes into sleep mode my app also seems to be taking forever in doing the current task. So how can I prevent the computer from going into sleep mode when my app is running? Wishes, Nick ___ Cocoa-dev mailing list (Cocoa-dev@l

how to run my app in privileged mode

2008-06-03 Thread Nick Rogers
Hi, I wish to access disk sectors using open() and pread(). but it fails for the system disk. So how can I get the user to type in admin passwd and then run my app in privileged mode. Please point me to any sample code etc. I tried ""BetterAuthorizationSample" code from apple, but using it to

main menu's missing connection

2008-06-01 Thread Nick Rogers
Hi, In the instance window there is a yellow dot on the main menu as well as the main window. How to find which children has a bad or missing connection? Thanks, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

to use the default about panel

2008-06-01 Thread Nick Rogers
Hi, How can I make changes to the default "about panel"? Or do i have to add my own panel? Wishes Nick ___ 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 implement ETA

2008-06-01 Thread Nick Rogers
Hi, I want to show time remaining while executing a loop. How to go about it? WIshes, nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-

  1   2   >