Re: NSTrackingArea strange requirement

2008-11-29 Thread chaitanya pandit
Hi, I dunno if this is the right way to do it, but what if you Override mouseMoved: for the main view that contains all the subviews, and use a hitTest: to find the view over which the cursor is hovering and simply use [[NSCursor whateverCursor] set]; to change the cursor depending on the

Re: Authorized Copy/Erase (NSFileManager)

2008-11-29 Thread Michael Ash
On Sat, Nov 29, 2008 at 5:54 PM, Joe Turner <[EMAIL PROTECTED]> wrote: > So, I'm creating a copy/erase tool for an app, and I need to be able to > authorize the user so I can copy and delete files that need Admin > permissions. I have looked thoroughly through the Security.framework, but > could no

Re: about Preferences Toolbar

2008-11-29 Thread Kyle Sluder
On Sat, Nov 29, 2008 at 11:55 PM, BirdSong <[EMAIL PROTECTED]> wrote: > Could anyone tell me what's it or where can I find it? It's just a standard toolbar. The buttons are selection buttons, though, which means that you have to notify the toolbar that they are selectable using the -toolbarSelect

Re: about Preferences Toolbar

2008-11-29 Thread Dave DeLong
Check out Brandon's fantastic BWToolkit: http://www.brandonwalkin.com/blog/2008/11/13/introducing-bwtoolkit/ HTH, Dave On 29 Nov, 2008, at 9:55 PM, BirdSong wrote: Hi all, I am writting the mac component of a mac-iphone application. I saw most of the applications(Finder, MSN, iChat...) on

about Preferences Toolbar

2008-11-29 Thread BirdSong
Hi all, I am writting the mac component of a mac-iphone application. I saw most of the applications(Finder, MSN, iChat...) on Mac are all using the same style preferences toolbar. However, I didn't find it in IB's Libirary. Could anyone tell me what's it or where can I find it? Thanks. ___

Bindings help in many-to-many case

2008-11-29 Thread Jon Munson II
Namaste! After having done many hours of investigating, head-scratching, trial/ error, and more searching, I've gotten stuck. I created a simple scenario to work out how to accomplish a many-to- many situation. I created two entities: Person and Hat. They are defined thus: Person: personN

Re: Right language

2008-11-29 Thread Michael Ash
On Sat, Nov 29, 2008 at 5:30 AM, Arnold Nefkens <[EMAIL PROTECTED]> wrote: > Hello List, > > > I'm pretty new to Cocoa and just started with "Cocoa Programming for Mac OS > X (3rd ed)" of Aaron Hillegass. > > I've got an idea for a app that uses a lot of shell commands to get certain > information.

Re: UIViewController memory warnings | didReceiveMemoryWarning | setView | releasing outlets | releasing properties

2008-11-29 Thread Ashley Clark
On Nov 29, 2008, at 2:58 PM, Glenn Bloom wrote: // Implement loadView if you want to create a view hierarchy programmatically - (void)loadView { /* snip */ NSMutableString * stringCompleteMutable = [NSMutableString stringWithString:string00Local]; // local variable set with a construct

(no subject)

2008-11-29 Thread Ulai Beekam
Hi I know I can put an image into a layer by doing theLayer.contents = cgTheGreatImage. But that will just put a single image on the layer. My question is, how can I use that image to have a repeating pattern on that layer of that single image? Can you give me short example code snippet?

RE: Simple Core Animation Problem

2008-11-29 Thread Ulai Beekam
Sorry, the last email got posted as rich text and became garbled. Allow me to try again. Thanks for your reply My plan is to have a one big view covering the whole window, and then put a one big layer covering all that view. That way the rest of the user interface could just be many sublaye

RE: Simple Core Animation Problem

2008-11-29 Thread Ulai Beekam
Thanks for your replyMy plan is to have a one big view covering the whole window, and then put a one big layer covering all that view. That way the rest of the user interface could just be many sublayers within the big layers.The rounded rectangle I mentioned would be one of those sublayers. Ho

Re: Keystrokes for non-ascii letters (SOLVED)

2008-11-29 Thread Dave DeLong
Fantastic! I've gotten it to work, and it works beautifully! Thank you, James (and everyone else) for helping me with this. For archival purposes, here's my code: CGEventSourceRef eventSource = CGEventSourceCreate(kCGEventSourceStateHIDSystemState); CGEventRef keyEventDown = CGEventCreat

