On 29.08.2008, at 02:12, Graham Cox wrote:
Well, that was me. But I do see the error of my ways... I guess it
was Michael Ash's comment that NSArray *could* change its storage
half way through enumeration (if the collection were mutated) that
woke me up. I suspect it would only do this if th
I have an app which does not take any Cpu-time when it is doing nothing.
So what? you might say. Every app does this.
Well, not quite.
If I add these magic lines it will use 0.2% of my Cpu just doing
nothing:
NSMetadataQuery *query = [ [ NSMetadataQuery alloc] init];
[ query
On Aug 28, 2008, at 10:45 PM, Robert Claeson wrote:
On 28 Aug 2008, at 22:38, Wayne Shao wrote:
What is the correct way to quit a cocoa app? I could use C exit()
but that
would loose the chance to invoke the right callbacks for clean up.
What is the call that would be equivalent to user e
yes, it is for a small hex reader.
I need to read some old c64 file (.prg) then
visualize the hex and the ascii
so when I translate this:
01 08 0B 08 01 00 9E 32 30 36 31 00 00 00 A9 93
20 D2 FF A9 08 85 FC 8D 6B 10 A9 38 8D DC 17 A9
30 8D DB 17 A9 37 85 01 A9 13
I get this:
î2061 ì¢PêàU(
Thanks, I have no idea how I missed that.
Exactly what I was looking for!
Andrew
On Aug 28, 2008, at 9:40 PM, Graff wrote:
On Aug 28, 2008, at 3:11 PM, Andrew R. Kinnie wrote:
I am attempting to programmatically create an html (rather, xhtml)
document using NSXMLDocument, NSXMLElement, etc
Hi all,
I'm trying to develop an application that uses an OutlineView in which it
displays items like a disclosure triangle, then one checkbox, then a text
field int the same column. For that I gone through the
DragNDropOutlineview example provided with Xcode. Then I copied the
ImageAndTextCell cla
Hi all,
I developed one application that uses some files.I can deploy the
application.
Now what I want is when double clicking the .app file in any system it
should be installed in a specific folder like :Macintosh HD | Library |
Application Support | Macware | TheProject. And also the files should
On 29 Aug 2008, at 14:22, [EMAIL PROTECTED] wrote:
Hi all,
I developed one application that uses some files.I can deploy the
application.
Now what I want is when double clicking the .app file in any system it
should be installed in a specific folder like :Macintosh HD |
Library |
Application
Hello
I am having trouble customizing NSColorPanel.
I want the user to be able to pick colors for parts of the app using
color wells.
But I need to have some color wells only allow grayscale while others
can be set to the full range of color.
My solution for this was to have the NSColorPane
On Fri, Aug 29, 2008 at 9:42 PM, Gerriet M. Denkmann
<[EMAIL PROTECTED]> wrote:
> If I add these magic lines it will use 0.2% of my Cpu just doing nothing:
>
>NSMetadataQuery *query = [ [ NSMetadataQuery alloc] init];
>[ query startQuery ];
>[ query stopQuery ];
>NSA
In my attempts to animate objects along a circular/elliptical path, I
naturally turned to CGPathAddEllipseToPoint. Imagine a clock face with four
equidistant objects located on the path; I want the objects to animate 360
degrees from their start points. Using the elliptical path, all four
objects
On Aug 27, 2008, at 1:34 AM, Ron Lue-Sang wrote:
Woah.
If you really want to use a custom cell, you're gonna want a custom
column as well. The bindings for the tableColumn come from the
tableColumn's dataCell's available bindings. Yea, as you've found,
NSActionCell has a value binding, not
Hi all,
I'm trying to develop an application that uses an OutlineView in which it
displays items like a disclosure triangle, then one checkbox, then a text
field int the same column. For that I gone through the DragNDropOutlineview
example provided with Xcode. Then I copied the ImageAndTextCell cla
What is the correct way to quit a cocoa app? I could use C exit()
but that
would loose the chance to invoke the right callbacks for clean up.
FWIW, if you don’t have any termination delegate methods of your own,
and don’t have any user defaults that might not be synchronized, it’s
safe t
I'm trying to develop an application that uses an OutlineView in
which it
displays items like a disclosure triangle, then one checkbox, then a
text
field int the same column. For that I gone through the
DragNDropOutlineview example provided with Xcode. Then I copied the
ImageAndTextCell class
Maybe I'm missing something from your example, previous postings, and my ISP's
web mail client, but it appears your desired output doesn't seem to match in
character count to your original text. Nevertheless, if all you want is to
turn low-ASCII (values less than 0x20) and high-ASCII (values gr
Hi all,
It seems that KVO best practice is to use the "context" in
observeValueForKeyPath:ofObject:change:context: to differentiate
between different key paths, rather than check key path strings for
equality. Since context is a void *, it also seems best practice to
just use some unique
On Sat, Aug 30, 2008 at 2:56 AM, Dave Dribin <[EMAIL PROTECTED]> wrote:
> Is there some benefit to using number values over string constants, or is it
> just stylistic differences?
>
Using NSStrings (or any other object) will work fine, but comparing
two primitive numbers is a lot faster than comp
On Aug 29, 2008, at 10:03 AM, Phil wrote:
On Sat, Aug 30, 2008 at 2:56 AM, Dave Dribin <[EMAIL PROTECTED]>
wrote:
Is there some benefit to using number values over string constants,
or is it
just stylistic differences?
Using NSStrings (or any other object) will work fine, but comparing
two
You'll want to look at the PhotoSearch demo I presented at WWDC a few
years ago. It shows how to do exactly what you are talking about
(well, it is similar, but the concepts should be the same).
http://developer.apple.com/samplecode/PhotoSearch/index.html
corbin
On Aug 29, 2008, at 5:08 AM,
Hi List,
I noticed something today while building a new popup-popup-popup
template: when the user changes the comparator (a simple is/is not in
my case), the third popup resets itself to the default value instead
of maintaining the selection the user had already chosen. The same is
true if the th
On Thu, Aug 28, 2008 at 9:50 PM, Gerriet M. Denkmann
<[EMAIL PROTECTED]> wrote:
> While if fully agree with you about valid assumptions and so, I am still
> wondering what is the disadvantage of forgetting about NSEnumerator, Fast
> Enumeration and the like and simply doing:
>
> unsigned count = [
On Aug 29, 2008, at 8:13 AM, Dave Dribin wrote:
On Aug 29, 2008, at 10:03 AM, Phil wrote:
On Sat, Aug 30, 2008 at 2:56 AM, Dave Dribin <[EMAIL PROTECTED]>
wrote:
Is there some benefit to using number values over string
constants, or is it
just stylistic differences?
Using NSStrings (or
On Thu, Aug 28, 2008 at 1:52 PM, Martin Stoufer <[EMAIL PROTECTED]> wrote:
> I had always naively assumed that all the some *Framework underneath an app
> was setting up signal handlers for you with default behaviours. If this
> isn't the case, then yes any killall approach will cause loss of data.
On Fri, Aug 29, 2008 at 10:56 AM, Dave Dribin <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> It seems that KVO best practice is to use the "context" in
> observeValueForKeyPath:ofObject:change:context: to differentiate between
> different key paths, rather than check key path strings for equality. Since
On Aug 29, 2008, at 11:27 AM, Michael Ash wrote:
This (void *)1091 business seems highly dangerous to me. After all,
what prevents somebody else from using 1091 too? If everybody uses a
pointer value that's guaranteed to be unique (like a unique string
literal) then you know you're safe.
It rea
After all, what prevents somebody else from using 1091 too?
Nothing whatsoever. But that isn't a problem. So long as the
observation context remains internal it doesn't have to be universally
unique.
If you're performing [anotherObjectNotSelf addObserver... then yes,
I'd make sure that t
On Aug 29, 2008, at 10:56 AM, Dave Dribin wrote:
It seems that KVO best practice is to use the "context" in
observeValueForKeyPath:ofObject:change:context: to differentiate
between different key paths, rather than check key path strings for
equality. Since context is a void *, it also seem
On Aug 29, 2008, at 7:56 AM, Dave Dribin wrote:
Since context is a void *, it also seems best practice to just use
some unique pointer values. For example, mmalc's Graphics Bindings
sample does this:
static void *PropertyObservationContext = (void *)1091;
static void *GraphicsObservationCo
On Aug 29, 2008, at 12:43 PM, Keith Duncan wrote:
After all, what prevents somebody else from using 1091 too?
Nothing whatsoever. But that isn't a problem. So long as the
observation context remains internal it doesn't have to be
universally unique.
It has to be unique within an inherita
On Fri, Aug 29, 2008 at 12:41 PM, Dave Dribin <[EMAIL PROTECTED]> wrote:
> On Aug 29, 2008, at 11:27 AM, Michael Ash wrote:
>>
>> This (void *)1091 business seems highly dangerous to me. After all,
>> what prevents somebody else from using 1091 too? If everybody uses a
>> pointer value that's guara
I sure wish that some of these command line tools had weird names so
that google was more helpful.
If I have a file that I've compressed with ditto and navigate to it in
the Finder and double click on it, it extracts the file in the same
directory, as expected.
If, however, I use NSTask t
On Aug 29, 2008, at 9:56 AM, Michael Ash wrote:
It really just needs to be unique in your class hierarchy, right?
True, but not particularly useful. Your class hierarchy includes
NSObject, which is free to observe whatever it feels like in your
objects.
No this is not generally true, so ju
On Aug 29, 2008, at 11:19 AM, Dale Jensen wrote:
I sure wish that some of these command line tools had weird names so
that google was more helpful.
If I have a file that I've compressed with ditto and navigate to it
in the Finder and double click on it, it extracts the file in the
same di
On Aug 29, 2008, at 12:23 PM, j o a r wrote:
The penalty for using constant strings is that they will end up
wasting space in your binary...
Rons suggestion is probably optimal.
I'm definitely leaning towards that way, now. Though I may combine
both for debugging.
static NSString *Proper
Here's a fragment of documentation from the "Cocoa Bindings
Programming Topics" guide:
"In order for a controller to create new content objects automatically
or in response to the target-action methods, it must know the
appropriate class to use."
My question is: what is a real example of a case w
On Aug 29, 2008, at 12:29 PM, Randall Meadows wrote:
On Aug 29, 2008, at 11:19 AM, Dale Jensen wrote:
I sure wish that some of these command line tools had weird names
so that google was more helpful.
If I have a file that I've compressed with ditto and navigate to it
in the Finder and do
On Aug 29, 2008, at 12:38 PM, Oleg Krupnov wrote:
My question is: what is a real example of a case when the controller
needs to create new content objects?
-[NSArrayController add:] ? You can use that as an action for a button
in IB.
-Dave
___
C
On 29 Aug 2008, at 20:57, Phil wrote:
On Fri, Aug 29, 2008 at 9:42 PM, Gerriet M. Denkmann
<[EMAIL PROTECTED]> wrote:
If I add these magic lines it will use 0.2% of my Cpu just doing
nothing:
NSMetadataQuery *query = [ [ NSMetadataQuery alloc] init];
[ query startQuery ];
Hi guys, I'm new to Objective-C and didn't have so much experience, in
general, with manual managed memory. Despite I'm using Objective-C 2.0
I'm keen on not using the autorelease garbage collector. I'm try to
understand if my application has memory leaks using Instruments. To
check the total ram u
I am able to set the initial height/width of the NSTextContainer object
of a NSTextView object in IB. However, I cannot find any method that
will allow the programmatic re-sizing of the container when the text I'm
adding exceeds this size.
Optimally, I'd like to utilize the setContainerSize wi
On Fri, Aug 29, 2008 at 2:08 PM, I. Savant <[EMAIL PROTECTED]> wrote:
> Without more (a LOT more) information about your application, it's
> hard (if not impossible) to tell you where your problem is.
Sorry, I hit send before adding this: Try the "Object Allocations"
instrument (read the docum
this is a cool idea.
mapping into an array all the chars I need and run the parse..
quite cool.tnx!
I need to call the parse only one time after loaded the .prg C64 file.
Maybe I'm missing something from your example, previous postings,
and my ISP's web mail client, but it appears your desire
On Fri, 29 Aug 2008 12:13:34 -0400, "Michael Ash"
<[EMAIL PROTECTED]> wrote:
On Thu, Aug 28, 2008 at 9:50 PM, Gerriet M. Denkmann
<[EMAIL PROTECTED]> wrote:
While if fully agree with you about valid assumptions and so, I am
still
wondering what is the disadvantage of forgetting about
NSEn
On Aug 29, 2008, at 11:01 AM, Martin Stoufer wrote:
I am able to set the initial height/width of the NSTextContainer
object of a NSTextView object in IB. However, I cannot find any
method that will allow the programmatic re-sizing of the container
when the text I'm adding exceeds this size
On Fri, Aug 29, 2008 at 1:49 PM, Christian Giordano
<[EMAIL PROTECTED]> wrote:
> On th e Leaks Instrument though,
> no leak is shown. I can't really find why the ram continues to
> increase, and my app is really simple. I tested then a sample app from
> apple and this a part having an increase mem
On Aug 29, 2008, at 12:35 PM, Dave Dribin wrote:
On Aug 29, 2008, at 12:23 PM, j o a r wrote:
The penalty for using constant strings is that they will end up
wasting space in your binary...
Rons suggestion is probably optimal.
I'm definitely leaning towards that way, now. Though I may combi
Use &PropertyObservationContext as the context. This way you could
"po *(id *)context" in gdb for a human readable context.
That was my main concern of using the address of a static variable,
but combining the two approaches works nicely.
Keith
_
Hi All,
Continuing learning the Quicktime API.
I am confused about QTTimeRanges, etc
Consider the following:
QTMovie *aQTMovie = [QTMovie movieWithFile:path error:nil];
[aQTMovie setAttribute:[NSNumber numberWithBool:YES]
forKey:QTMovieEditableAttribute];
QTTime qStartTime = QTMakeTime([s
Software Developer - COCOA
Company:Confidential
Job ID#:8082102
# of Positions: 1
Posted: Aug 21, 2008
Job Type: Full Time Permanent or Contract on-site
Location: San Jose, Ca
Contact:Darren Tessit
To create a preference window with a NSToolbar at the top and a
tabless NSTabView containing a few panels.
How would I go about connecting the two in Interface Builder?
I can set the NSToolbar selector to invoke
takeSelectedTabViewItemFromSender on the NSTabView, which seems
promising. But
Hello,
I am writing a Cocoa application for accessing a serial device. (IOKit) In
order to do this, you need to translate between CF and NS data types. (I
believe)
For instance:
CFMutableArrayRef devicePaths = CFArrayCreateMutable(NULL, 0, NULL);
GetSerialPortPaths(serialServices
On Aug 29, 2008, at 11:38 AM, Allen Curtis wrote:
I am writing a Cocoa application for accessing a serial device.
(IOKit) In
order to do this, you need to translate between CF and NS data
types. (I
believe)
For instance:
CFMutableArrayRef devicePaths = CFArrayCreateMutable(NULL, 0,
On Aug 29, 2008, at 10:38 AM, Allen Curtis wrote:
1. Where can I get a better understanding of the data conversion
between
these different frameworks?
As I understand it, it's not a "data conversion". If a class is toll-
free bridged, a CFRef is also an objective-c object. So whether you d
On Aug 29, 2008, at 10:38 AM, Oleg Krupnov wrote:
Here's a fragment of documentation from the "Cocoa Bindings
Programming Topics" guide:
"In order for a controller to create new content objects automatically
or in response to the target-action methods, it must know the
appropriate class to use
On Aug 29, 2008, at 13:38 , Allen Curtis wrote:
The problem: I found that if you release the CFMutableArray, you
also loose
the NSMutableArray
Question:
1. Where can I get a better understanding of the data conversion
between
these different frameworks?
2. Ultimately the device path names
On Aug 29, 2008, at 08:20, David Reitter wrote:
To create a preference window with a NSToolbar at the top and a
tabless NSTabView containing a few panels.
How would I go about connecting the two in Interface Builder?
I can set the NSToolbar selector to invoke
takeSelectedTabViewItemFromSend
Doug is correct. Check out NSText in the APIs. I used this method
just yesterday to size a text view:
-sizeToFit
Resizes the receiver to fit its text.
- (void)sizeToFit
Discussion
The text view will not be sized any smaller than its minimum size,
however.
Availability
• Availa
On Aug 29, 2008, at 12:49, Quincey Morris wrote:
On Aug 29, 2008, at 08:20, David Reitter wrote:
To create a preference window with a NSToolbar at the top and a
tabless NSTabView containing a few panels.
How would I go about connecting the two in Interface Builder?
I can set the NSToolbar s
Based on the information in the "interchangable data types" document, Would
it be possible to do the following?
NSMutableArray serialPorts = [[NSMutableArray alloc] init];
GetSerialPortPaths(serialServices, (CFMutableArrayRef)serialPorts);
printf("Found %d serial ports\n", [serialPorts count
Gerriet Denkmann wrote:
While if fully agree with you about valid assumptions and so, I am
still wondering what is the disadvantage of forgetting about
NSEnumerator, Fast Enumeration and the like and simply doing:
unsigned count = [ array count ];
if ( count == 0 ) return;
for( unsigned i =
On Aug 29, 2008, at 2:28 PM, Allen Curtis wrote:
Based on the information in the "interchangable data types"
document, Would it be possible to do the following?
NSMutableArray serialPorts = [[NSMutableArray alloc] init];
GetSerialPortPaths(serialServices, (CFMutableArrayRef)serialPorts);
On Aug 29, 2008, at 8:51 AM, Jim Turner wrote:
Hi List,
I noticed something today while building a new popup-popup-popup
template: when the user changes the comparator (a simple is/is not in
my case), the third popup resets itself to the default value instead
of maintaining the selection the u
Thanks for the reply Peter.
Just for the archives, my subclassed NSPopUpButton wasn't showing up
because, like you said, it was being treated differently and I was
initializing it with NSZeroRect. Giving it a starting size and
sending it sizeToFit in templateViews got it on screen.
Jim
On Fri,
Well, solved kinda... I have worked around the inability to use ODBC to
access my MySQL database by using the MCPkit framework (AKA MySQLCocoa).
This is a very complete library that works well. It does however have the
obvious limitation of being "MySQL only".
I would prefer to be using ODBC, and
On Thu, 28 Aug 2008 16:49:04 -0700, Quincey Morris
<[EMAIL PROTECTED]> said:
>If the insertion *must* be modal, it might be better to be explicit
>about it: instead of creating an invalid object when the Add button is
>clicked, display a sheet that has fields for the required object
>properties, an
On 29 Aug 2008, at 15:52, Quincey Morris wrote:
On Aug 29, 2008, at 12:49, Quincey Morris wrote:
On Aug 29, 2008, at 08:20, David Reitter wrote:
To create a preference window with a NSToolbar at the top and a
tabless NSTabView containing a few panels.
How would I go about connecting the tw
On Aug 29, 2008, at 15:08, David Reitter wrote:
Sorry, where in IB do I set the identifier of the NSToolbarItem? Is
it just the Label? At least this is what can be bound.
Doh, I forgot that IB 3.1 fails to expose the toolbar item
identifiers. Perhaps a future version of IB might do this.
On Aug 29, 2008, at 10:23, j o a r wrote:
If you use a constant string, you should make sure that the
string *contents* are unique, in order to ensure uniqueness of the
pointer to it. So don't call it @"context", use @"MyFunkyClass KVO
observer context". After all there's no penalty for being ver
A program I have developed will not run on a PPC machine (G5
iMac) using OS 10.4.11. It was developed on Xcode 3.0 on an Intel
machine running OS 10.5.4. Initially the projects "Cross_Develop
Using Target SDK" was set to "Current Mac OS", so it's not surprising
that it wouldn't run on the G5 m
I'm having a hard time with what should be a simple task - storing an
integer for a gradient angle as a user default and then updating the
screen. When I quit the app and open it again, the NSTextField shows
the last value I set for the gradient, but with the following code:
- (IBAction)ch
Thanks.
I'd read that dictionaries and plists were particular in the types
they accept, but I was looking at page 201 of Hillegass (3rd edition),
which shows:
- (void)setInteger:(int)value forKey:(NSString *)defaultName
and
- (int)integerForKey:(NSString *)defaultName
and blindly followe
Hi list,
I had to subclass the NSApplication's -terminate method and have a
hopefully minor problem:
When I receive replyToApplicationShouldTerminate:NO I want to notify
the OS that the application will not quit. Otherwise on logout or
shutdown after the 30 seconds timeout I get the info
Brad,
You can't store an int into a Dictionary or user defaults. For the
objects you can use, see here:
http://developer.apple.com/documentation/Cocoa/Conceptual/PropertyLists/Articles/AboutPropertyLists.html#/
/apple_ref/doc/uid/20001010
NSNumber and NSString should work.
Also, [ICNEleme
Well, it appears that I need to convert either an NSNumber or an
NSString to a CGFloat, rather than an int:
- (void)drawInRect:(NSRect)rect angle:(CGFloat)angle
There don't appear to be any methods in either NSNumber or NSString to
do this
On Aug 29, 2008, at 7:36 PM, Brad Gibbs wrote
On Fri, Aug 29, 2008 at 1:38 PM, Allen Curtis <[EMAIL PROTECTED]> wrote:
> 1. Where can I get a better understanding of the data conversion between
> these different frameworks?
> 2. Ultimately the device path names will appear in a ComboBox. Was it
> necessary to convert the CFMutableArray to a NS
"Cocoa Design Patterns" Chapter 29, "Controllers," contains an MVC
solution to exactly the problem Oleg Krupnov describes. The chapter
presents a relatively simple MVC MYShapeDraw application. The chapter
leads the reader through the step by step process of re-inventing
NSArrayControlle
On 30 Aug 2008, at 12:14 pm, Andrei Kolev wrote:
Brad,
You can't store an int into [...] user defaults.
Sure you can:
- (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName;
Note that NSInteger == int, so the book doesn't have a typo, it's just
using the pre-Leopard type co
Sorry. When I posted about "the problem Oleg Krupnov describes", I
wasn't caught up on my reading of the list. The VC MYShapeDraw
application I describe is a drawing application and not related to
image thumbnail caching. Of course, the pattern is general and
applicable to image thumbnai
On Aug 29, 2008, at 8:54 PM, Brad Gibbs wrote:
I'm having a hard time with what should be a simple task - storing
an integer for a gradient angle as a user default and then updating
the screen. When I quit the app and open it again, the NSTextField
shows the last value I set for the gradie
On 30 Aug 2008, at 11:54 am, Brad Gibbs wrote:
NSLog(@"gradient angle is %d", [elementBarGradientAngleTextField
intValue]);
[defaults setInteger:[elementBarGradientAngleTextField intValue]
forKey:ICNElementBarGradientAngleKey];
NSLog(@"Element bar angle is now: %d",
[ICNElementBarGradie
On 30 Aug 2008, at 2:04 pm, Graham Cox wrote:
You can really tell
I meant of course that you CAN'T really tell...
G.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Cont
I'm getting a problem when I call -dataWithPDFInsideRect: within a
view's -drawRect: method. I'm doing this as part of an attempt to
cache the contents as a PDF under some circumstances, but I get a
number of assertions/exceptions thrown. This was previously working so
I'm not sure what's c
On 30/08/2008, at 4:50 AM, J. Todd Slack wrote:
Continuing learning the Quicktime API.
I am confused about QTTimeRanges, etc
Hi Jason,
You might be better off asking these questions on the QuickTime API
list:
http://lists.apple.com/mailman/listinfo/quicktime-api
--
Rob Keniger
On Aug 28, 2008, at 2:40 PM, Corbin Dunn wrote:
On Aug 28, 2008, at 1:48 PM, Ricky Sharp wrote:
On Aug 28, 2008, at 3:28 PM, Nathan Vander Wilt wrote:
According to two list postings (http://lists.apple.com/archives/cocoa-dev/2007/Nov/msg01760.html
, http://lists.apple.com/archives/cocoa-d
On 30 Aug 2008, at 2:23 pm, Graham Cox wrote:
Any ideas? Is it just not safe to try generating a PDF within
drawRect?
Clarification: these are in two *different* views - i.e. one is in the
middle of -drawRect: and creates a new view and calls its -
dataWithPDFInsideRect: method. Obviously
Hi Graham,
You might try saving and restoring graphics states for the pertinent
NSGraphicsContexts, although this wouldn't seem to explain why your code broke.
Sincerely,
Joel
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please d
87 matches
Mail list logo