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

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 __

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

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

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

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

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

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

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

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

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

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

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

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:

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:

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: 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

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: 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

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

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: 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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: 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

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

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));

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 _

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

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, >

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: 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. >> &

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
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

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: 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,

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: 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

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

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: 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

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

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: 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

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: 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, >> >&

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: 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

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

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

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

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

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

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

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

whether to use NSSavePanel or something else

2008-05-19 Thread Nick Rogers
Hi, I have to let the user browse thru the filesystem and choose a directory for saving some data. So is NSSavePanel right for the job or there is something else too. cause from what I gather NSSavePanel requires to type in a fileName and then returns the path to that file. Where as I don't

creating a resource fork and writing raw bytes to it

2008-05-21 Thread Nick Rogers
Hi, My app has to create the resource fork of a file and then write raw bytes picked up from the disk to it. Is there any support in cocoa for this. For writing to the data fork I'm creating the file with NSFileManager and then writing using write(). Is there any similar mechanism for creat

unwanted tooltip in NSOutlineView (as "outLineTableColumn")

2008-05-24 Thread Nick Rogers
hi, since I set the second column as outLineTableColumn in IB, I'm getting this tooltip "outLineTableColumn", anywhere in outline view, even when hovering on other columns. And it goes away when I move the mouse pointer to near the text, then the real tooltip occurs. How can I remove this too

to launch safari with an URL

2008-05-24 Thread Nick Rogers
Hi, How can I launch the default browser supplying it a URL with the click of a button? Please help. WIshes, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

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-

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

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

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

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 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

two table view selection problem

2008-03-04 Thread Nick Rogers
Hi, I have two NSTableView in my app (tableView1 and tableView2). If I select a row in tableView1 and then if I select a row in tableView2, I want the row in tableView1 to be deselected. For this I'm using [tableView1 deselectAll: nil], but it leads to calling the delegate method again and lea

How to get this bundle with identifier

