Re: Getting process table info from within a Cocoa app

2008-07-25 Thread Chris Hanson
On Jul 25, 2008, at 10:58 PM, Sumner Trammell wrote: Hi. A daemon process is running independently of my Cocoa app. Given a pid file of the daemon process in a known location, say /var/run/ somedaemon.pid, I would like my Cocoa app to read that file and check the process table to see if the

Re: Getting process table info from within a Cocoa app

2008-07-25 Thread Andrew Farmer
On 25 Jul 08, at 22:58, Sumner Trammell wrote: Hi. A daemon process is running independently of my Cocoa app. Given a pid file of the daemon process in a known location, say /var/run/ somedaemon.pid, I would like my Cocoa app to read that file and check the process table to see if the daemon

Getting process table info from within a Cocoa app

2008-07-25 Thread Sumner Trammell
Hi. A daemon process is running independently of my Cocoa app. Given a pid file of the daemon process in a known location, say /var/run/somedaemon.pid, I would like my Cocoa app to read that file and check the process table to see if the daemon is actually running. If the daemon IS running, I want

NSSpeechSynthesizer delegate method not called in OCUint

2008-07-25 Thread Sean DeNigris
Hi, I'm using OCUnit injected into my project executable in xCode to test a class that contains an NSSynthesizer. The following didFinishSpeaking method gets called when I run the app normally, but not in the test. - (id)init { ... speechSynthesizer = [NSSpeechSynthesizer new];

Re: Problem when archiving data: [_NSViewGState encodeWithCoder:] unrecognized selector

2008-07-25 Thread JArod Wen
Hi Ken and Kyle, I am really sorry for this silly mistake in coding... It seems that the problem comes just from the decode line in encode method... Sorry for both of your valuable time! And for the NSNumber, in fact I used encodeObject: but it thrown a EXC_BAD_ACCESS to me, then I change

Re: Getting the Alert volume

2008-07-25 Thread chaitanya pandit
try NSBeep(); - Chaitanya On 25-Jul-08, at 6:13 PM, Mudi Dandan wrote: I need to get the Alert Volume set in Preferences so that I can respect the user's setting when playing alerts with NSSound. I have found GetSysBeepVolume() in CarbonSound/Sound.h but unfortunately it's deprecated since 1

Re: Folder has limited permissions.

