Hello. My first post. I'm learning to program using Xcode 3.1.2 in
OS X Leopard. My current plan of attack is working through these
books:
Learn C on the Mac
C All in One Desktop Reference for Dummies
Learn Objective-C On the Mac
Cocoa Programming for Mac OS X 3rd edition by Aaron Hillegass
I d
I'm trying to set up undo grouping properly for my editing dialog
(i.e. when a user edits a ManagedObject, the whole editing process can
be undo...)
I've read a couple of articles/tutorials about using undo grouping for
Core Data but they all involved 2 things: An editing window/sheet and
a
On 2009 Mar 03, at 18:38, James Walker wrote:
Are these NSOutlineView methods not KVO-friendly, or am I doing
something wrong?
I would say the answer to your question is "both" :))
And I also believe that you have two options:
1. Assuming you're using the "classic" dataSource to drive you
On Mar 2, 2009, at 8:48 PM, Jushin wrote:
I found that in order to convert NSString format of date to NSDate, we
need timezone.
But, EXIF doesn't support timezone unless GPS tags exist.
Yes, this is an unfortunate fact. Depending on what you need the date
for, you may need to let the user c
> I read the excellent article 'Image Kit Programming Guide' at
> http://developer.apple.com/documentation/graphicsimaging/Conceptual/ImageKitProgrammingGuide/Introduction/chapter_1_section_1.html#//apple_ref/doc/uid/TP40004907-CH1-SW1
> and have my ImageBrowser working. I want to use it as the bas
On Mar 3, 2009, at 10:27 PM, James Cicenia wrote:
self.spvc = [[StatePickViewController
alloc]initWithNibName:@"StatePicker" bundle:nil];
What type of property is spvc? Does it simply assign, or does it
retain its value? If the latter, you may end up with the object above
getting a retai
On Tue, Mar 3, 2009 at 4:30 PM, Quincey Morris
wrote:
> On Mar 3, 2009, at 12:50, Nick Zitzmann wrote:
>> It doesn't seem to be documented, but I think it will return nil only if
>> (1) there was not enough contiguous RAM in the program's VM space to
>> allocate the object, or (2) there was, but t
Suppose you have the following code, running in either retain/release
land or GC land (ends up the behavior is similar because of the
autorelease pool or collector after return):
NSTask *task = [[NSTask alloc] init];
[task setLaunchPath: @"/bin/sleep"];
[task setArgume
I see that on that one screen it does chew up memory after I select
and process. My other three screens all behave very nicely.
So, maybe it is the way I have architected this screen:
When I load the view it seems ok.
Then I popup a little view for the user to select a state:
- (void)stateAc
well how much memory is your app using? One of the performance tools
should be able to help you not just get rid of leaks, but tell you how
big your memory footprint is. Just because you're not leaking objects
doesn't mean you're not pooling them up somewhere on an autorelease
pool. If you use
Ok -
How do I get more information? Or what kind of information do you need?
The memory issue is very opaque to me. It just happens.
Is there anyway to get more info?
Thanks
James Cicenia
On Mar 3, 2009, at 9:52 PM, David Duncan wrote:
On Mar 3, 2009, at 7:16 PM, James Cicenia wrote:
I have
On Mar 3, 2009, at 7:16 PM, James Cicenia wrote:
I have dutifully tracked down every leak, except for that noted
nsindex issue that is a red-herring. Otherwise I get none now with
my instruments. However, when I debug on the device one of my
screens is getting memory warning and after a few
You said "when I debug on the device one of my screens is getting memory
warning". What is a 'memory warning', what is the text of the warning
you are receiving, what does it say?
James Cicenia wrote:
hmmm,,,
how do I get that? I just put a nslog in there to see if in fact it
was memory.
hmmm,,,
how do I get that? I just put a nslog in there to see if in fact it
was memory.
james
On Mar 3, 2009, at 9:20 PM, Roland King wrote:
what is the memory warning?
James Cicenia wrote:
Hello -
I have dutifully tracked down every leak, except for that noted
nsindex issue that is
what is the memory warning?
James Cicenia wrote:
Hello -
I have dutifully tracked down every leak, except for that noted
nsindex issue that is a red-herring. Otherwise I get none now with my
instruments. However, when I debug on the device one of my screens is
getting memory warning and
Hello -
I have dutifully tracked down every leak, except for that noted
nsindex issue that is a red-herring. Otherwise I get none now with my
instruments. However, when I debug on the device one of my screens is
getting memory warning and after a few clicks freezes up my phone.
I have dut
I've been trying to implement label editing a la Finder, and found
this useful so far:
http://www.cocoadev.com/index.pl?FieldEditorIssues
Essentially, this approach uses the regular NSTextView instance served
up by -[NSWindow fieldEditor:forObject], and recomputes the size of
that is requir
I want to use bindings to set certain control attributes (enabled state,
tool tip) depending on the number of selected rows in an outline table.
I have a controller object that owns an NSOutlineView, and I gave it
an accessor
- (NSOutlineView*) outlineView;
Then I tried to bind to my control
On Mar 3, 2009, at 7:32 AM, K. Darcy Otto wrote:
Well, I've tried just about everything I can think of at this point,
but can't change the NSTableView cell successfully. To give some
more detail, the cell text is red when there is an error, but when
the user goes to edit the cell, I want
On Mar 3, 2009, at 2:42 PM, Eric Gorr wrote:
On Mar 3, 2009, at 1:04 PM, Eric Gorr wrote:
This behavior can be easily seen in the /Developer/Examples/
Accessibility/AXCanvas sample code as well.
Basically, if one starts typing and proceeds to go beyond what the
fieldEditor can display, t
On 3 Mar 2009, at 22:13:08, Stefan Groschupf wrote:
Hi All,
I'm very new to cocoa - though have other oo language experience.
My goal is write an application that synchronize some servers with a
local os x app.
When my app starts it basically should list all available server
connections if
Hi All,
I'm very new to cocoa - though have other oo language experience.
My goal is write an application that synchronize some servers with a
local os x app.
When my app starts it basically should list all available server
connections if this is empty open a form window where the user can add
Thanks for this. I think this would solve part of the problem (when
it was clicked on by the user), but not if the text edit field were
selected in some way other than a mouse click. But you gave me an
idea: what about subclassing NSTextView, so that when the field editor
is called, the c
On Mar 3, 2009, at 12:50, Nick Zitzmann wrote:
On Mar 3, 2009, at 1:33 PM, Quincey Morris wrote:
I don't know of any documented API contract that says [NSMenu
initWithTitle:] never fails, so checking the returned value seems
prudent.
In the case of Apple's documentation, it's the other wa
On 03 Mar 09, at 13:04, Jushin wrote:
I wonder if it is ok to integrate google map in a cocoa application
using webkit.
I know it's possible, but I was also told that google map only can be
used within a web browser.
Do you guys have any experience with this?
WebKit is an embeddable web browser
I wonder if it is ok to integrate google map in a cocoa application
using webkit.
I know it's possible, but I was also told that google map only can be
used within a web browser.
Do you guys have any experience with this?
___
Cocoa-dev mailing list (Coco
On Mar 3, 2009, at 1:33 PM, Quincey Morris wrote:
I don't know of any documented API contract that says [NSMenu
initWithTitle:] never fails, so checking the returned value seems
prudent.
In the case of Apple's documentation, it's the other way around.
Unless the documentation mentions th
On Mar 3, 2009, at 11:17 AM, Nick Rogers wrote:
Hi,
Here's the code:
the following method is running in a separate thread:
- (void)myFucntion
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
for (;;)// for loop starts here and is very quick, 100s of
iterations per seco
On Mar 3, 2009, at 11:47, Nick Zitzmann wrote:
// build NSMenu by HAND
NSMenu *menu = [[[NSMenu alloc] initWithTitle:@"abc"] autorelease];
if (menu != NULL)
You don't have to worry about this. There are a few classes that may
return nil (not NULL) if initialization fails, such as NSPipe.
N
Information and an example of the function Eric references can be found on
the following website, which I found very helpful when implementing global
hotkeys in my statusItem:
http://dbachrach.com/blog/2005/11/28/program-global-hotkeys-in-cocoa-easily/
Tobias Zimmerman
> Hi Vijay,
>
> Take a l
On Mar 3, 2009, at 9:15 AM, BJ Homer wrote:
The problem is that, as near as I can tell, UIView's implementation
of actionForLayer:forKey: returns an NSNull.
Am I missing something here, or is a UIView's layer's actions
dictionary only usable if you're subclassing UIView?
By default UIKit d
On Mar 3, 2009, at 12:30 PM, Mark D. Gerl wrote:
[statusItem setMenu:theMenu];
Why are you setting the menu twice? This step might be redundant.
[statusItem setEnabled:YES];
This line is redundant and can probably be taken out.
// build NSMenu by HAND
NSMenu *menu = [[[NSMenu alloc] ini
On Mar 3, 2009, at 1:04 PM, Eric Gorr wrote:
This behavior can be easily seen in the /Developer/Examples/
Accessibility/AXCanvas sample code as well.
Basically, if one starts typing and proceeds to go beyond what the
fieldEditor can display, the fieldEditor does not automatically
scroll t
On Mar 3, 2009, at 11:52 AM, Nick Zitzmann wrote:
Can you please show your code? I've done this before, and it worked
when I tried it.
SURE, see below. I should point out that I've also tried implementing
other delegate methods, with no luck. And, I've tried setting the
menu's delegate
On 3/3/09 11:30 AM, Nick Zitzmann said:
>> NSLog([e description]);
>
>Don't ever do this. NSLog() takes a varargs string, so if there is a %
>in the description, then the app will crash. Instead, do this:
>NSLog(@"%@", e);
The compiler can catch this mistake if you add "-Wformat=2". It will
On Mar 3, 2009, at 4:39 AM, 陈清华 wrote:
I am transferring my application to Snow.
And the first rule of Fight Club is...
Code to invoke:
- (void) applicationDidFinishLaunching:(NSNotification *)aNotification
{
NSError *error = [[NSError alloc] init];
But I don't think I'm violating any N
On Tue, Mar 3, 2009 at 6:39 AM, 陈清华 wrote:
> I am transferring my application to Snow.
You can't discuss Snow Leopard because you've agreed to the NDA.
Anybody else who might be able to help you is similarly bound by this
agreement, so nobody can help you.
--
I.S.
On Tue, Mar 3, 2009 at 3:53 AM, haresh vavdiya wrote:
> And then in Interface Builder, we have to control+drag from Add
> button to NSArrayController's add: method,
Sounds fine.
> But in my example, when drag from button to NSMutableArray, then it
> doesn't show add: method to me
I have a UIWebView displaying the contents of a local html file. When the
user presses a button, I'd like to transition, with a fade, to another
UIWebView (also displaying local content; no need to wait for the network.)
The UIView transitions will not do a fade, but a CATransition on a CALayer
w
Alternatively, you can create an NSMenu and use the class method
+ (void)popUpContextMenu:(NSMenu *)menu withEvent:(NSEvent *)event
forView:(NSView *)view
to pop it up.
Preston Jackson
http://sidelightblog.blogspot.com
On Mar 2, 2009, at 11:06 AM, Benjamin Dobson wrote:
On 2 Mar 2009, at
Hi
I am transferring my application to Snow. It is a document application based
on sdk 10.4.
I found it will print this message when invoke [[NSDocumentController
sharedDocumentController] openUntitledDocumentAndDisplay:YES error:nil];
"Unable to parse the format string "(displayFlags == null) || (
Hi,
I am learning Cocoa Development from Aaron Hillegass's book. In he
has given Cor Data document based application example, i am trying to do
this example. I have added two button, one for adding new row and second for
delete the rows.
And then in Interface Builder, we have to c
This behavior can be easily seen in the /Developer/Examples/
Accessibility/AXCanvas sample code as well.
Basically, if one starts typing and proceeds to go beyond what the
fieldEditor can display, the fieldEditor does not automatically scroll
to keep the indicator visible.
Is there an easy
On Mar 3, 2009, at 9:17 AM, Nick Rogers wrote:
Hi,
Here's the code:
the following method is running in a separate thread:
- (void)myFucntion
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
for (;;)// for loop starts here and is very quick, 100s of
iterations per seco
On Mar 3, 2009, at 7:24 AM, cocoa-dev-requ...@lists.apple.com wrote:
the following method is running in a separate thread:
- (void)myFucntion
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
for (;;)// for loop starts here and is very quick, 100s of iterations
per
Make the main thread method something like this:
- (void)myThreadStart
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
[NSTimer scheduledTimerWithTimeInterval:1.0 target:self
selector:@selector(myFucntion) userInfo:nil repeats:YES];
[[NSRunLoop currentRunLoop] run]; /
Found the problem, it turns out I wasn't setting one of my objects to
nil, so after it was run through once, it was using old data instead
of replacing it with new data. Wasn't the tokenfield at all ;)
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.c
On Mar 3, 2009, at 4:50 AM, Vijay Kanse wrote:
Hello,
My application remains in system status bar. and i have three menu
items
with my application icon.
I want to add key board listener for my application. so, if i press
ctrl +
shift + f12 then it should give me some event. the menu shoul
On 3 Mar 2009, at 18:17, Nick Rogers wrote:
Hi,
Here's the code:
the following method is running in a separate thread:
- (void)myFucntion
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
for (;;)// for loop starts here and is very quick, 100s of
iterations per second
Hello,
I have a subclass of NSButtonCell. It overrides -drawWithFrame:inView:
and -highlight:withFrame:inView: to produce a customised look.
However, highlight:withFrame:inView: is not getting called from the
keyboard equivalent. I'm sure I'll look pretty stupid for asking this,
but I cou
Hi,
Here's the code:
the following method is running in a separate thread:
- (void)myFucntion
{
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
for (;;)// for loop starts here and is very quick, 100s of iterations
per second
{
{
float f;
[myData getBytes:&f length:sizeof(float)];
On Mar 3, 2009, at 9:51 AM, Jay Kickliter wrote:
hat's what I'm doing. But don't understand how to get the 4 bytes I
have in NSData into a float variable.
___
Cocoa-dev mailing list (Cocoa-dev@l
On 3/3/09 11:51 AM, Jay Kickliter said:
>That's what I'm doing. But don't understand how to get the 4 bytes I
>have in NSData into a float variable.
NDData* data = ...
const float* bytes = [data bytes];
float value = bytes[0];
--
Sean
On Mar 3, 2009, at 8:40 AM, Pierce Freeman wrote:
I may be crazy here, but could you point me to some documentation?
The only
one I found is legacy.
I think the parent meant FSFindFolder(), which will return an FSRef
for a given special folder. That API is not legacy, and works on all
On Mar 3, 2009, at 7:27 AM, Mark D. Gerl wrote:
So, I need to tap into some NSMenu events - most notably the
menuNeedsUpdate: delegate method. However, when I call the
setDelegate: of my NSMenu that's attached to my NSStatusItem, the
icon shows, and highlights when clicked, but the menu ne
That's what I'm doing. But don't understand how to get the 4 bytes I
have in NSData into a float variable.
On Mar 3, 2009, at 10:39 AM, Sean McBride wrote:
On 3/2/09 8:32 PM, Jay Kickliter said:
I know I have to play around to make sure the bytes are in the right
order. But what I can't see
On Mar 2, 2009, at 6:19 PM, Graham Cox wrote:
On 03/03/2009, at 2:30 AM, Eric Gorr wrote:
[self lockFocus];
[NSGraphicsContext saveGraphicsState];
NSRect focusRingBounds = [self bounds];
NSSetFocusRingStyle( NSFocusRingOnly );
NSBezierPath *path = [NSBezierPath
bezierPathWithRect:focusRing
On Tue, Mar 3, 2009 at 10:34 AM, Paul Sanders wrote:
>> Apple can assume 2 applications calling themselves the same thing, with
>> different versions, signed with the same self-signed cert were published
>> by
>> the same person, and by extension, that any user preferences (firewall and
>> parenta
On 3/3/09 11:00 AM, Michael Ash said:
>It's an unsigned int in the 10.5 SDK, which is what you must use if
>you're going to be using any NS APIs in 64-bit.
So it is, sorry for the noise. (The newest documentation still shows
'long', guess I should have checked the headers too!)
--
_
On Mar 2, 2009, at 9:22 PM, Dave DeLong wrote:
Hey everyone,
I've just come across something that I'm totally lost on.
I've got an app that I'm making that uses the Flying Meat database
system (this may or may not be relevant; I have no idea), a couple
static arrays[], and an "EditMyTeams
On Tue, Mar 3, 2009 at 10:43 AM, Sean McBride wrote:
> On 3/3/09 12:42 PM, Graham Cox said:
>
>>Have a look at NSSwapBigFloatToHost and friends
>
> Interesting. I'd not noticed that function, but I'm a bit suspicious of
> it. It takes a NSSwappedFloat struct, which is a struct with a single
> 'l
>> OK, thank you. Is it possible, would you happen to know, for an
>> application
>> to verify its own signature? I do this on Windows (using WinVerifyTrust)
>> to
>> check that the code has not been tampered with. Can't trust anybody
>> these
>> days :)
> It is possible, but the APIs to cod
On 3/3/09 12:42 PM, Graham Cox said:
>Have a look at NSSwapBigFloatToHost and friends
Interesting. I'd not noticed that function, but I'm a bit suspicious of
it. It takes a NSSwappedFloat struct, which is a struct with a single
'long'. But a float is 32 bit, and a long is either 32 or 64 depen
> OK, thank you. Is it possible, would you happen to know, for an application
> to verify its own signature? I do this on Windows (using WinVerifyTrust) to
> check that the code has not been tampered with. Can't trust anybody these
> days :)
>
It is possible, but the APIs to code-signing are p
I may be crazy here, but could you point me to some documentation? The only
one I found is legacy.
On 3/2/09 8:56 PM, "Graham Cox" wrote:
>
> On 03/03/2009, at 3:36 PM, Pierce Freeman wrote:
>
>> Hi everyone:
>>
>> I am running into a bit of a problem when trying to use writeToFile
>> with
On 3/2/09 8:32 PM, Jay Kickliter said:
>I know I have to play around to make sure the bytes are in the right
>order. But what I can't seem to figure out, is how I create a float
>from those 4 bytes stored in an instance of NSData. Has anybody run
>into this situation?
Not sure if I'm understandin
> I think what I need is a "controlTextMightBeginEditing" instead of
> "controlTextDidBeginEditing". ;-)
Override -mouseDown, call [super], then check the first responder? If it's
a text edit field, fade to black. Something like that anyway, I know not
precisely of what I speak.
___
> Apple can assume 2 applications calling themselves the same thing, with
> different versions, signed with the same self-signed cert were published
> by
> the same person, and by extension, that any user preferences (firewall and
> parental controls, are the only preferences that use code-signing
Well, I've tried just about everything I can think of at this point,
but can't change the NSTableView cell successfully. To give some more
detail, the cell text is red when there is an error, but when the user
goes to edit the cell, I want to change the cell text back to black.
I can chang
> I'm working on a small game engine, and as such, I want to create a
> level editor for the game. I love the old style Doom level editors, so
> that's what I'm going for [1]. Notice in that screenshot the amount
> the user can interact with - moving vertices on the grid, creating
> lines between v
>>> So do I just create self-signed certificate and select it in the Xcode
>>> build settings and that's it? Everything is as desirable and as
>>> functional as need be?
>
>> Pretty much. Although in future versions Apple may elect to nag if the
>> certificate is not signed by a trusted root autho
> Also, if I want to know when the user has completed the divider
> movement, how would I find that out? I suspect I'd need to subclass
> NSSplitView method that handles the mouse events...
Yes; specifically, you should look at -mouseDown:, since NSSplitView
runs an event loop instead of using
>> So do I just create self-signed certificate and select it in the Xcode
>> build settings and that's it? Everything is as desirable and as
>> functional as need be?
> Pretty much. Although in future versions Apple may elect to nag if the
> certificate is not signed by a trusted root authority.
> So do I just create self-signed certificate and select it in the Xcode
> build settings and that's it? Everything is as desirable and as
> functional as need be?
Pretty much. Although in future versions Apple may elect to nag if the
certificate is not signed by a trusted root authority.
___
I have a working NSStatusItem installed with a menu. I need to
dynamically alter that menu before it's presented. I'm trying to do
something along the lines of what the airport menu does (try option-
clicking on it).
So, I need to tap into some NSMenu events - most notably the
menuNeedsU
Hello,
My application remains in system status bar. and i have three menu items
with my application icon.
I want to add key board listener for my application. so, if i press ctrl +
shift + f12 then it should give me some event. the menu should not display
this shortcut and menu item.
is it possibl
I have an NSTextFieldCell that draws attributed strings which have non-
default kerning and line multiple heights (to tighten line spacing).
This all draws as expected in the window but when these cells draw to
the print operation context the line multiple is ignored (using
default) while k
hi Steve,
this ADC article:
http://developer.apple.com/safari/articles/creatingrestfulclients.html
should give you all required pointers I think. Even if written as
example of REST with Ruby it describes how to do POST/GET (and others)
based requests to server side.
Examples in article are syn
Folks;
I've inherited some Cocoa code that uses NSMutableNURLRequest and
NSURLConnection to pass .php request to a server.
The NSMutableURLRequest packs up some data into the the .php which
stuffs this data into a MySQL database.
This is all working nicely.
Now what I've been asked to make
Hi All,
I am stuck again at seemingly obvious point, but I can't figure out
where
In MyView Class , below lines work fine for flipping the layer (but
whenever I try to resize or add a subLayer to it, view flashes for the
reason I don't know)
-(void)awakeFromNib{
drawLayer = [CALayer lay
At 21:06 +0100 1/3/09, Martijn van Exel wrote:
I can't seem to get away with
if(timer!=nil && [timer isValid]) [timer invalidate];
Aside from whatever is actually causing your problems (which is
nothing to do with the short circuited and in this line, these three
lines are all
81 matches
Mail list logo