Re: retain and don`t retain in accessor methods

2009-11-14 Thread Ariel Feinerman
2009/11/15 Kyle Sluder > On Sat, Nov 14, 2009 at 2:35 PM, Ariel Feinerman > wrote: > > I need two versions of -initWith ... and -set ... methods of custom timer > > class (for example, to prevent the circle references); > > Do not use accessors in your initializers or -dealloc. > Hm, it means t

Re: CPU sampling and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]

2009-11-14 Thread Joar Wingfors
On 14 nov 2009, at 03.20, Michael Ash wrote: > On Fri, Nov 13, 2009 at 1:28 PM, Paulo Andrade wrote: >> Hello, >> >> I'm using the CPU sampler template. >> >> Here (http://1wzi.sl.pt) is a sample of a very simple run to prove my point. >> >> Here's how I collected it: >> - Start the app and l

Rotation UIWebView

2009-11-14 Thread Mike Manzano
In Safari, if you double-tap on a text column, it zooms in to that column. When you rotate the phone, that column is scaled to fill the screen making the text larger and thereby preserving the "view" I selected when I double-tapped. In my own web view, rotating the screen does not preserve my "v

Re: Where are the interface builder components?

2009-11-14 Thread Rob Keniger
On 15/11/2009, at 11:48 AM, Sandro Noël wrote: > But where are the ones from apple... that's what i'm wondering, > Why do we have to duplicate work that evidently has already been done. > I'm confused as why apple is not including it in it's development tools. > it makes no sense to me... Ther

Re: Where are the interface builder components?

2009-11-14 Thread Sandro Noël
Dave Wow, cool Link, thank you! very appreciated! But where are the ones from apple... that's what i'm wondering, Why do we have to duplicate work that evidently has already been done. I'm confused as why apple is not including it in it's development tools. it makes no sense to me... Sandro No

Re: Where are the interface builder components?

2009-11-14 Thread Dave DeLong
There are a bunch of freely available frameworks that have UI elements like that, such as BWToolkit, BGHudAppKit, AmberFramework, iLife Controls, HMBlkAppKit, and more. Here's a decent list: http://cocoaheads.byu.edu/resources/user-interface Cheers, Dave On Nov 14, 2009, at 6:35 PM, Sandro N

Where are the interface builder components?

2009-11-14 Thread Sandro Noël
Greetings. I'm kind of annoyed with the 1867 A.D. controls that are in interface builder. Every time i want to do something visually cool, I can see the lines of code piling up I'm wondering where all the good stuff is, (interface builder components) Evidently Apple has some cool components in t

Re: Building a tree

2009-11-14 Thread Graham Cox
On 12/11/2009, at 8:01 PM, Jonathan Guy wrote: > I'm having a hard time finding a good example of this on the web so I thought > I'd post here. I have an array of file system paths (NSStrings) and need to > convert this into a tree structure using parent child tree node objects. The > method h

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-14 Thread Clark Cox
On Sat, Nov 14, 2009 at 12:10 PM, Kyle Sluder wrote: > On Sat, Nov 14, 2009 at 9:53 AM, Clark Cox wrote: >> The one thing to be careful of is exceptions. In 32-bit Mac code, >> Obj-C and C++ exceptions are completely unrelated. If an Objective-C >> exception is thrown, C++ destructors will *not*

Re: retain and don`t retain in accessor methods

2009-11-14 Thread Kyle Sluder
On Sat, Nov 14, 2009 at 2:35 PM, Ariel Feinerman wrote: > I need two versions of -initWith ... and -set ... methods of custom timer > class (for example, to prevent the circle references); Do not use accessors in your initializers or -dealloc. --Kyle Sluder __

