Here is some proof that it is still in memory, I waited about 5 minutes and it
didn't dealloc automatically like you said it will...
<>
When I wrap a NSAutoreleasePool around the notification method, it releases as
expected. I cannot have my application doing this as it is a background
applicati
Maybe I'm missing your point but the compiler warning is trivial to address.
- [NSWindowController document] returns an id. If you want to call methods in
your document class,
CarlosDocument * doc = (CarlosDocument*) [windowController document];
[doc carlosMethod];
However if your views are cal
On Fri, Feb 18, 2011 at 7:36 PM, Mr. Gecko wrote:
> Yes, that would be it, when I open the UI it releases the pool. Is there a
> way to prevent this from happening just incase I have other things that are
> autoreleasing to it?
Nest your own autorelease pool. You can use a runloop observer to m
On 16 feb 2011, at 11.00, Sidney San Martín wrote:
> Below is the main class of a test application with a main class called
> downloaderAppDelegate. The issue's reproducible for me by dropping it into a
> new Xcode Cocoa application project.
I've not been able to reproduce that issue (with th
Yes, that would be it, when I open the UI it releases the pool. Is there a way
to prevent this from happening just incase I have other things that are
autoreleasing to it?
On Feb 18, 2011, at 8:20 PM, Ken Thomases wrote:
> Is your application getting any real GUI-style events, or is it only
>
That may be the problem as this is a UIAgent and not a real GUI. The only GUI
that appears is when you first open it or you open it again to change settings.
I have many other types of notifications I'm listening for such as carbon
events and accessibility events, but I don't know if they are ad
On Feb 18, 2011, at 3:00 PM, Mr. Gecko wrote:
> I noticed that memory is not autoreleased when I receive a distributed
> notification, the only way to fix this is to wrap it in a autorelease pool,
> but this shouldn't be right? I would think that when you register for a
> notification it'll be
On Feb 17, 2011, at 8:48 AM, Marco Antognini wrote:
> But now I'm stuck with a problem : is there any way to create/destroy
> window/view, make them live (e.g. rendering process) and get event
> notification; all that only in a worker thread (like we can do on Linux or
> Windows) ?
Short answe
More information found. This may be a bug. I found this really cool method for
NSAutoreleasePools called showPools. It is really useful for something like
this. I found that it has a autorelease pool, but it never drains. It just
gains items until it gets to 1016 items and then I don't know what
Sorry, the forward declarations go in your .h files. You still have to import
your MyDocument.h in your implementation files (ie. your CustomView.m files).
What warnings are you getting?
As far as your nil document problem, I don't know. I suspect something is not
setup correctly.
In your code
I would use the delegate pattern. Look at some Cocoa classes that have delegates to get the idea of
the general pattern. Examples: NSTableView, NSControl, NSURLConnection. My app, AppKiDo, provides
an easy way to list classes that have delegates, and to skim the delegate methods. You could also
On Feb 18, 2011, at 5:46 PM, mlist0...@gmail.com wrote:
On Feb 18, 2011, at 11:20 AM, Carlos Eduardo Mello wrote:
I need to declare an instance of MyDocument inside my view's
classes. The compiler won't let me do this unless I import
MyDocument to the class definitions.
you can use:
@cla
I know that you think I'm some noob at this. This may be true, but I am aware
that Instruments shows that the memory I allocated during that distributed
notification is still there. I know this because it's a 9MB allocation and it's
in a NSData with no copy bytes and free when released. The one
On 18 Feb 2011, at 3:07 PM, David Rowland wrote:
> I have my appdelegate set up as the delegate for the accelerometer,
>
> @interface GLSpriteAppDelegate : NSObject UIAccelerometerDelegate> {
...
> When I compile I get alerts like this,
>
> GLSpriteAppDelegate *appDelegate = [[UIApplication s
On 18 Feb 2011, at 3:00 PM, Mr. Gecko wrote:
> I noticed that memory is not autoreleased when I receive a distributed
> notification, the only way to fix this is to wrap it in a autorelease pool,
> but this shouldn't be right? I would think that when you register for a
> notification it'll be o
If I just query the window controler for the document on demand like
this:
[ [ [ [ self window ] windowController ] document refreshParameters ];
the code works, but I still can't get rid of those "message-not-
found" warnings:
One correction: calls without arguments seem to be ok like this
NSNotification is your friend.
When your custom views do something notable, they should post or enqueue an
NSNotification containing the relevant info. Presumably you will have
subscribed your NSDocument to those notifications in your override of
-windowControllerDidLoadNib.
This way the vie
I have my appdelegate set up as the delegate for the accelerometer,
@interface GLSpriteAppDelegate : NSObject {
I declare the method
- (void)accelerometer:(UIAccelerometer *)accelerometer
didAccelerate:(UIAcceleration *)acceleration;
I implement it in the .m file,
- (void)accelerometer:(UIAc
I noticed that memory is not autoreleased when I receive a distributed
notification, the only way to fix this is to wrap it in a autorelease pool, but
this shouldn't be right? I would think that when you register for a
notification it'll be on the run loop which has a autorelease pool and
there
On Feb 18, 2011, at 11:20 AM, Carlos Eduardo Mello wrote:
> I need to declare an instance of MyDocument inside my view's classes. The
> compiler won't let me do this unless I import MyDocument to the class
> definitions.
you can use:
@class MyDocument;
in your .h file to forward declare MyDoc
Hi Everyone,
I am comming back to cocoa programming and to this list after a few
years without programming anything, so please forgive me in advance
for any stupid questions. I've read the docs, studied Hillegass's book
again and searched the archives, but still couldn't find a definitive
On Feb 18, 2011, at 9:57 AM, Markus Spoettl wrote:
> On Feb 18, 2011, at 12:00 PM, Corbin Dunn wrote:
>> You can't customize it. Please log bugs requesting that ability.
>>
>> NSTableView marks the rows to highlight in:
>>
>> - (NSMenu *)menuForEvent:(NSEvent *)theEvent
>>
>> If you override t
On Fri, Feb 18, 2011 at 10:24 AM, Markus Spoettl
wrote:
> I have multiple trees lined up side-by-side, each tree shows the same
> hierarchy in a different version (so the items in the tree are different, not
> the hierarchy itself) - think of a side-by-side folder comparison with any
> number o
On Feb 18, 2011, at 1:12 PM, Kyle Sluder wrote:
> wrote:
>> In my case the behavior is absolutely unwanted and confusing to the user. It
>> wouldn't be if I had control over the context-highlight and could manually
>> force rows to go into this state but as it is, it's undesirable for my
>> par
On Fri, Feb 18, 2011 at 9:57 AM, Markus Spoettl
wrote:
> In my case the behavior is absolutely unwanted and confusing to the user. It
> wouldn't be if I had control over the context-highlight and could manually
> force rows to go into this state but as it is, it's undesirable for my
> particula
On Feb 18, 2011, at 12:00 PM, Corbin Dunn wrote:
> You can't customize it. Please log bugs requesting that ability.
>
> NSTableView marks the rows to highlight in:
>
> - (NSMenu *)menuForEvent:(NSEvent *)theEvent
>
> If you override that, and don't call super, the it will suppress the
> highlig
On Feb 18, 2011, at 7:43 AM, Markus Spoettl wrote:
> Hello,
>
> is there a way to avoid (or customize) the special row highlighting
> NSTableView and NSOutlineView does when the context menu is shown?
You can't customize it. Please log bugs requesting that ability.
NSTableView marks the row
On Fri, Feb 18, 2011 at 7:54 AM, Howard Moon wrote:
> You're quite correct. It works as it should now. The problem was that there
> was a single letter capitalized that shouldn't have been in one of my names,
> and only a warning was issued when compiling (which I promptly forgot about
> and
>
>> I'm teaching myself Objective-C and Cocoa, by working on a simple (so I
>> thought) modification to the default AudioUnit effect project. But in this
>> project, I create my own views programmatically instead of using the NIB.
>> (I know - why??? Just go with me, ok? :-))
>>
>>
I guess the problem was not what I thought it was at all. Other problems I had
led me to find a naming error (one letter capitalized that shouldn't have
been), and that naming error made my class hierarchy break. (Doing a "Quick
Model" showed me the broken link.)
I'm not too fond of the lack
Hello,
is there a way to avoid (or customize) the special row highlighting
NSTableView and NSOutlineView does when the context menu is shown?
In my case that is confusing and unwanted since I'm ensuring the (right-)
clicked row is selected when the menu is displayed and I'd just like to show
>>> Image loading would be the first thing I would move into a background
>>> thread. Can you use GCD? It’s a perfect fit for such producer/consumer
>>> tasks.
>>
>> Please explain "GCD".
GCD would be ideal, and less complicated than the creating a thread most
likely.It's even a quick read. B
On Fri, Feb 18, 2011 at 9:14 AM, Michael Babin wrote:
> On Feb 16, 2011, at 1:00 PM, Sidney San Martín wrote:
>
> > Greetings!
> > I ran into an issue recently where file downloads seemed to take a
> ridiculous amount of time to finish, or never finished at all. I could
> reproduce it, even in a
On Feb 16, 2011, at 1:00 PM, Sidney San Martín wrote:
> Greetings!
> I ran into an issue recently where file downloads seemed to take a ridiculous
> amount of time to finish, or never finished at all. I could reproduce it,
> even in a stripped-down test application.
>
> The NSURLDownload appear
> NSLog(@"I am adding %@", [element objectForKey:@"itemIdentifier"]);
Is not adding anything. You're looping through your dictionary, creating items,
assigning them to a local variable, and then replacing them with a new item
next time through the loop. Then you exit the loop and return the
On Feb 16, 2011, at 9:36 AM, Howard Moon wrote:
> Hi all,
>
>I'm teaching myself Objective-C and Cocoa, by working on a simple (so I
> thought) modification to the default AudioUnit effect project. But in this
> project, I create my own views programmatically instead of using the NIB. (I
36 matches
Mail list logo