2008-07-25 Thread Andrew Farmer
On 25 Jul 08, at 01:55, Macarov Anatoli wrote: When user has a standard account (not administrator), he/she doesn't have rights to create a file in the Directory /Applications/. I try to create a file with the help of function authopen. This code doesn't work: FILE *pFile = popen("/usr/lib

Re: Problem when archiving data: [_NSViewGState encodeWithCoder:] unrecognized selector

2008-07-25 Thread Ken Ferry
On Fri, Jul 25, 2008 at 9:33 PM, Ken Ferry <[EMAIL PROTECTED]> wrote: >> [coder encodeValueOfObjCType:@encode(NSNumber *) at:&magnitude]; > > This isn't encoding the number object, this is encoding the pointer to > the number object. When you get it out of the archive, you get the > same poi

QTKit Error loading DesktopVideoOut.component

2008-07-25 Thread chaitanya pandit
Hi, In my application i use a QTMovieView to display/play movies, but whenever init a QTMvoveView i get the following log, Any idea what might be wrong? Thanks for help. Running… =shlibs-removed,shlib- info=[num="116",name="AudioIPCPlugIn",kind="B",dyld- addr="0x15306000",reason="dyld",requ

Re: Repositioning a content view w/in a window

2008-07-25 Thread Kyle Sluder
On Fri, Jul 25, 2008 at 11:08 PM, Henry McGilton (Starbase) <[EMAIL PROTECTED]> wrote: > I don't see any value in > having a content view whose only purpose in life is to act as > a container for my drawing view. Not that I have any knowledge about this unfortunately forgotten feature, but I can f

Re: Problem when archiving data: [_NSViewGState encodeWithCoder:] unrecognized selector

2008-07-25 Thread Ken Ferry
> [coder encodeValueOfObjCType:@encode(NSNumber *) at:&magnitude]; This isn't encoding the number object, this is encoding the pointer to the number object. When you get it out of the archive, you get the same pointer as you put in, but that pointer points to some random bit of memory in yo

Re: NSenu and memory ownership

2008-07-25 Thread I. Savant
While this is true, I'm using - (NSMenuItem *)itemWithTitle:(NSString *)aString to get the item if it exists and using that pointer from then on out instead of replacing it. So, let's say I want to modify the File menu, if I have a pointer to it when the app closes, should I be worried about free

Re: Repositioning a content view w/in a window

2008-07-25 Thread Henry McGilton (Starbase)
On Jul 25, 2008, at 6:50 PM, Michael Ash wrote: On Fri, Jul 25, 2008 at 9:42 PM, Graham Cox <[EMAIL PROTECTED]> wrote: Well, it's the usual approach. The content view is something that the window owns to act purely as the root of its view hierarchy - there's usually not much to be gained

Re: Problem when archiving data: [_NSViewGState encodeWithCoder:] unrecognized selector

2008-07-25 Thread Kyle Sluder
On Fri, Jul 25, 2008 at 6:29 PM, JArod Wen <[EMAIL PROTECTED]> wrote: > Since I didn't find any object in the data to be written has the type of > NSViewGState, I am really confused about this error. Anyone can give me any > suggestions? This is usually a case of failing to retain an object you ow

Re: Repositioning a content view w/in a window

2008-07-25 Thread Michael Ash
On Fri, Jul 25, 2008 at 9:42 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > Well, it's the usual approach. The content view is something that the window > owns to act purely as the root of its view hierarchy - there's usually not > much to be gained by fiddling with it or putting your own content ther

Re: Repositioning a content view w/in a window

2008-07-25 Thread Graham Cox
Well, it's the usual approach. The content view is something that the window owns to act purely as the root of its view hierarchy - there's usually not much to be gained by fiddling with it or putting your own content there directly. For example, when you drag a custom view (or any view) in

Re: (Newb question?) Launching app on dock icon file drop?

2008-07-25 Thread Ken Thomases
On Jul 25, 2008, at 6:51 PM, Jacob Ole Juul Kolding wrote: I been searching for quite a while and reading the source code for DockScript by still no luck. Can anyone tell me how to make an Cocoa app launch when a file is drag 'n droped on it's icon? Well, it does so by default -- if the dro

Re: (Newb question?) Launching app on dock icon file drop?

2008-07-25 Thread Andrew Merenbach
Hi, Jacob, If it is a document-based program, the easiest method is to set up your Info.plist (generally configured through Xcode) to support various document types (in the role of "editor" for these types). Creating a "droplet"-type program shouldn't be much more difficult -- you'd need

Re: NSView colors

2008-07-25 Thread Graham Cox
I suspect you are just assigning your ivar without retaining the colour. It gets autoreleased and so crashes when you access it later (stale reference). blueColor probably continues to work because (as an internal optimisation) it just so happens that that is a singleton and isn't autorel

Re: Drawing a drop-shadow around a view

2008-07-25 Thread Graham Cox
Thanks Ian, just what I was looking for. Graham On 26 Jul 2008, at 8:18 am, Ian Jackson wrote: Anyway, hopefully with that link, along with the extra bit at the bottom about how to incorporate the code, this should all help draw shadows. ___

Re: Repositioning a content view w/in a window

2008-07-25 Thread R.L. Grigg
Thats a clever approach! I'll try it. Thx! Russ On Jul 25, 2008, at 6:10 PM, Andrew Merenbach wrote: Hi! The content view of a window is, as far as I should think, going to extend to the window's boundaries. Thus you can't move it up/down or left/right -- but you can put your content with

Re: Repositioning a content view w/in a window

2008-07-25 Thread Andrew Merenbach
Hi! The content view of a window is, as far as I should think, going to extend to the window's boundaries. Thus you can't move it up/down or left/right -- but you can put your content within a *subview* of that content view, then position it as necessary. Cheers, Andrew On Jul

Re: Can't get NSScrollView to resize properly

2008-07-25 Thread Greg
Thanks to Ryan Brown and Rainer Brockerhoff for assisting with the solution to this problem. Two solutions were invented, one that used a NSTextView, and one that simply flips the NSClipView. You can get both of them here: http://www.kinostudios.com/ScrollView_madness.zip - Greg On Jul 2

Repositioning a content view w/in a window

2008-07-25 Thread R.L. Grigg
I've created a NSWindow and set a content view. That displays fine, but I need to be able to fine tune the position of the content view within the window. In the docs for NSWindow -setContentView it says: "You can modify the content view’s coordinate system through its bounds rectangle, bu

(Newb question?) Launching app on dock icon file drop?

2008-07-25 Thread Jacob Ole Juul Kolding
I been searching for quite a while and reading the source code for DockScript by still no luck. Can anyone tell me how to make an Cocoa app launch when a file is drag 'n droped on it's icon? Any pointer greatly appreciated! Jacob Kolding [EMAIL PROTECTED] ___

Re: Simple Modal Password Dialog

2008-07-25 Thread Andy Lee
As with many such topics, the Xcode documentation window is your friend. A full-text search for "modal" was fruitful for me. A Google search targeted at developer.apple.com was even more fruitful. A search for "modal window site:developer.apple.com" had this as the first result:

Re: Retrieving the current -[NSShadow set]

2008-07-25 Thread Michael Ash
On Fri, Jul 25, 2008 at 6:59 PM, Keith Duncan <[EMAIL PROTECTED]> wrote: >> I don't recommend it, but you *could* refactor this code to use the >> currently set shadow. > > That's actually the original question. How does one do this? I have a tough time understanding why you ask this question righ

Re: bug in PhotoSearch

2008-07-25 Thread Corbin Dunn
On Jul 25, 2008, at 3:52 PM, [EMAIL PROTECTED] wrote: corbin, i think there is another bug in PhotoSearch. in TrackableOutlineView mouseEntered, the call to [iMouseCell mouseEntered:] should be outside the if block that sets iMouseCell if needed. If you have multiple tracking areas per ce

Problem when archiving data: [_NSViewGState encodeWithCoder:] unrecognized selector

2008-07-25 Thread JArod Wen
Hi Jedis, Problem showed when I was trying to archive the following data object(in debug model: po items): {type = mutable-small, count = 3, values = ( 0 : {type = immutable, count = 5, capacity = 6, pairs = ( 2 : {contents = "w (D)"} = 3 : {contents = "r (S)"} = 4 : {contents =

Getting the Alert volume

2008-07-25 Thread Mudi Dandan
I need to get the Alert Volume set in Preferences so that I can respect the user's setting when playing alerts with NSSound. I have found GetSysBeepVolume() in CarbonSound/Sound.h but unfortunately it's deprecated since 10.5. Any idea how to get that value ? -Mudi

Re: NSenu and memory ownership

2008-07-25 Thread Wesley Smith
> Removing a menu with -removeItem: or -removeItemAtIndex: doesn't return > anything, and in any case you didn't alloc, copy, or retain anything, so you > don't have to worry about releasing anything. While this is true, I'm using - (NSMenuItem *)itemWithTitle:(NSString *)aString to get the item i

Simple Modal Password Dialog

2008-07-25 Thread Arthur Coleman
I know that I must be missing something simple, but I have been unable to figure out how to password protect a simple application that I'm writing. I create an new xib file add a panel and I'm able to come up after my app loads but I haven't been able to figure out how to make the dialog m

Re: defer loading window using bundles in XCode 3 Leopard

2008-07-25 Thread Jeff Johnson
On Jul 25, 2008, at 5:33 PM, Kyle Sluder wrote: I *still* can't find mention of @executable_path in the official documentation, despite its criticality for certain functionality. Really? http://www.google.com/search?hl=en&q=site% 3Adeveloper.apple.com+%40executable_path&btnG=Search turns up

Re: Newb Question re Messaging and Return Values

2008-07-25 Thread Kevin Elliott
On Jul 24, 2008, at 4:04 PM, Brad Gibbs wrote: Looking at my problem further, I'm thinking I should make webServer a delegate of each of the devices. That would allow me to encapsulate the HTTP Posts and Gets for all of the devices in a single class. A device's methods could invoke the w

Re: defer loading window using bundles in XCode 3 Leopard

2008-07-25 Thread Adam R. Maxwell
On Friday, July 25, 2008, at 03:33PM, "Kyle Sluder" <[EMAIL PROTECTED]> wrote: >On Fri, Jul 25, 2008 at 5:28 PM, Adam R. Maxwell <[EMAIL PROTECTED]> wrote: >> I don't think this is an abuse of bundles, even though it's may not be that >> common anymore. If you look at >> http://www.stone.com/T

Re: Retrieving the current -[NSShadow set]

2008-07-25 Thread David Duncan
On Jul 25, 2008, at 3:59 PM, Keith Duncan wrote: That's actually the original question. How does one do this? You don't. If I were doing this, I would simply pass the shadow parameters into the function (and create conveniences for myself if I were so inclined). The ability for NSShadow

Re: Problem drawing multiple parallel lines

2008-07-25 Thread Mark Teagarden
Thanks very much Quincy. That did the trick! Mark On Jul 25, 2008, at 5:32 PM, Quincey Morris wrote: On Jul 25, 2008, at 15:08, Mark Teagarden wrote: NSBezierPath * apath; apath = [[NSBezierPath alloc] init]; [[NSColor grayColor] set]; for(i=0;i<12;i++){ [apath setLineWidth:0.15];

Re: Retrieving the current -[NSShadow set]

2008-07-25 Thread Keith Duncan
I don't recommend it, but you *could* refactor this code to use the currently set shadow. That's actually the original question. How does one do this? Keith Duncan [EMAIL PROTECTED], 33software.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

bug in PhotoSearch

2008-07-25 Thread [EMAIL PROTECTED]
corbin, i think there is another bug in PhotoSearch. in TrackableOutlineView mouseEntered, the call to [iMouseCell mouseEntered:] should be outside the if block that sets iMouseCell if needed. also, is there a specific reason for caching the cell in iMouseCell? i've done away with the caching

Re: defer loading window using bundles in XCode 3 Leopard

2008-07-25 Thread Kyle Sluder
On Fri, Jul 25, 2008 at 5:28 PM, Adam R. Maxwell <[EMAIL PROTECTED]> wrote: > I don't think this is an abuse of bundles, even though it's may not be that > common anymore. If you look at > http://www.stone.com/The_Cocoa_Files/Thanks_A_Bundle_.html or the source for > CVL [1], I think you'll fin

Re: Problem drawing multiple parallel lines

2008-07-25 Thread Quincey Morris
On Jul 25, 2008, at 15:08, Mark Teagarden wrote: NSBezierPath * apath; apath = [[NSBezierPath alloc] init]; [[NSColor grayColor] set]; for(i=0;i<12;i++){ [apath setLineWidth:0.15]; [apath moveToPoint: NSMakePoint(borders.origin.x +20+16*i,borders.origin.y+20)]; [apath lineToPoint: NSM

Re: Drawing a drop-shadow around a view

2008-07-25 Thread Ian Jackson
Ah yes, Perhaps I should add that address in the comments at the top of the class for future reference. I see that the shadow stuff isn't in that original code, but it all seems to go hand in hand. The complete lack of commenting in the drawRect method strongly implies that I am responsib

Re: Retrieving the current -[NSShadow set]

2008-07-25 Thread Michael Ash
On Fri, Jul 25, 2008 at 10:16 AM, Keith Duncan <[EMAIL PROTECTED]> wrote: > Here's the code: > > // Created by Sean Patrick O'Brien on 4/1/08. > // Copyright 2008 MolokoCacao. All rights reserved. > - (void)fillWithInnerShadow:(NSShadow *)shadow { >[NSGraphicsContext saveGraphicsState]; >

Re: Problem drawing multiple parallel lines

2008-07-25 Thread Mark Teagarden
Herewith, the code: NSBezierPath * apath; apath = [[NSBezierPath alloc] init]; [[NSColor grayColor] set]; for(i=0;i<12;i++){ [apath setLineWidth:0.15]; [apath moveToPoint: NSMakePoint(borders.origin.x +20+16*i,borders.origin.y+20)]; [apath lineToPoint: NSMakePoint(borders.origin.x +42

Re: NSView colors

2008-07-25 Thread Greg
Are you retaining that NSColor object to make sure it sticks around? - Greg On Jul 25, 2008, at 5:40 PM, Ashley Perrien wrote: I have a custom NSView that contains as an instance variable a color. If I set the color in init as lineColor = [NSColor blueColor]; all is well. If instead I use [

NSView colors

2008-07-25 Thread Ashley Perrien
I have a custom NSView that contains as an instance variable a color. If I set the color in init as lineColor = [NSColor blueColor]; all is well. If instead I use [NSColor colorWithCalibratedRed: 0.5 green: 0.5 blue: 1.0 alpha: 1.0], the program crashes if I try and access or change the col

Can't get NSScrollView to resize properly

2008-07-25 Thread Greg
I'm trying to accomplish something that I thought should have been very basic, but for some reason is turning out to be much more of a hassle than I anticipated. I have a square with stuff in it (various controls, etc), this square should resize in width, but not height, and should be ancho

Re: defer loading window using bundles in XCode 3 Leopard

2008-07-25 Thread Adam R. Maxwell
On Friday, July 25, 2008, at 12:40PM, "Kyle Sluder" <[EMAIL PROTECTED]> wrote: >On Fri, Jul 25, 2008 at 2:19 PM, julius <[EMAIL PROTECTED]> wrote: >> What I have seen on the web seemed to indicate that bundles are a really >> good way of splitting up code development etc. >> I like keeping code c

Re: NSTableView NSTrackingArea and mouse clicks

2008-07-25 Thread [EMAIL PROTECTED]
hi corbin, i understand ur explanation and it makes sense. and i see that the fix works in PhotoSearch. unfortunately, it doesn't solve all my problems. but at this point, i believe i may have a draw problem as i'm seeing the highlight being drawn twice. thanx, ken ps. i used the term toolbo

Re: NSOutlineView with Multiple Core Data Entities

2008-07-25 Thread Jonathan Dann
Ah yeah, that bug is intentional! The model uses an abstract TreeNode entity, which the tree controller is set to; however when you want concrete LeafNode and GroupNode entities (or sub-entities thereof) you need to create your own -add: methods so you can insert the correct entity into th

Re: Cleaning up my Data Model

2008-07-25 Thread Kai
Yes, there is: IB 3.1 (coming with Xcode 3.1) lists all "Referencing Bindings" pointing to an object under the "Connections" tab. Hope this helps. Kai On 25.7.2008, at 18:06, Richard Gutierrez wrote: Thanks for the response... Ultimately what I am trying to do is determine which objects ar

Re: NSTableView NSTrackingArea and mouse clicks

2008-07-25 Thread Corbin Dunn
Hi ken, It took me a minute to realize it, but what you describe below makes sense. Let me clarify what preparedCellAtColumn:row: does; this is the main funnel point that NSTableView uses to get a cell to do any operations (ie: drawing, type selection, etc). NSTableView's implementation g

Re: NSOutlineView with Multiple Core Data Entities

2008-07-25 Thread Garrett Bjerkhoel
Here is a rough sketch of my datamodel. If you like I can take a screenshot and post a link to it. Client ---Project Todo Writeoff ---Item By each entity having its own group, I am refering to say Mail.app how it has "MAILBOXES", then "REMINDERS", or in iTunes "DEVICES", and "LIBRARY".

Re: NSTableView NSTrackingArea and mouse clicks

2008-07-25 Thread [EMAIL PROTECTED]
corbin, thanx for the reply. i was pretty sure it wasn't my drawing code and after some more "playing around" i'm convinced of that. i've narrowed down my problem (and i can reproduce it in the PhotoSearch demo -- see below). the -[NSCell setHighlighted:] message does NOT get sent to a cell

Re: defer loading window using bundles in XCode 3 Leopard

2008-07-25 Thread Kyle Sluder
On Fri, Jul 25, 2008 at 2:19 PM, julius <[EMAIL PROTECTED]> wrote: > What I have seen on the web seemed to indicate that bundles are a really > good way of splitting up code development etc. > I like keeping code compartamentalised and bundles looked like a good way to > do it. This is not what bu

DO Chat Example

2008-07-25 Thread Justin Giboney
I am working on a chat program that I could use to explain and demonstrate Distributed Objects (cause I think they are really cool). I have two applications, the server, which is intended to not be seen by the students, and the client, which is intended to be built by the students. It works so far

Re: Drawing a drop-shadow around a view

2008-07-25 Thread Jonathan Dann
How odd I came across this yesterday on my travels! The site for this source is http://www.bergdesign.com/missing_cocoa_docs/nsclipview.html Jonathan www.espresso-served-here.com On 25 Jul 2008, at 11:13, Ian Jackson wrote: Hi Graham, if I understand your question, then I wanted to do som

Re: NSOutlineView with Multiple Core Data Entities

2008-07-25 Thread Jonathan Dann
On 25 Jul 2008, at 17:21, Garrett Bjerkhoel wrote: I have a NSOutlineView hooked up to a NSTreeController, which has multiple entities inside of it. I would like to know how to set it up having each entity having its own "group". I have downloaded Jonathan Dann's example, which compiles bu

Re: Problem drawing multiple parallel lines

2008-07-25 Thread Andy Lee
Can you show your code? --Andy On Jul 25, 2008, at 2:24 PM, Mark Teagarden wrote: Hi, I’m trying to draw a simple game board similar to a chinese checkerboard. As a first attempt I set up a routine to draw 10 parallel lines of the same length, 16 pixels apart along the x axis and continui

re: Core Data Debugging

2008-07-25 Thread Ben Trumbull
I use Core Data to store the information and it all runs pretty smoothly, that is until the app has been running for 15-20mins and I start getting Core Data save errors such as "CoreData does not support persistent cross-store relationships" This happens when you save objects to a store that h

Re: NSenu and memory ownership

2008-07-25 Thread Caleb Strockbine
On Friday, July 25, 2008, at 01:43PM, Wesley Smith wrote: >I have a question regarding memory ownership and NSMenus. Let's say I >have an application with a nib file containing the usual menu items >like File, Edit, Window etc. If, during the execution of my app, I >swap out the Window menu with

Problem drawing multiple parallel lines

2008-07-25 Thread Mark Teagarden
Hi, I¹m trying to draw a simple game board similar to a chinese checkerboard. As a first attempt I set up a routine to draw 10 parallel lines of the same length, 16 pixels apart along the x axis and continuing NE at a 60 degree angle. I used NSBezierPath moveTo / lineTo to do this. The program d

Re: defer loading window using bundles in XCode 3 Leopard

2008-07-25 Thread julius
Kyle Hi On 25 Jul 2008, at 18:49, Kyle Sluder wrote: On Fri, Jul 25, 2008 at 1:38 PM, julius <[EMAIL PROTECTED]> wrote: I want to defer loading a window/panel plus controller and related code by using bundles. Do you really not want to include the code inside your executable? Bundles are t

Re: defer loading window using bundles in XCode 3 Leopard

2008-07-25 Thread Kyle Sluder
On Fri, Jul 25, 2008 at 1:38 PM, julius <[EMAIL PROTECTED]> wrote: > I want to defer loading a window/panel plus controller and related code by > using bundles. Do you really not want to include the code inside your executable? Bundles are typically used by the application developer when the exist

NSTableView/NSOutlineView column resizing failing

2008-07-25 Thread Eric Long
Hi, I have an NSOutlineView that is set to uniformly resize its table columns. Under prior to 10.5, this works fine, but when running on 10.5.x the columns do not resize. I don't have any special resizing code in place, just depending on the normal mechanism for handling column resizing when the

defer loading window using bundles in XCode 3 Leopard

2008-07-25 Thread julius
Hi, I want to defer loading a window/panel plus controller and related code by using bundles. I've looked at the Bundle programming guide http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/Tasks/creating.html#/ /apple_ref/doc/uid/20001122 and the Code Loading Program

Senior Cocoa Developer Needed

2008-07-25 Thread Darren Tessitore
Dear Group, A client of mine in the San Diego area is looking for a Senior Mac Cocoa developer. They are a start-up company and they are looking for a true leader to help bring them to the next level. They need someone who can make it happen and doesn't need any direction at all. You will be r

NSenu and memory ownership

2008-07-25 Thread Wesley Smith
Hi List, I have a question regarding memory ownership and NSMenus. Let's say I have an application with a nib file containing the usual menu items like File, Edit, Window etc. If, during the execution of my app, I swap out the Window menu with another NSMenu object generated during runtime, who o

Re: NSString sizeWithAttributes inaccuracy

2008-07-25 Thread Jacob Ole Juul Kolding
IIRC from my debugging sessions sizeWithAttributes already does that? Jacob Kolding [EMAIL PROTECTED] On Jul 25, 2008, at 1:47 AM, Aki Inoue wrote: Try using -boundingRectWithSize:options:attributes instead with NSStringDrawingUsesDeviceMetics. Aki On 2008/07/24, at 14:23, Jacob Ole Juul K

Re: NSString sizeWithAttributes inaccuracy

2008-07-25 Thread Jacob Ole Juul Kolding
It's more than one pixel. First time i noticed it was with a string of about 140 chars which gut truncated about 10 chars. Jacob Kolding [EMAIL PROTECTED] On Jul 25, 2008, at 11:19 AM, Manfred Schwind wrote: he problem is that on very large strings sizeWithAttributes comes up short [no pu

NSCollectionView

2008-07-25 Thread mahaboob pa
Hi, I'm working with NSCollectionView. I have some formated files, containing different colors and fonts, that want to be used as template. I succeeded to displayed it in the CollectionView. Now I used TextView as an editor. I want to select one item from the CollectionView by a single by highlight

Re: Cleaning up my Data Model

2008-07-25 Thread Richard Gutierrez
Thanks for the response... Ultimately what I am trying to do is determine which objects are bound to which array controllers. I understand that if I delete an array controller, all of the bindings associated with that array controller will be removed, but I need to know which items are associat

NSOutlineView with Multiple Core Data Entities

2008-07-25 Thread Garrett Bjerkhoel
I have a NSOutlineView hooked up to a NSTreeController, which has multiple entities inside of it. I would like to know how to set it up having each entity having its own "group". I have downloaded Jonathan Dann's example, which compiles but freezes. I can see how his Core Data model works,

Re: Folder sharing attributes

2008-07-25 Thread Kyle Sluder
On Fri, Jul 25, 2008 at 11:27 AM, Peter Alshuth <[EMAIL PROTECTED]> wrote: > I was wondering how I can retrieve information about a particular folder if > this folder is shared or not. Use FSGetCatalogInfo (part of CoreServices). The FSCatalogInfo struct has a "sharingFlags" field. http://develo

Re: Loading kernal Extension from Cocoa

2008-07-25 Thread Kyle Sluder
On Fri, Jul 25, 2008 at 11:35 AM, sheen mac <[EMAIL PROTECTED]> wrote: > Any way to load kext without > asking password?. Nope. To allow a program to install a kernel extension without user authentication would be absurd. --Kyle Sluder ___ Cocoa-dev m

Loading kernal Extension from Cocoa

2008-07-25 Thread sheen mac
Hi All, I want to load Kernal Extension (kext) on run time.I load it using shell command(kextload).The kext file I included in the bundle. I loaded it from there. But Its asking password when executing the command using security framework ( AuthorizationExecuteWithPrivileges) . Any way to load ke

Folder sharing attributes

2008-07-25 Thread Peter Alshuth
Hi all, I was wondering how I can retrieve information about a particular folder if this folder is shared or not. I looked into the fileAttributesAtPath method of the NSFileManager class but cannot find any entries regarding the sharing status. How can I retrieve this information and also

Re: NSTableView NSTrackingArea and mouse clicks

2008-07-25 Thread Corbin Dunn
On Jul 24, 2008, at 6:16 PM, [EMAIL PROTECTED] wrote: i have an NSTableView that uses a data source (no bindings, but i don't think this is relevant). one column uses a custom cell that is actually a subclass of NSTokenFieldCell (but i don't think this is relevant either). i draw this cell

Re: Folder has limited permissions.

2008-07-25 Thread Kyle Sluder
On Fri, Jul 25, 2008 at 4:55 AM, Macarov Anatoli <[EMAIL PROTECTED]> wrote: > How would be the correct way to do? Obligatory: why do you want to do this? From a user-experience point of view, putting things in /Applications is reserved for Installer.app and drag-installs using the Finder. Partic

Re: Retrieving the current -[NSShadow set]

2008-07-25 Thread Keith Duncan
Here's the code: // Created by Sean Patrick O'Brien on 4/1/08. // Copyright 2008 MolokoCacao. All rights reserved. - (void)fillWithInnerShadow:(NSShadow *)shadow { [NSGraphicsContext saveGraphicsState]; NSShadow *shadowCopy = [shadow copy]; NSSize offse

Re: Retrieving the current -[NSShadow set]

2008-07-25 Thread Michael Ash
On Fri, Jul 25, 2008 at 9:57 AM, Keith Duncan <[EMAIL PROTECTED]> wrote: >> The "need" to do this suggests a possible problem with your design. What >> are you trying to do? > > I'm refactoring a method I found online that takes an explicit NSShadow > argument. I felt that was a poor design as most

Re: Retrieving the current -[NSShadow set]

2008-07-25 Thread Keith Duncan
The "need" to do this suggests a possible problem with your design. What are you trying to do? I'm refactoring a method I found online that takes an explicit NSShadow argument. I felt that was a poor design as most of the the drawing properties are implicit in nature; color, transform and s

Calling setLineFragment on typesetter

2008-07-25 Thread Manoj Patwardhan
I have two line fragments in a line and the first one contains an inline image. In the willSetLineFragment method of my typesetter subclass, while processing the second line fragment, I need to go back and fix the baseline offset in the first line fragment. To do that I call setLineFragment

Re: Retrieving the current -[NSShadow set]

2008-07-25 Thread Graham Cox
I don't think there is a way. Quartz is pretty much a one-way street - you set stuff, tell it to draw and it does. Much of its internal state is not readable, at least not publicly. The "need" to do this suggests a possible problem with your design. What are you trying to do? cheers, Grah

Retrieving the current -[NSShadow set]

2008-07-25 Thread Keith Duncan
I need a way of retrieving the current NSShadow as previously -set without having to pass it as an explicit argument. I've looked through the NSGraphicsContext header and docs but I can't find any way of getting it. Oddly, I can't find any way of getting the current NSColor either so I mu

Re: Drawing a drop-shadow around a view

2008-07-25 Thread Ian Jackson
Hi Graham, if I understand your question, then I wanted to do something like this a while back. I got something off the internet, though I can't remember where. Here's the source that I incorporated into my code. It's been ages since I added it in, so I can't remember whether this takes

Re: NSString sizeWithAttributes inaccuracy

2008-07-25 Thread Manfred Schwind
he problem is that on very large strings sizeWithAttributes comes up short [no pun intended] How much too short? Is it less than 1 pixel? float tiw = [self stringPixelWidth:[records objectAtIndex:i]]; if(tiw > maxWidth){

Re: Folder has limited permissions.

2008-07-25 Thread Macarov Anatoli
When user has a standard account (not administrator), he/she doesn't have rights to create a file in the Directory /Applications/. I try to create a file with the help of function authopen. This code doesn't work: FILE *pFile = popen("/usr/libexec/authopen -stdoutpipe sys.openfile.readwritecre

Re: XML serialization and deserialization

2008-07-25 Thread Chris Hanson
On Jul 24, 2008, at 11:16 PM, Phil wrote: On Fri, Jul 25, 2008 at 6:06 PM, Oleg Krupnov <[EMAIL PROTECTED]> wrote: I have read it now and I believe the guide suggests that i archive my object tree in a binary byte stream, not an XML. There are no implementations of NSCoder that would output XM