2008-03-09 Thread Nick Rogers
Hi, In my app I need to get the icon for my HDD. For this I need to get the bundle with identifier "com.apple.iokit.IOStorageFamily". How can i get this bundle? Any help would be greatly appreciated. Wishes, Nick ___ Cocoa-dev mailing list (Cocoa-d

how to get a particular icon from .icns file

2008-03-09 Thread Nick Rogers
Hi, I have a icon file (.icns) with 10 icons in it and i want to create an NSImage with only the 32x32 icon from this file. Currently I'm doing: NSImage *anIcon = [[NSImage alloc] initWithContentsOfFile:iconPath]; which results in a very big 128x128 icon. Regards, Nick

How to run progress bar in a separate thread

2008-03-10 Thread Nick Rogers
Hi, My app has to show a progress bar on the main window. I have an outlet of type NSProgressIndicator. A start button triggers the method in which I'm incrementing the progress bar. But the buttons stop working once the method gets called. How can I run this progress bar in a separate thread.

To unmount a volume

2008-03-11 Thread Nick Rogers
Hi, How can I unmount a volume knowing its POSIX path (/dev/rdisk1) and knowing its mounted name (Volumes/TREK)? Is there any API to do that in cocoa? Wishes, Nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin req

Re: To unmount a volume

2008-03-12 Thread Nick Rogers
008, at 11:03 AM, Nick Rogers wrote: Hi, How can I unmount a volume knowing its POSIX path (/dev/rdisk1) and knowing its mounted name (Volumes/TREK)? Is there any API to do that in cocoa? NSWorkspace -unmountAndEjectDeviceAtPath:? ___ Cocoa-dev ma

performSelectorOnMainThread problem

2008-03-12 Thread Nick Rogers
Hi, In my secondary thread I'm doing: [self performSelectorOnMainThread:@selector(updateProgress) withObject:data waitUntilDone:YES]; with the error that self does not recognize the selector updateProgress. I have imported the main AppController.h into this secondary class file. still the pr

Re: performSelectorOnMainThread problem

2008-03-12 Thread Nick Rogers
Yes I was using updateProgress with the colon earlier, but still didn't worked. Wishes, Nick On 13-Mar-08, at 7:00 AM, John Stiles wrote: If -updateProgress is taking "data" as an argument, then you probably want @selector(updateProgress:) Note the colon. Nick Rogers

Re: performSelectorOnMainThread problem

2008-03-12 Thread Nick Rogers
show us the definition of -updateProgress and tell us what you mean by "didn't work." For instance, are any errors logged to the Run Log? Nick Rogers wrote: Yes I was using updateProgress with the colon earlier, but still didn't worked. Wishes, Nick On 13-Mar-08, at 7:00 AM, Joh

styling NSOutlineView

2008-03-14 Thread Nick Rogers
Hi, I have gone through http://katidev.com/blog/?p=36 which shows how to show an Icon and two rows of text in an row of NSTableView. And it has been done by sub-classing NSCell. I want exactly the same thing in an NSOutlineView (i.e. an Icon and two rows of text in an row of NSOutlineView.

To get machine type (ppc, intel)

2008-03-19 Thread Nick Rogers
Hi, In my app I'm reading raw bytes from the file. So to get a integer's correct value, I'll need to swap bytes according to the machine (big or little-endian type), I guess. Is there a way so that I can know, if its a intel or ppc machine, that my app is running on? Thanks, Nick _

memcpy strange behavior

2008-03-20 Thread Nick Rogers
Hi I'm using memcpy to copy a file's sector to my struct. But its skipping one UInt16 in between and copying the next value in the struct's corresponding field. I've checked the read sector and its correctly read. My struct is also in order. Listing: memcpy(&myStruct, sector, sizeof(myStruct)

method declaration error

2008-03-27 Thread Nick Rogers
i'm declaring the following method: - (BOOL)searchNodeTarget:(const ItemType)target location:(int &)location; with error: "parse error before '&' token". can we not use (int &) this way? Thanks, Nick ___ Cocoa-dev mailing list (Coco

to include a C++ class in proj

2008-03-27 Thread Nick Rogers
are we allowed to do that in a cocoa proj. if so how do we declare the class. Is it like? class MyClass { } this is throwing error at the first line: parse error before 'MyClass' token what headers do i need to include for a C++ class? Thanks, Nick ___

Re: to include a C++ class in proj

2008-03-27 Thread Nick Rogers
hi, the semicolon is there. i've changed extension to .hh and .mm, still the same error. Again what headers to include for a .hh file to be taken as a file declaring a C++ class? Wishes, Nick On 27-Mar-08, at 7:28 PM, Jens Miltner wrote: Am 27.03.2008 um 14:44 schrieb Nick Rogers:

changing NSNumber from within another function

2008-03-28 Thread Nick Rogers
Hi, I have: - (void)function1 { NSNumber *moveUp = [NSNumber numberWithBool:NO]; [self function2:moveUp]; //value of moveUp after returning from function2 is the previous one and not the value thats changed in function2 // so the value [moveUp boolValue] here is stil

GDB says not an object

2008-03-29 Thread Nick Rogers
hi, I'm working on a small btree implementation. currentNode is an NodeType* and [currentNode key:0] returns an ItemType*, which has a method - (Uint32)keyField. but when I use: [[currentNode key:0] keyField] GDB tells that its not an object. any ideas? Wishes, nick _

linked list problem

2008-03-31 Thread Nick Rogers
Hi, I have the following singly linked list: typedef struct Dir { // some space to hold data here void *next; // have to take void * here cause Dir* leads to compile error }DIR; In my code: DIR *temp = parentDir; //parentDir is allocated initially but its next is not allocated at

NSOutlineView: to insert a checkbox column as the first column

2008-04-04 Thread Nick Rogers
Hi, I am writing the file browser part of my app now. If i try inserting the checkbox in IB, the indentation marker is always in the first column. Where as I want the first column to have only checkbox. And I want the indentation marker in the second column. Attached with the email is the look

Re: NSOutlineView: to insert a checkbox column as the first column

2008-04-04 Thread Nick Rogers
hi, have figured out how to set the second column as outlineColumn and also put checkboxes in the first column by dragging NSButtonCell into the first column. That leaves the customizing the second column part. Regards, Nick On 04-Apr-08, at 8:39 PM, Nick Rogers wrote: Hi, I am writing

copyWithZone error

2008-04-05 Thread Nick Rogers
Hi, when i return the item for a tableColumn in NSOutlineView, the following error is there: *** -[HDIR copyWithZone:]: selector not recognized [self = 0x39b670] Here HDIR is the item that i return for a particular tableColumn of outline view. HDIR also inherits from NSObject. WIshes, Nic

NSOutlineView Problem

2008-04-05 Thread Nick Rogers
Hi, i have checkboxes (NSButtonCell) in the first column of NSOutlineView. problem is what should I return as object for that column. Program is crashing there. Thanks, nick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

  1   2   >