I have a few NSButtonCells that I'm using in a custom view. I need
them to track the mouse during clicks and do this by calling NSCell's
trackMouse:inRect:ofView:untilMouseUp:. This works fine except that
the button cells never update their graphical state by highlighting
or whatever.
Cocoa applications tend to come to the foreground automatically
whenever I drag files to their Dock icon. Sometimes, however, I'd
prefer my application to stay in the background and just start working
on the file, while giving feedback through the Dock icon.
But this isn't supposed to be a
Hello
I would like to know what are the best practices and recommended
programs for preparing bitmap fonts for use in Cocoa applications.
I'm also reporting what is probably a bug in either OS X or the
available font editors.
If there is a list better suited to this question, please
Hi there-
This may or may not apply to your situation, but I had an incident a
few weeks ago in which I could not get DO to work with communication
between machines using NSSocketPorts. I was on Leopard and using
garbage collection. When I posted to the list, I received a response
from
On Mon, Mar 17, 2008 at 8:15 AM, John Pannell
[EMAIL PROTECTED] wrote:
I was on Leopard and using garbage collection.
Unfortunately this problem is occurring on Tiger.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin
Yes, you got it. .h stands for header and is the place where you make your
declarations, .m stands for module and is where the definitions take place.
You can encounter also .mm exetension. In these file you can mix Objective-C an
C++ language.
Luca.
I am trying to sodosomething more than the tutorial - Objective-C
tutorial.pdf
It's a Currency Converter application
the part of the code is below:
float amount;
converter = [[Converter alloc]init];
[converter setSourceCurrencyAmount:[dollarField floatValue]];
On Mar 17, 2008, at 7:53 AM, Luca Ciciriello wrote:
Yes, you got it. .h stands for header and is the place where you
make your declarations, .m stands for module and is where the
definitions take place.
You can encounter also .mm exetension. In these file you can mix
Objective-C an
On 17/03/2008, at 11:33 PM, Scott Thompson wrote:
I would recommend that you find a nice book on C. I would recommend
one, but it's been a while since I've surveyed the literature.
I highly recommend Programming in Objective-C by Stephen Kochan. IMO
it is by far the best introduction to
On Mon, Mar 17, 2008 at 9:33 AM, Scott Thompson [EMAIL PROTECTED] wrote:
I would recommend that you find a nice book on C. I would recommend
one, but it's been a while since I've surveyed the literature.
Get The C Programming Language by Kernighan and Ritchie. It is the
gold standard of
While KR is certainly the gold standard reference, I wouldn't
recommend it as the book to learn the language. Kochan's Programming
in Objective-C as noted by Rob Keniger is a much better introduction
to what you'll need for programming on a Mac. After that one, I
recommend Aaron Hillegass's Cocoa
Thanks for all the feed back, its been most helpful.
-Kevin
On Mar 15, 2008, at 12:04 PM, Kevin Dixon wrote:
I'm trying to write a method that will convert a NSString containing a
file system URL to an FSRef with the following code
- (FSRef)stringToFSRef: (NSString*)filePath {
FSRef
On Mar 17, 2008, at 1:42 AM, Ben Lachman wrote:
I have a few NSButtonCells that I'm using in a custom view. I need
them to track the mouse during clicks and do this by calling
NSCell's trackMouse:inRect:ofView:untilMouseUp:. This works fine
except that the button cells never update
On Mar 15, 2008, at 2:53 AM, Cocoa wrote:
I am reading the Scripting Bridge Concepts.pdf, when I doing this in
the terminal i got a error
sdef /Applications/Mail.app | sdp -fh --basename Mail ( what I type
in the Terminal)
sdp: unknown type name OLD message editor. (computer responses)
On 16 Mar '08, at 12:07 PM, John Harper wrote:
Implicit animations are useful in many scenarios, but due to the
simplicity of the API they don't cover everything. If there are
things you'd like to see them extended to support please file bugs.
Thanks for your detailed answers, John.
The
There should be a delegate method you can implement to prevent this
from happening. Perhaps the following one, although it doesn't look
quite right to me.
applicationShouldHandleReopen:hasVisibleWindows:
-Ryan
http://www.chimoosoft.com/
On Mar 17, 2008, at 12:36 AM, Peter Maurer wrote:
On Mar 17, 2008, at 9:31 AM, Ross Carter wrote:
What is the correct approach to take when you need NSLayoutManager
to make on-the-fly adjustments to the glyphs
Usually the glyph generator is used for default glyph generation, and
the typesetter is used to make adjustments to the glyphs
On 17 Mar '08, at 9:26 AM, Ryan Poling wrote:
applicationShouldHandleReopen:hasVisibleWindows:
No, that delegate call controls what happens if your app is double-
clicked when it's already running. Some apps respond to this by
opening a new untitled document, for consistency in behavior.
On 17 Mar '08, at 9:56 AM, Ryan Chapman wrote:
In MaxPostProcessing.app, how can I determine the file that was the
parameter passed to openFile: ??
In your class that's the NSApplication's delegate, implement the method
- (BOOL)application:(NSApplication *)sender openFile:(NSString
If you're looking fot the equivalent of argc/argv you might be looking
for...
NSProcessInfo *procInfo = [NSProcessInfo processInfo];
NSArray *args = [procInfo arguments];
Regards, Rob.
On 17 Mar 2008, at 16:56, Ryan Chapman wrote:
Hi all,
I have an application that uses NSWorkspace
Hello,
If you just cut paste the code from 'main' in the chatterd server, I
would double-check that your connection and root object are being
retained properly in your AppController. For example, make sure
'monitor', 'connection', 'chatterServer', and 'receivePort' are not
autoreleased
On 17 Mar '08, at 10:06 AM, Robert Tillyard wrote:
If you're looking fot the equivalent of argc/argv you might be
looking for...
NSProcessInfo *procInfo = [NSProcessInfo processInfo];
NSArray *args = [procInfo arguments];
But documents to be opened are never passed through argv; they're
Hi All,
I'm using a NSPanel to mimic menu in Tiger these days. I think most of the
job has been done except one small problem.
What I want to do is that implementing something just behaves like a
popUpButton.
OK let's get into the point.
I got a popUpButton, and I override its cell
On 17 Mar 2008, at 17:07, Michael Nickerson wrote:
On Mar 17, 2008, at 9:06 AM, Martin Redington wrote:
I'm seeing the following error
2008-03-17 12:42:11.916 MyApp[11155] *** Assertion failure in -
[MyOutlineView lockFocus], AppKit.subproj/NSView.m:3248
2008-03-17 12:42:11.917
The Memory Management Programming Guide
(http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Concepts/AutoreleasePools.html#//apple_ref/doc/uid/2047)
states The Application Kit automatically creates a pool at the beginning of
an event cycle (or event-loop iteration), such
To me, best large table lookup comes down to a tradeoff:
1) If I can load all the data into memory, using say a hash table,
then the initial load time will be somewhat significant but the
lookups will be near instantaneous.
2) If I can look up the data from an ordered persistent store, the
On 17 Mar 2008, at 17:46, Hamish Allan wrote:
If you're cutting your programming teeth on Cocoa, you might find that
Python or Ruby is gentler.
I'm not sure I agree. Two problems for me.
* Cocoa isn't a seamless fit with either python or ruby, so there are
little corner cases around that
Is there any way to get this information from within a command-line utility?
In my case, I have a command-line utility wrapped up in an application bundle,
so I
really don't need any GUI stuff, but I thought I could use the Cocoa classes
to get the filename sent without launching a GUI.
I overrode lockFocus, and stuck a breakpoint on it.
#0 0x004f87ea in -[MyOutlineView lockFocus] at MyOutlineView.m:75
#1 0x93310315 in -[NSView
_recursiveDisplayAllDirtyWithLockFocus:visRect:]
#2 0x9332238f in _recursiveDisplayInRect2
#3 0x9083eac0 in CFArrayApplyFunction
#4
On 17 Mar '08, at 10:42 AM, Jean-Daniel Dupas wrote:
Why no? The documentation says:
«These events are sent whenever the Finder reactivates an already
running application because someone double-clicked it again or used
the dock to activate it.»
That means clicked on its icon in the
On Mon, Mar 17, 2008 at 2:39 PM, Paul Sargent [EMAIL PROTECTED] wrote:
On 17 Mar 2008, at 17:46, Hamish Allan wrote:
If you're cutting your programming teeth on Cocoa, you might find that
Python or Ruby is gentler.
I'm not sure I agree. Two problems for me.
* Cocoa isn't a seamless fit
On 17 Mar '08, at 11:38 AM, Andy Klepack wrote:
Does an 'event cycle' then include anything dispatched from a run
loop source? For instance, if I was to create a kqueue, create a run
loop source for it, and add that to the main run loop, does an
AutoReleasePool automatically get created
On 17 Mar '08, at 12:00 PM, Ryan Chapman wrote:
Is there any way to get this information from within a command-line
utility?
In my case, I have a command-line utility wrapped up in an
application bundle, so I
really don't need any GUI stuff, but I thought I could use the Cocoa
classes
to
Hi. My Core Data Application is producing 'Incompatible model
configuration' errors which don't make sense to me Anyone got any
ideas ...?
My Application contains 4 data models - OptDataDump, Market, Local and
EVEAPI. Each of the entities in the data models are set to have the
I overrode -[NSTableView setFrameSize:] in my outline view class, so
that it only calls super if the size has really changed.
This seems to fix the issue - setFrameSize: gets called a few times
as I add the view - the first few times the values haven't changed.
By the time they do
Hi all,
I'd like to use the genie effect (or similar) when opening and closing
an NSWindow. Carbon has an API named TransitionWindow() for this task,
but it's 32-bit only. I've searched the archives and it seems there is
no Cocoa equivalent? Is this still so, even in 10.5? Could Core
On Mon, Mar 17, 2008 at 8:49 AM, glenn andreas [EMAIL PROTECTED] wrote:
On Mar 17, 2008, at 1:42 AM, Ben Lachman wrote:
I have a few NSButtonCells that I'm using in a custom view. I need
them to track the mouse during clicks and do this by calling
NSCell's
Why do you want to do this? I would be pretty annoyed if I couldn't
drag a window from space to space if it appeared in my zoomed-out
spaces.
--
m-s
On 17 Mar, 2008, at 06:28, Cocoa Developer wrote:
Hi,
How to make a window not draggable in spaces.
I used to set NSBorderlessWindowMask
Hi all,
Is anyone using the new NSView full screen methods in 10.5?
I have a window which contains a 'group view', it is basically an NSView
that contains two subviews: a button, and an custom NSView that draws
pretty pictures. The button displays a floating palette (NSPanel).
My ultimate goal
On 3/15/08 12:48 PM, Rob Keniger said:
There's a trap for young players in the docs: watch out if you are
creating a GC-only app. Classes instantiated via IB3 plugins MUST be
compliant with the traditional retain/release mechanism, you can't
create a plugin for a class that relies on Garbage
I'm trying to convert a date formatted as a valid
xsd:dateTime format, which is a subset of ISO 8601. I
though I had it when I saw that that -[NSDate
dateWithString:] takes an international string
representation format. But when I feed it a string
like @2007-07-01T01:33:01Z, I get back nil.
Does
On 17 Mar '08, at 2:25 PM, Andy Klepack wrote:
In the case of C callbacks wouldn't it be the case that an
autorelease pool would exist (that of the main thread) but that it
would not be emptied once the callback completes? You wouldn't see
any warnings if that were the case.
You're
On 17 Mar '08, at 3:20 PM, Nathan Vander Wilt wrote:
Does -dateWithString: really not support the
international [standard!] string representation of
ISO 8601?? What's the right way to convert such an
xsd:dateTime to an NSDate?
+[NSDate dateWithString:] is, I think, configured to recognize
Hi,
I am porting a game onto Mac OS X, I need to track all keyboard event
even it is not for me. How can I achieve that goal?
Regards
Frank Gong (Pengjun Gong)
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin
(2) But in any case, NSString doesn't mind embedded null bytes.
(It's not null-terminated like a C string; the string object
remembers the length separately.) That doesn't mean you should store
binary data in an NSString, though. NSData is better for that.
NSString isn’t really too happy
On Mar 17, 2008, at 2:36 AM, Peter Maurer wrote:
Cocoa applications tend to come to the foreground automatically
whenever I drag files to their Dock icon. Sometimes, however, I'd
prefer my application to stay in the background and just start
working on the file, while giving feedback
On Mar 17, 2008, at 4:25 PM, Andy Klepack wrote:
I'm seeing this problem in some AE handlers installed via
AEInstallEventHandler. There are no warnings about a pool not
existing, but the app memory usage grows and grows. Wrapping the
handler in a pool creation and release appears to solve
Does -dateWithString: really not support the
international [standard!] string representation of
ISO 8601?? What's the right way to convert such an
xsd:dateTime to an NSDate?
+[NSDate dateWithString:] is, I think, configured to recognize one
particular date format, which depends on your system
On Mar 17, 2008, at 6:05 PM, frank.gongpengjun wrote:
I am porting a game onto Mac OS X, I need to track all keyboard
event even it is not for me. How can I achieve that goal?
I'm not sure what you mean by it is not for me.
If you need to see all keyboard events sent to your application,
On 17 Mar '08, at 4:30 PM, Nathan Vander Wilt wrote:
This works, BUT...I had to edit the format a bit because my time
strings (in this sample!) did not have the decimal seconds. However,
I wouldn't be surprised to see input with sub-second precision. How
can I specify optional format
So, as I said in an earlier post, I'm getting back into Cocoa
development after a little hiatus. I was working in IB today. Boy,
it's changed, and for the better, but I can't figure out how to do
something I used to do in Interface Builder. I want to create an
instance of a custom NSObject
I'm trying to convert some old Carbon code over to Cocoa, and one of
the things I'm doing is converting my old run-loop timers. I used to
use the following code:
InstallEventLoopTimer(..);
RunApplicationEventLoop();
..
QuitApplicationEventLoop();
That
On Mon, Mar 17, 2008 at 10:45 PM, Jeff LaMarche [EMAIL PROTECTED] wrote:
So, as I said in an earlier post, I'm getting back into Cocoa
development after a little hiatus. I was working in IB today. Boy,
it's changed, and for the better, but I can't figure out how to do
something I used to do
On Mon, Mar 17, 2008 at 10:53 PM, Brian Greenstone [EMAIL PROTECTED] wrote:
I'm trying to convert some old Carbon code over to Cocoa, and one of
the things I'm doing is converting my old run-loop timers. I used to
use the following code:
Are you sure you want to be creating your own run
On Mar 17, 2008, at 10:55 PM, Kyle Sluder wrote:
I assume you mean you want to specify the class of the instance,
because specifying the NSObject's superclass is a nonsensical
statement. The field you're looking for is on the Identity pane of
the Inspector
LOL. Sorry, I shouldn't try and do
So my view is a NSControl subclass and after playing with this some
it seems you have to do one more thing. If you're going to have a
control handle multiple cells (in my case button cells) you have to
call setCell: for the correct cell in mouseDown: and then let super
handle the mouse
I have some text items whose glyphs cannot be determined until
layout. The text string might contain a marker to draw the current
page number, or to sequentially number paragraphs, etc. The glyphs
can be determined only by the layout manager; different layout
managers for the same text
On Mon, Mar 17, 2008 at 11:26 PM, Brian Greenstone [EMAIL PROTECTED] wrote:
I was using NSTimer originally, but I was having the exact same
problem since NSTimer is really just a CFRunLoopTimerRef according to
the docs. As far as I can tell, using NS calls to do this is just a
more
On Mon, Mar 17, 2008 at 11:01 PM, Jeff LaMarche [EMAIL PROTECTED] wrote:
LOL. Sorry, I shouldn't try and do this stuff so late at night! I
meant specifying the new class' superclass.
Oh. You don't. IB3 is a different beast. Instead, you write your
code in Xcode and then switch to IB and
On 18/03/2008, at 1:26 PM, Brian Greenstone wrote:
I was using NSTimer originally, but I was having the exact same
problem since NSTimer is really just a CFRunLoopTimerRef according
to the docs. As far as I can tell, using NS calls to do this is
just a more complicated way than simply
On Mar 17, 2008, at 4:51 , Sean McBride wrote:
Hi all,
Is anyone using the new NSView full screen methods in 10.5?
I have a window which contains a 'group view', it is basically an
NSView
that contains two subviews: a button, and an custom NSView that draws
pretty pictures. The button
On 18/03/2008, at 2:04 PM, Rob Keniger wrote:
Works great and it sounds like it will do what you want. The trick
is to set the run loop mode correctly, you can probably do something
equivalent with the CF calls if you like. I like my Obj-C gibberish
so I avoid CF if possible ;-)
I
On Tue, Mar 18, 2008 at 12:01 AM, Brian Greenstone [EMAIL PROTECTED] wrote:
Cocoa is really only necessary for GUI based apps
We seem to have not made any progress. Until you change that
misconception, this is going to be rather difficult. Back when this
OS was known as NEXTSTEP and Core
On Mar 17, 2008, at 7:53 PM, Brian Greenstone wrote:
[[NSApplication sharedApplication] run];
That actually works! My timer fires off like it should, yet
everything else works too. I can still access the menus, and window
still receive click events. Unfortunately, there's no
64 matches
Mail list logo