Re: reading a PDF

2008-11-29 Thread Torsten Curdt
> I haven't looked extensively into the latest Apple documentation on this > subject and wouldn't be surprised if it has been "rolled in" recently, but > David Gelphman's Programming with Quartz does go into this in some detail. > > Chapter 14, Creating and Examining PDF Documents, contains a lis

Re: Checking One Array Against Another?

2008-11-29 Thread Ken Thomases
On Nov 28, 2008, at 9:53 PM, Pierce Freeman wrote: for (int arraySort = 0; arraySort < [arrayInfo count]; arraySort++) { for (int arrayNewSort = 0; arrayNewSort < [arrayNewInfo count]; arrayNewSort++) { if ([ arrayInfo objectAtIndex:arr

Fwd: MVC question

2008-11-29 Thread Michael A. Crawford
I've included Klaus' response for the benefit of anyone who may be interested: On 29.11.2008, at 08:38, Michael A. Crawford wrote: When implementing the MVC pattern, is it inappropriate or bad-form for views and layers to have direct read-only access to the model? The Cocoa Fundamentals Gu

Re: reading a PDF

2008-11-29 Thread Joel Norvell
Hi Torsten, I haven't looked extensively into the latest Apple documentation on this subject and wouldn't be surprised if it has been "rolled in" recently, but David Gelphman's Programming with Quartz does go into this in some detail. Chapter 14, Creating and Examining PDF Documents, contains

Re: reading a PDF

2008-11-29 Thread Torsten Curdt
> At my day job, we use pdfbox (see www.pdfbox.org) in automated tests. It > basically grabs raw textual data and spits out two-dimensional arrays of > strings. > > While it's java based, it may shed a light on how text extraction can be > done. I do not, however, know if their licensing model wi

Authorized Copy/Erase (NSFileManager)

2008-11-29 Thread Joe Turner
So, I'm creating a copy/erase tool for an app, and I need to be able to authorize the user so I can copy and delete files that need Admin permissions. I have looked thoroughly through the Security.framework, but could not find anything. I do not want to do a shell script, so I would rather

Re: QuartzCore and CIContext

2008-11-29 Thread DKJ
I found out what's wrong: Core Image isn't available for the iPhone OS. dkj ___ 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-admins(at)lists

Re: Text blurred in application

2008-11-29 Thread Kyle Sluder
On Sat, Nov 29, 2008 at 5:12 PM, Adil Saleem <[EMAIL PROTECTED]> wrote: > My scenario is a little different than what you have described. I don't have > images on buttons. I have my custom window (which is a black colored image) > and on it are the static texts. These texts are displaying blurred

Re: displaying huge log files

2008-11-29 Thread Nick Zitzmann
On Nov 29, 2008, at 5:39 AM, Mudi Dandan wrote: Is it possible to to display a memory mapped file in an NSTextView Of course. and in such way that if the file grows the NSTextView updates. Yes, though you'd have to update the text view manually. Keep in mind that: 1. NSTextStorage w

Re: Text blurred in application

2008-11-29 Thread Adil Saleem
Hi, My scenario is a little different than what you have described. I don't have images on buttons. I have my custom window (which is a black colored image) and on it are the static texts. These texts are displaying blurred. Although i have not been able to figure out why is this happening, but

Re: Keystrokes for non-ascii letters

2008-11-29 Thread James W. Walker
On Nov 29, 2008, at 1:03 PM, Dave DeLong wrote: More questions! (wh =) ) I've abandoned the NSEvent approach, although it would've been nice if it had worked, and am now trying CGEventKeyboardSetUnicodeString. Here's my code: CGEventSourceRef eventSource = CGEventSourceCreate(k

Re: reading a PDF

2008-11-29 Thread Ricky Sharp
On Nov 29, 2008, at 3:16 PM, Torsten Curdt wrote: I just assume that the actual content is hidden inside the page's content stream(s). Raw content, mostly, sometimes. But the draw commands are what put it all together. For instance, you might have a paragraph of text where there is one

Re: reading a PDF

2008-11-29 Thread Torsten Curdt
>> I just assume that the actual content is hidden inside the page's >> content stream(s). > > Raw content, mostly, sometimes. But the draw commands are what put it all > together. > > For instance, you might have a paragraph of text where there is one draw > command per line, or you might have a p

Re: Keystrokes for non-ascii letters

2008-11-29 Thread Dave DeLong
More questions! (wh =) ) I've abandoned the NSEvent approach, although it would've been nice if it had worked, and am now trying CGEventKeyboardSetUnicodeString. Here's my code: CGEventSourceRef eventSource = CGEventSourceCreate(kCGEventSourceStateHIDSystemState); CGEventRef keyE

Rollover on custom Cells

2008-11-29 Thread Gustavo Pizano
Hello, I know this was already asked, but I couldn't find any reply which will help me in the list. I have a Custom View, that view has a layer, and that layer has many sub-layers which are squares, so at the end what I have is a grid of 10 x 10, the book Im reading (Hillegass) says that t

Re: Keystrokes for non-ascii letters

2008-11-29 Thread James W. Walker
On Nov 29, 2008, at 10:48 AM, Dave DeLong wrote: My goal now is to accept arbitrary strings and post the keyboard events for them. For ASCII characters, I can easily dispatch a CGEventRef. However, I want to be able to send non-ascii characters as well. Basically, any character that's v

Re: reading a PDF

2008-11-29 Thread Scott Ribe
> I just assume that the actual content is hidden inside the page's > content stream(s). Raw content, mostly, sometimes. But the draw commands are what put it all together. For instance, you might have a paragraph of text where there is one draw command per line, or you might have a paragraph of

Re: Checking One Array Against Another

2008-11-29 Thread Graff
On Nov 29, 2008, at 1:00 PM, Pierce Freeman wrote: The only problem with running that is that I get a error in the log and it doesn't seem to be working: -[NSCFSet minusSet:]: mutating method sent to immutable object My slightly modified code is below: NSMutableSet *openApplicationsSet = [N

RE: UIViewController memory warnings | didReceiveMemoryWarning |

2008-11-29 Thread Glenn Bloom
In response to an excellent first reply, below is a revision to my original post that corrects various points, and that also incorporates some changes to better focus my remaining questions - please disregard my original post in favor of the following: In the course of trying to understand UIViewC

Right language

2008-11-29 Thread Arnold Nefkens
Hello List, I'm pretty new to Cocoa and just started with "Cocoa Programming for Mac OS X (3rd ed)" of Aaron Hillegass. I've got an idea for a app that uses a lot of shell commands to get certain information. But I also want to use Interface builder to provide the users the right interfa

Re: Checking One Array Against Another

2008-11-29 Thread Graff
On Nov 29, 2008, at 1:00 PM, Pierce Freeman wrote: The only problem with running that is that I get a error in the log and it doesn't seem to be working: -[NSCFSet minusSet:]: mutating method sent to immutable object My slightly modified code is below: NSMutableSet *openApplicationsSet = [N

Re: Checking One Array Against Another

2008-11-29 Thread Pierce Freeman
Okay... That makes sense. :) Thanks for your (and everyone else's) help. Sincerely, Pierce F On 11/29/08 10:58 AM, "Ashley Clark" <[EMAIL PROTECTED]> wrote: > On Nov 29, 2008, at 12:47 PM, Pierce Freeman wrote: > >> NSMutableSet *openApplicationsSet = [NSSet >> setWithArray:openApplications

Re: Checking One Array Against Another

2008-11-29 Thread Ashley Clark
On Nov 29, 2008, at 12:47 PM, Pierce Freeman wrote: NSMutableSet *openApplicationsSet = [NSSet setWithArray:openApplications]; While openApplicationsSet is declared to be an NSMutableSet you are not creating one. Your assignment should be [NSMutableSet setWithArray:...] NSSet *allowedA

Re: Keystrokes for non-ascii letters

2008-11-29 Thread Jean-Daniel Dupas
Le 29 nov. 08 à 19:34, Bill Bumgarner a écrit : On Nov 29, 2008, at 10:00 AM, Dave DeLong wrote: Can this be used for posting events that would get picked up by other applications? Nope. To be honest, I don't know how you post such events to another application -- specifically targeted t

Re: Checking One Array Against Another

2008-11-29 Thread Pierce Freeman
I may be totally wrong about this, but I think it said that it takes something away from the Mutable Array, and that it doesn't necessarily return anything... As I said, I may be totally wrong about this though. ;) Sincerely, Pierce F. On 11/29/08 10:37 AM, "Charles Steinman" <[EMAIL PROTECTE

Re: Keystrokes for non-ascii letters

2008-11-29 Thread Dave DeLong
The client application is running on an iPhone/iPod touch and is sending events to the server, which runs (as I mentioned) as an agent application on the desktop. I'm writing both. The purpose of the server application is to dispatch events to the system. These can be many different kinds

Re: Checking One Array Against Another

2008-11-29 Thread Pierce Freeman
NSMutableSet *openApplicationsSet = [NSSet setWithArray:openApplications]; NSSet *allowedApplicationsSet = [NSSet setWithArray:applicationsAllowedMutableArray]; NSMutableSet *badApplicationsSet = [openApplicationsSet minusSet:allowedApplicationsSet]; NSAlert * askToContinue = [NSAlert alertWithM

Re: UIViewController memory warnings | didReceiveMemoryWarning | setView | releasing outlets | releasing properties

2008-11-29 Thread Ashley Clark
On Nov 29, 2008, at 9:45 AM, Glenn Bloom wrote: Ashley, Can't thank you enough. I just posted the following, hoping to pre- empt other folks from wasting time correcting me on various points you addressed - and I hope, refocusing things on my major questions. I have of course been throug

reading a PDF

2008-11-29 Thread Torsten Curdt
Hey folks, I am a little stuck here. I am trying to extract (and later modify) text and images in a PDF. First I turned to PDFkit but that seems to be way to high level for these things. Now I am trying with Quartz. While I get to the CGPDFPageRef int pages = CGPDFDocumentGetNumberOfPages(do

Re: Checking One Array Against Another

2008-11-29 Thread Klaus Backert
On 29.11.2008, at 19:30, Pierce Freeman wrote: Klaus: For whatever reason, Xcode is telling me that "error: void value not ignored as it ought to be" when I try to make badApplicationsSet a mutable set. Please. Show. Your. Code. Klaus ___ C

Re: Checking One Array Against Another

2008-11-29 Thread Charles Steinman
--- On Sat, 11/29/08, Pierce Freeman <[EMAIL PROTECTED]> wrote: > For whatever reason, Xcode is telling me that "error: > void value not ignored > as it ought to be" when I try to make > badApplicationsSet a mutable set. Take a look at the documentation for -[NSMutableSet minusSet:]. Specificall

Font binding

2008-11-29 Thread Andre Masse
Hi all, I want some fonts in my views to be customizable. Notably, for a table view. I added a font in the user defaults and this part works fine. I did some test on a label and it doesn't work. I want to change the label's font and display the font name. Here's what I've done: I place

Re: Keystrokes for non-ascii letters

2008-11-29 Thread Bill Bumgarner
On Nov 29, 2008, at 10:00 AM, Dave DeLong wrote: Can this be used for posting events that would get picked up by other applications? Nope. To be honest, I don't know how you post such events to another application -- specifically targeted to another application. In general, Mac OS X main

Re: Checking One Array Against Another

2008-11-29 Thread Pierce Freeman
Klaus: For whatever reason, Xcode is telling me that "error: void value not ignored as it ought to be" when I try to make badApplicationsSet a mutable set. Sincerely, Pierce F. On 11/29/08 10:22 AM, "Klaus Backert" <[EMAIL PROTECTED]> wrote: > > On 29.11.2008, at 19:00, Pierce Freeman wro

Re: Checking One Array Against Another

2008-11-29 Thread Klaus Backert
On 29.11.2008, at 19:00, Pierce Freeman wrote: The only problem with running that is that I get a error in the log and it doesn't seem to be working: -[NSCFSet minusSet:]: mutating method sent to immutable object My slightly modified code is below: NSMutableSet *openApplicationsSet = [NSSe

Re: Keystrokes for non-ascii letters

2008-11-29 Thread Dave DeLong
An off-list reply pointed this one out to me as well, and I've been playing with it. But I have some more roadblocks: My server app is an agent application (it only runs from the menubar). My preliminary tests show that posting keyboard events this way to another application only result i

Re: Checking One Array Against Another

2008-11-29 Thread Pierce Freeman
The only problem with running that is that I get a error in the log and it doesn't seem to be working: -[NSCFSet minusSet:]: mutating method sent to immutable object My slightly modified code is below: NSMutableSet *openApplicationsSet = [NSSet setWithArray:openApplications]; NSSet *allowedAppl

Re: Keystrokes for non-ascii letters

2008-11-29 Thread Ricky Sharp
On Nov 29, 2008, at 10:26 AM, Dave DeLong wrote: I'm working on a client/server application. The client sends tiny "Event" objects to the server that can contain an NSString of a letter or short sequence of letters (up to about 4). What I'm trying to do is figure out how the server can p

QuartzCore and CIContext

2008-11-29 Thread DKJ
I've included QuartzCore.framework in my project frameworks. This is my header file: #import #import @interface MyImageView : UIImageView {} @end I have this in MyImageView.m: CGContextRef cgref = UIGraphicsGetCurrentContext(); CIContext *c =

Sorting an NSTableView

2008-11-29 Thread Gerriet M. Denkmann
I have an NSTableView, filled by an NSArrayController. A column has "Creates Sort Descriptor" selected in InterfaceBuilder. And right: when I click on this column, an NSSortDescriptor gets created with the selector "compare:". Works fine; only "compare:" is quite unusable; the documentation q

Re: Text blurred in application

2008-11-29 Thread Ricky Sharp
On Nov 29, 2008, at 10:57 AM, Richard Somers wrote: I just discovered part of my problem. The pdf image was being scaled down slightly even though there was plenty of room for it inside the NSButton. The default scaling is "Proportionally Down". Change this to "None" and the image now is a

Re: CALayer containing a view

2008-11-29 Thread Kenneth Ballenegger
Wow, your email just made me realize that all I needed was this: [myLayer addSublayer:[gameScreenView layer]]; I never thought it would be this easy! Thanks for the enlightenment. :) I thought that this would only work to add CA content of a CA-backed view, and not subviews, but it se

Re: Keystrokes for non-ascii letters

2008-11-29 Thread Eric Schlegel
On Nov 29, 2008, at 8:26 AM, Dave DeLong wrote: Hey everyone, I'm working on a client/server application. The client sends tiny "Event" objects to the server that can contain an NSString of a letter or short sequence of letters (up to about 4). What I'm trying to do is figure out how t

Re: Text blurred in application

2008-11-29 Thread Richard Somers
I just discovered part of my problem. The pdf image was being scaled down slightly even though there was plenty of room for it inside the NSButton. The default scaling is "Proportionally Down". Change this to "None" and the image now is always sharp, at least for a User Interface Resolution

Keystrokes for non-ascii letters

2008-11-29 Thread Dave DeLong
Hey everyone, I'm working on a client/server application. The client sends tiny "Event" objects to the server that can contain an NSString of a letter or short sequence of letters (up to about 4). What I'm trying to do is figure out how the server can perform the keypress(es) to get that

Re: Text blurred in application

2008-11-29 Thread Richard Somers
The pdf canvas size is 25 points x 25 points and displayed full size in the button. It contains only vector graphics. I thought pdf would be the best thing for the simple graphics but it is hard to get it pixel perfect. Many of the paths have pixel exact boundaries within the graphics appli

displaying huge log files

2008-11-29 Thread Mudi Dandan
Hi Guys, I'm developing an application that generates logs (FTP transcript) that could grow really big. I want to display this log in simple textview so that the user can examine it. My question : Is it possible to to display a memory mapped file in an NSTextView and in such way that if t

Re: Text blurred in application

2008-11-29 Thread Benjamin Dobson
Make sure the PDF is not larger than the button and that it does not contain bitmaps. On 28 Nov 2008, at 23:44:41, Richard Somers wrote: On Nov 28, 2008, at 3:06AM, Adil Saleem wrote: But the static text is not readable when application is launched. It is too blurred. I have been using

Re: analysing image to find blobs

2008-11-29 Thread Roland King
No I know there's nothing like the code which will find things on an image, but cocoa does have the primitive bits I think I need like converting to a bitmap I can search. The best for me actually would probably be converting to a bitmap with alpha channel only, then I can search it byte by