Fwd: retain and don`t retain in accessor methods

2009-11-14 Thread Ariel Feinerman
Hi, I need two versions of -initWith ... and -set ... methods of custom timer class (for example, to prevent the circle references); Is these correct implementation? - (id) initWithTarget: (id) theTarget { return [self initWithTarget: theTarget retain: YES]; // ? } - (id) initWithTarget: (id)

Re: vImage Help

2009-11-14 Thread Adam R. Maxwell
On Nov 14, 2009, at 1:01 PM, R T wrote: > I'm using... vImage_Error err = vImageContrastStretch_Planar8 (&src, &dest, > flags ); > > and getting a scrambled image from the code? Each pixel returned is at the > right height but offset left 3 pixels. Anyone wanting to you to look the > images

vImage Help

2009-11-14 Thread R T
I'm using... vImage_Error err = vImageContrastStretch_Planar8 (&src, &dest, flags ); and getting a scrambled image from the code? Each pixel returned is at the right height but offset left 3 pixels. Anyone wanting to you to look the images email me. - (NSImage*)vImageContrastStretch:(NSImage

CALayer Transitions

2009-11-14 Thread Gordon Apple
I assume this should be simple, but so far I haven't found the magic incantation, even after reading the docs, Dudley's book, and some archives. Problem: Layer called "contentLayer" has sublayers containing layer A, which is to be transitioned to layer B. (Note: Using GC here.) Controller c

Crash - NSPopUpCell performClickWithFrame:inView:

2009-11-14 Thread Seth Willits
I have a custom cell with a popup as part of the cell. To implement the popup, my custom cell maintains an NSPopUpCell and then at the appropriate times just calls [NSPopUpCell performClickWithFrame:inView:] to display the popup menu. Very simple. The only problem is, sometimes it crashes

Core Data Threading problem

2009-11-14 Thread Jon Hull
I have a multithreaded application using core data. Each thread has it's own ManagedObjectContext as recommended. There is a NSManagedObject which, in addition to a few other attributes, has an object which is stored as binary data and unpacked into a transient attribute when needed. Som

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-14 Thread Kyle Sluder
On Sat, Nov 14, 2009 at 12:10 PM, Kyle Sluder wrote: > And even in 64-bit code, most of Cocoa is *not* objection-safe.  So if > you throw an exception through Cocoa stack frames, they won't catch it > and clean up after themselves. Objection-safe? I of course meant exception-safe. --Kyle Sluder

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-14 Thread Kyle Sluder
On Sat, Nov 14, 2009 at 9:53 AM, Clark Cox wrote: > The one thing to be careful of is exceptions. In 32-bit Mac code, > Obj-C and C++ exceptions are completely unrelated. If an Objective-C > exception is thrown, C++ destructors will *not* be called as the stack > is unwound. Just something to be a

Re: controlTextDidEndEditing and buttons...

2009-11-14 Thread Kyle Sluder
On Sat, Nov 14, 2009 at 10:21 AM, Carlo Caione wrote: > To use it do I need to subclass an NSController (NSObjectController) ? No, you just need to make sure that whatever controller you're using conforms to NSEditorRegistration. NSControllers already do, but your text field might be bound to so

Re: Advice On Subclass vs. Delegate

2009-11-14 Thread Greg Guerin
s.ross wrote: How it's implemented now is that I have a separate controller for each field and the NSTextField delegates to that controller because for each character, I need to: - dup-check and possibly count - change a label to show the count and any dup alerts - watch for control:complet

Re: NSPopUpButton submenu's

2009-11-14 Thread SRD
> Send -[NSMenuItem submenu].  Each level of a hierarchical menu consists of > two parts.  First, the (sub)menu, then the menu items.  Repeat for each > level. > I'm still not understanding what I'm doing wrong. It's like there is no submenu attached to this menuItem. Each time I try to grab the

Re: controlTextDidEndEditing and buttons...

2009-11-14 Thread Carlo Caione
On Nov 12, 2009, at 10:24 PM, Kyle Sluder wrote: > On Nov 12, 2009, at 12:52 PM, Carlo Caione wrote: > >> How can I send a controlTextDidEndEditing: to a NSTextField when I click on >> another button (without using tab or enter)? > > You want to use NSEditorRegistration. To use it do I need

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-14 Thread Clark Cox
On Wed, Nov 11, 2009 at 9:17 AM, Dan Korn wrote: > So, is there any reason why I shouldn't do this? The one thing to be careful of is exceptions. In 32-bit Mac code, Obj-C and C++ exceptions are completely unrelated. If an Objective-C exception is thrown, C++ destructors will *not* be called as t

Re: [iPhone] OS 3.0 and @synthesize AND @dynamic for the same property

2009-11-14 Thread Joerg Simon
Thanks BJ and Roland!, I always had a crash when I took the @dynamic out, but now I figured out, that was another bug how just randomly appeared also when I changed this code :D. With your advice I tried to take it out again, and it works. That's actually why I posted the problem, because e

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-14 Thread Scott Ribe
> So, is there any reason why I shouldn't do this? No. You don't see much of this because much of the time wrapping Obj-C memory management in C++ stack classes is a sign that Obj-C hasn't yet been really grokked. (Example, wrapping retain & autorelease in the ctors & dtor of a base class that hol

Re: Multiple variable rules in for() statement

2009-11-14 Thread Clark Cox
On Thu, Nov 12, 2009 at 11:50 AM, David Ross wrote: > Jonathon, > > GCC does not like declaring variables in a for statement. It likes it just fine. You just need to build as C99 (or GNU99). -- Clark S. Cox III clarkc...@gmail.com ___ Cocoa-dev maili

Re: Using HTML form in cocoa app

2009-11-14 Thread Jerry Krinock
On 2009 Nov 12, at 09:16, Mark Reddick wrote: Hey all. I'm trying to figure out how to use an HTML form in a cocoa application... Looks like WebKit to me. http://developer.apple.com/mac/library/documentation/Cocoa/Reference/WebKit/ObjC_classic/Intro/IntroWK.html ___

Re: Advice On Subclass vs. Delegate

2009-11-14 Thread Jerry Krinock
On 2009 Nov 12, at 18:54, s.ross wrote: That suggests to me that subclassing NSTextField and allowing a single controller to register a callback would be the right way to go, but I'm struggling with how to specify *which* text field I don't understand the question. You subclass class defi

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-14 Thread Jean-Daniel Dupas
Le 14 nov. 2009 à 11:47, Roni Music a écrit : > >> I'm building a Framework with some exported extern "C" functions in >> Objective-C++, based on this example: >> http://developer.apple.com/internet/webservices/webservicescoreandcfnetwork.html >> >> Because this is a Framework, it doesn't have

Re: Drag-Move the Transparent windowed app over the screen

2009-11-14 Thread Symadept
Hey Andrew and Dave, You must be kidding. I never see that api anywhere ;) -Mustafa On Sat, Nov 14, 2009 at 3:16 PM, Andrew Farmer wrote: > On 12 Nov 2009, at 01:58, kirankumar wrote: > > goto attributes for your window ,enable the texture checkbox so that > > you can drag your window. > >

Re: CPU sampling and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]

2009-11-14 Thread Michael Ash
On Fri, Nov 13, 2009 at 1:28 PM, Paulo Andrade wrote: > Hello, > > I'm using the CPU sampler template. > > Here (http://1wzi.sl.pt) is a sample of a very simple run to prove my point. > > Here's how I collected it: > - Start the app and let it fully launch (it does a few request at boot) > - Attac

Re: Bindings vs MOC change notification

2009-11-14 Thread jonat...@mugginsoft.com
On 14 Nov 2009, at 02:11, David Catmull wrote: > In my Core Data app, I have objects with a date property, and I want to > maintain a list of all years that I have objects in. I'm having trouble > settling on an approach. > > Currently, I'm listening for > NSManagedObjectContextObjectsDidChang

Re: Stack-based C++ class to wrap NSAutoreleasePool

2009-11-14 Thread Roni Music
I'm building a Framework with some exported extern "C" functions in Objective-C++, based on this example: http://developer.apple.com/internet/webservices/webservicescoreandcfnetwork.html Because this is a Framework, it doesn't have its own main() function to set up an NSAutoreleasePool. So I n

Re: Tracking Safari usage through a background process or dameon

2009-11-14 Thread Dave Keck
> I need to develop a background process that gets started on user login to > Mac machine and then onwards it logs whatever operations the user is > performing on Safari. On OS X, background processes should be implemented as launchd daemons or agents. For your case, you probably want a launchd ag