Re: Tracking Multiple Touches For Appropriate Label

2009-12-10 Thread Chunk 1978
i'm receiving memory leaks when using this code on device with instruments. the code seems fine to me so i don't understand the leaks. leaking objects are GSEvent and GeneralBlock-16. you can download my small sample project i've created using the above code at this address: http://tinyurl.com/

TexfieldCell becomes see through for Borderless Window

2009-12-10 Thread Symadept
Hi, >From the example of RoundTransparentWindow, I made my Application window to show only the Parts drawn and the transparent parts are cleared. This works fine. But once I create a custom TableView and click its TextfieldCell to edit, the Cell becomes see through. Can anybody help me what would

Quastion about types in a NSPasteBoard

2009-12-10 Thread Gustavo Pizano
Hello. I have implemented a drag and drop, and I just wanted to check what I had in the NSPasteBoard on drop... I checked the types from the NSPasteBoard, and the type I declared when dragging is in the second place of the returning array. in first place it's. something like: dyn.ah62d4rv4g

Re: Quastion about types in a NSPasteBoard

2009-12-10 Thread Graham Cox
On 10/12/2009, at 9:26 PM, Gustavo Pizano wrote: > I have implemented a drag and drop, and I just wanted to check what I had in > the NSPasteBoard on drop... > > I checked the types from the NSPasteBoard, and the type I declared when > dragging is in the second place of the returning array. i

Detecting lack of user input system wide.

2009-12-10 Thread Kenny Carruthers
Hello, What is the correct way to detect that there has been no keyboard or mouse input by the user over a given period of time? Ideally, I'd like my application to stop a timer if there is no activity at all from the user in any application. Think of a time tracking app that stops tracking time a

Re: Quastion about types in a NSPasteBoard

2009-12-10 Thread Gustavo Pizano
Hello Graham. In fact the AbstractFactory has nothing to do with the NSPasteBoard. Im reading the NSPasteBoard in the NSViewController after it's view has recevied the performDropOperation: so this is what Im doing: NSPasteBoard pb = [sender draggingPasteboard] NSArray * types =

Re: Additional action when a view's value changes (Cocoa Bindings)

2009-12-10 Thread Christian Ziegler
I think mmalc got me right. Sorry again for my initial mail which was a little confusing. When I wrote the mail I confused Cocoa Bindings with target/action, because what I've been doing is, I just connected the selector of one view TextField) to the takeIntegerFrom IBAction of another one (Ste

Re: Quastion about types in a NSPasteBoard

2009-12-10 Thread Graham Cox
On 10/12/2009, at 10:26 PM, Gustavo Pizano wrote: > In fact the AbstractFactory has nothing to do with the NSPasteBoard. Im > reading the NSPasteBoard in the NSViewController after it's view has recevied > the performDropOperation: Yes, but my point was that AbstractFactory is your code, and y

Re: Quastion about types in a NSPasteBoard

2009-12-10 Thread Gustavo Pizano
Graham hi. On Dec 10, 2009, at 1:08 PM, Graham Cox wrote: > NSString* myType = [pb availableTypeFromArray:[NSArray > arrayWithObjects:@"first_choice", @"second_choice", nil]]; > Class theClass = [classMapDictionary objectForKey:myType]; > > if( theClass ) > { >id object = [[theClass alloc]

Re: NSCell's mouse tracking method never called

2009-12-10 Thread Martin Cote
On Wed, Dec 9, 2009 at 11:59 PM, Graham Cox wrote: > > Are you expecting this method to be invoked by your tracking handler? > Normally it's called by a mouseDown in the table. No, I was hoping it would get called by a mouseDown. > > You need to show some code. Before diving in the code, I wou

Re: Additional action when a view's value changes (Cocoa Bindings)

2009-12-10 Thread Graham Cox
On 10/12/2009, at 10:45 PM, Christian Ziegler wrote: > In the target controller I don't have IBOutlets for those steppers and > textfields. Those are in another (mediating) controller. Question is whether > there is another way to do this instead of defining outlets also in the > target contro

Re: Additional action when a view's value changes (Cocoa Bindings)

2009-12-10 Thread Graham Cox
On 10/12/2009, at 11:26 PM, Graham Cox wrote: > In general I've found it's a false economy to avoid outlets for all controls > - you'll want them sooner or later so may as well give everything an outlet > just as a matter of habit. I should qualify that - if you end up using bindings you don't

Re: Question about touchesBegan

2009-12-10 Thread Eric E. Dolecki
I'll elaborate a little more. I have a main view with some source buttons (UIButton) at the top. When I click one, I bring up a radio style tuner bar in a subview (animates up from the bottom). I am using touches to move the "pointer" in that subView. Works great, however because the subView is det

Re: Question about touchesBegan

2009-12-10 Thread Eric E. Dolecki
What I am trying to do now is when I create the subView with the tuner bar, I am setting it's view's bounds to something much smaller than the whole screen and then animating it up. I think this approach might work. On Thu, Dec 10, 2009 at 8:29 AM, Eric E. Dolecki wrote: > I'll elaborate a littl

Re: Question about touchesBegan

2009-12-10 Thread Alexander Spohr
Am 10.12.2009 um 14:46 schrieb Eric E. Dolecki: > What I am trying to do now is when I create the subView with the tuner bar, I > am setting it's view's bounds to something much smaller than the whole screen > and then animating it up. I think this approach might work. I thought you did that a

Re: Question about touchesBegan

2009-12-10 Thread Eric E. Dolecki
Yup - setting the bounds is working. So I can have touches in my main view and also in the sub view. Coming from Flash AS3, this stuff seems so complicated in comparison. On Thu, Dec 10, 2009 at 8:57 AM, Alexander Spohr wrote: > > Am 10.12.2009 um 14:46 schrieb Eric E. Dolecki: > > > What I am t

Bug with IB?

2009-12-10 Thread Eric E. Dolecki
If I create a UILabel in IB in a view & I place 1/2 of the label out of the view at the top, I can't seem to drag the view window around by the title bar where the label is. I know that having the control 1/2 out of the view isn't normal, but shouldn't the view window move around regardless of wher

Using CATransition for large views

2009-12-10 Thread PCWiz
I'm using CATransition to swap views with [[view animator] replaceSubview:oldView with:newView] The issue here is that when swapping between views with a large amount of content (e.g. a collection view with hundreds of items) there is a very noticeable 1-2 second delay before the animation star

Re: Bug with IB?

2009-12-10 Thread Henry McGilton (Boulevardier)
On Dec 10, 2009, at 6:24 AM, Eric E. Dolecki wrote: > If I create a UILabel in IB in a view & I place 1/2 of the label out of the > view at the top, I can't seem to drag the view window around by the title > bar where the label is. I know that having the control 1/2 out of the view > isn't normal

Re: Bug with IB?

2009-12-10 Thread Eric E. Dolecki
Hmm - my View window is sized down to something like 200px tall. Maybe I should QT capture it. On Thu, Dec 10, 2009 at 10:57 AM, Henry McGilton (Boulevardier) < appledevelo...@trilithon.com> wrote: > > On Dec 10, 2009, at 6:24 AM, Eric E. Dolecki wrote: > > > If I create a UILabel in IB in a view

Re: Finding process path from Cocoa?

2009-12-10 Thread Sean McBride
On 12/9/09 2:49 PM, Laurent Daudelin said: >I guess that with Carbon not being ported to 64bits, >NSRunningApplication was needed. It just makes life a little harder if >you have to support both 10.5 (which doesn't have NSRunningApplication >but has Process Manager) and 10.6 (which has NSRunningAp

Re: Unable to write in InfoPlist.strings file from cpp

2009-12-10 Thread Manfred Schwind
> Be careful, though: Some MacOS versions have a bug where .strings files had > to be UTF16 to actually work. I don't think Apple has fixed that yet. Do you have more specific information about that? I consequently always used UTF-8 for all my .strings files in every project I ever worked on (fo

Re: Unable to write in InfoPlist.strings file from cpp

2009-12-10 Thread Henry McGilton (Boulevardier)
On Dec 10, 2009, at 8:42 AM, Manfred Schwind wrote: >> Be careful, though: Some MacOS versions have a bug where .strings files had >> to be UTF16 to actually work. I don't think Apple has fixed that yet. > > Do you have more specific information about that? > I consequently always used UTF-8 fo

Re: Unable to write in InfoPlist.strings file from cpp

2009-12-10 Thread Manfred Schwind
>>> Be careful, though: Some MacOS versions have a bug where .strings files had >>> to be UTF16 to actually work. I don't think Apple has fixed that yet. >> >> Do you have more specific information about that? >> I consequently always used UTF-8 for all my .strings files in every project >> I ev

Problem with missing symbol

2009-12-10 Thread Emmanuel Pinault
Hi, I am trying for some specific reason to access a private attribute and make it public for my need with the following code in the .h #import @interface NSStatusItem (hack) - (NSRect)hackFrame; @end in the .m import "NSStatusItem+hack.h" @implementation NSStatusItem(hack) - (NSRect)ha

Re: Problem with missing symbol

2009-12-10 Thread Kyle Sluder
On Dec 10, 2009, at 9:46 AM, Emmanuel Pinault wrote: This use to work in 10.5 .. I am using 10.6 and this is not linking due to missing symbol. What I do not get, is that the _fWindow is still an attribute in the NSSStatusItem... It's not an attribute, it's an instance variable. Private

Re: Unable to write in InfoPlist.strings file from cpp

2009-12-10 Thread Douglas Davidson
On Dec 10, 2009, at 8:42 AM, Manfred Schwind wrote: Be careful, though: Some MacOS versions have a bug where .strings files had to be UTF16 to actually work. I don't think Apple has fixed that yet. Do you have more specific information about that? I consequently always used UTF-8 for all m

Re: Problem with missing symbol

2009-12-10 Thread Emmanuel Pinault
On Dec 10, 2009, at 9:53 AM, Kyle Sluder wrote: > On Dec 10, 2009, at 9:46 AM, Emmanuel Pinault wrote: > >> This use to work in 10.5 .. I am using 10.6 and this is not linking due to >> missing symbol. What I do not get, is that the _fWindow is still an >> attribute in the NSSStatusItem... >

Re: Problem with missing symbol

2009-12-10 Thread lbland
On Dec 10, 2009, at 1:15 PM, Emmanuel Pinault wrote: > How would you suggest I get the Frame information from the window then? hi- Don't know what you're up to, but this NSWindow method: +frameRectForContentRect:styleMask: has been around for a long time. also, this one: - frameRectForConte

Re: Problem with missing symbol

2009-12-10 Thread Emmanuel Pinault
On Dec 10, 2009, at 10:24 AM, lbland wrote: > > On Dec 10, 2009, at 1:15 PM, Emmanuel Pinault wrote: > >> How would you suggest I get the Frame information from the window then? > > hi- > > Don't know what you're up to, but this NSWindow method: > > +frameRectForContentRect:styleMask: > > h

Re: Problem with missing symbol

2009-12-10 Thread Emmanuel Pinault
> I am trying to create a small item in the status bar, which when I click, I > can show at a glance a small calendar... kind of like how Gnome does it. > Really convenient and better than loading the full dashboard at times.. > Anyway I using rubycocoa and this is the code I am trying to have

Re: Detecting lack of user input system wide.

2009-12-10 Thread David M. Cotter
dunno about cocoa, but in Carbon land you can do InstallEventLoopIdleTimer(). I expect there is an equivalent in cocoa On Dec 10, 2009, at 1:10 AM, Kenny Carruthers wrote: > Hello, > > What is the correct way to detect that there has been no keyboard or mouse > input by the user over a given p

Suspend the execution of background thread on modal window launch

2009-12-10 Thread Arun
Hi All, I have an application in which i perform several activities in background. In the UI, if the user presses cancel, i will open a modal window which prompts for confirmation of cancel/resume. At this point of time i need to suspend all my background thread. Is it possible? Thanks Arun KA __

Re: Problem with missing symbol

2009-12-10 Thread Lee Ann Rucker
On Dec 10, 2009, at 10:39 AM, Emmanuel Pinault wrote: I am trying to create a small item in the status bar, which when I click, I can show at a glance a small calendar... kind of like how Gnome does it. Really convenient and better than loading the full dashboard at times.. Anyway I usin

Re: [iPhone] UINavigationController and UINavigationBar

2009-12-10 Thread Thomas Engelmeier
Am 09.12.2009 um 02:02 schrieb Duccio: > Yes, I know, but no backgroundImage property :-) And Apple documentations > says, for example: "It is permissible to modify the barStyle or translucent > properties of the navigation bar but you must never change its frame,bounds, > or alpha values dire

xpath variable in NSXMLNode

2009-12-10 Thread Rainer Standke
Hello, I'd like to use a variable in an XPath query like this, where the variable would be $xPathVar1: NSArray *nodes = [document nodesForXPath:@".//d...@class = 'filmo']/ol/ li/a/text() = $xPathVar1" error:&err]; Is this possible? How would I declare and set the variable? Thanks, Rainer

Re: Leopard for development / testing.

2009-12-10 Thread Evadne Wu
Hi Dan, If you already have a copy of OS X, you have everything necessary. Pop the DVD in and look for Developer Utilities. Apple bundles them for free with every copy of OS X. If you’re talking about private betas you’ll need to become an ADC member. ev On Dec 10, 2009, at 12:37 P

.h file won't load

2009-12-10 Thread Charlie Dickman
I'm developing an app that has the Appkit.framework in the Frameworks project folder. I am trying to use the NSString Application Kit Additions which document that they are defined in the NSStringDrawing.h file in Appkit.framework yet when I #import NSStringDrawing.h or Appkit/NSStringDrawing.

Re: .h file won't load

2009-12-10 Thread Luke the Hiesterman
The NSStringDrawing.h header is include in AppKit.h, so you should just be able to include AppKit like this: #include Were you forgetting the < and > ? Luke On Dec 10, 2009, at 11:51 AM, Charlie Dickman wrote: > I'm developing an app that has the Appkit.framework in the Frameworks project >

Re: Problem with missing symbol

2009-12-10 Thread Emmanuel Pinault
> > Have you tried using [NSStatusItem setView:]? > setView is for custom view.. Because if I dont do a setView, the view Method return nil so far. And looking at the doc it mentions that it is for custom view. I am looking at something similar called MAAAttachedWindow class made by some

dynamically create/remove IB elements and instance vars?

2009-12-10 Thread Patrick J. Collins
Hi, I just wrote a basic little cocoa app to test my knowledge after going through Apple's Currency Converter tutorial... I made two text fields, and when you click a button, it combines the two words together and displays them in a label. I would like to expand on this and make it a little more

Re: Problem with missing symbol

2009-12-10 Thread Lee Ann Rucker
On Dec 10, 2009, at 1:24 PM, Emmanuel Pinault wrote: Have you tried using [NSStatusItem setView:]? setView is for custom view.. Because if I dont do a setView, the view Method return nil so far. And looking at the doc it mentions that it is for custom view. I am looking at someth

Re: dynamically create/remove IB elements and instance vars?

2009-12-10 Thread Quincey Morris
On Dec 10, 2009, at 14:21, Patrick J. Collins wrote: > I would like to expand on this and make it a little more interesting and > challenging, but I don't know how to do what I am thinking-- which is: > > Create a button which will insert a new label/text field. This action also > needs to dynam

String attributes in the iPhone SDK

2009-12-10 Thread Charlie Dickman
I use the following code to determine the height and width of a string in the Snow Leopard version of an app NSMutableDictionary *textAttributes = [[[NSMutableDictionary alloc] init] autorelease]; [textAttributes setObject: [NSFont fontWithName: @"Garamond Bold" size: 24]

Re: String attributes in the iPhone SDK

2009-12-10 Thread Greg Parker
On Dec 10, 2009, at 3:44 PM, Charlie Dickman wrote: > I use the following code to determine the height and width of a string in the > Snow Leopard version of an app > > NSMutableDictionary *textAttributes = [[[NSMutableDictionary alloc] > init] autorelease]; > [textAttributes setObje

Sending action from Switch type NSButton?

2009-12-10 Thread Laurent Daudelin
Not sure I am missing something but isn't it possible to send an action from a switch type NSButton each time it's toggled? -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software

Re: Sending action from Switch type NSButton?

2009-12-10 Thread Brent Smith
http://developer.apple.com/mac/library/DOCUMENTATION/Cocoa/Reference/ApplicationKit/Classes/NSControl_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/controlTextDidChange: I believe its the controlTextDidChange delegate method. On Dec 10, 2009, at 4:09 PM, Laurent Daudelin wrote: >

Re: NSCell's mouse tracking method never called

2009-12-10 Thread Martin Cote
On Wed, Dec 9, 2009 at 11:50 PM, Martin Cote wrote: > Hello, > > I'm trying to track the mouse in my custom NSCell subclass, which is > used to display the content of a NSTableView.  For that matter, I > override the following method: > > - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellF

Binding an Array of Dictionaries

2009-12-10 Thread Gerriet M. Denkmann
I have a window with an NSTableView which is bound to an NSArrayController which has as content an NSMutableArray called "theArrayOfDictionaries". Works fine. "theArrayOfDictionaries" contains NSMutableDictionaries. So I added another NSTableView to my window, bound to an NSDictionaryController,

[ myWorkSpace openURL: myurl ] is leaking. Why??

2009-12-10 Thread Parimal Das
Hi all, This is a very simple code. And it is always leaking. -(void)awakeFromNib { NSAutoreleasePool* pool = [ [NSAutoreleasePool alloc ] init ]; NSWorkspace* ws = [NSWorkspace sharedWorkspace]; NSString* tempUrl = @"http://www.google.com";; NSURL* myurl = [NSURL URLWithStr