On 28.11.2009, at 13:57, Gwynne Raskind wrote:
> On Nov 28, 2009, at 4:25 AM, Greg Parker wrote:
>> Here's a fun idiom for handling both C++ and Objective-C exceptions in the
>> same place (on iPhone and 64-bit Mac).
>>
>> @try {
>> // do stuff
>> } @catch (NSException *e) {
>>
On 30/11/2009, at 7:21 PM, Dorimedont Bancescu wrote:
> -why in initWithCoder the array is loaded, has all the elements and when
> numberOfRowsInTableView message is send the array is empty and has a
> different memory address?
Probably because you have two distinct objects. Check the address
Hi,
I have an Obj-c program who run as a daemon, using launchd, and that look
for NSWorkspaceDidMountNotification.
*[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self
selector:@selector(diskDidMount:) name:NSWorkspaceDidMountNotification
object:nil];*
-(void)diskDidMount:(NSNoti
On Sat, Nov 28, 2009 at 1:19 PM, Mr. Gecko wrote:
> Ok, I know your idea of a CGI Proxy like PHP CGI
That's not what I said. Did you read the link I gave you?
> On Nov 28, 2009, at 9:32 AM, Sherm Pendley wrote:
>
>> Keep in mind though, that I posted that nearly five years ago, and
>> wrote the
Consider a string constant, @"string", in source code that also
appears in the compiled unix executable file. If someone knew the
value of the string they could easily open the executable with
TextEdit, find the string, replace it with a perfectly functioning one
of their own making, and th
On Nov 30, 2009, at 9:17 AM, Nyxouf da ouf wrote:
Hi,
I have an Obj-c program who run as a daemon, using launchd, and that
look
for NSWorkspaceDidMountNotification.
*[[[NSWorkspace sharedWorkspace] notificationCenter] addObserver:self
selector:@selector(diskDidMount:) name:NSWorkspaceDidMo
I found something that said to use NSApplicationLoad() and it seems to work.
Nyxem.
On Nov 30, 2009, at 4:25 PM, Bill Garrison wrote:
>
> On Nov 30, 2009, at 9:17 AM, Nyxouf da ouf wrote:
>
>> Hi,
>>
>> I have an Obj-c program who run as a daemon, using launchd, and that look
>> for NSWorksp
While it may solve your problem, that's probably not a good idea.
NSApplicationLoad() loads the AppKit framework and its dependencies (like Input
Managers), which (when running as root) introduce a mess of security
vulnerabilities into your program (attackers can use your app to gain root
acce
Le 30 nov. 2009 à 16:25, Bill Garrison a écrit :
>
> On Nov 30, 2009, at 9:17 AM, Nyxouf da ouf wrote:
>
>> Hi,
>>
>> I have an Obj-c program who run as a daemon, using launchd, and that look
>> for NSWorkspaceDidMountNotification.
>>
>> *[[[NSWorkspace sharedWorkspace] notificationCenter] ad
So what is the right way to do this ?
Nyxem.
On Nov 30, 2009, at 4:37 PM, Jean-Daniel Dupas wrote:
>
> Le 30 nov. 2009 à 16:25, Bill Garrison a écrit :
>
>>
>> On Nov 30, 2009, at 9:17 AM, Nyxouf da ouf wrote:
>>
>>> Hi,
>>>
>>> I have an Obj-c program who run as a daemon, using launchd, an
On 30.11.2009, at 15:48, Richard Somers wrote:
> Consider a string constant, @"string", in source code that also appears in
> the compiled unix executable file. If someone knew the value of the string
> they could easily open the executable with TextEdit, find the string, replace
> it with a p
Using DiskArbitration framework that is Daemon safe.
Le 30 nov. 2009 à 16:51, Nyxem a écrit :
> So what is the right way to do this ?
>
> Nyxem.
>
> On Nov 30, 2009, at 4:37 PM, Jean-Daniel Dupas wrote:
>
>>
>> Le 30 nov. 2009 à 16:25, Bill Garrison a écrit :
>>
>>>
>>> On Nov 30, 2009, at
On Nov 30, 2009, at 12:41 AM, Kenny Leung wrote:
- Constants.h ---
extern const NSString *Suction;
- Constants.m ---
const NSString *Suction = @"Ball";
That should be:
extern NSString* const Suction;
and:
NSString* const Suction = @"Ball";
Th
I decided to write it like PHP CGI, it's working fine for me, and I'm able to
get all the information I need from the server by NSFileHandle and
NSProcessInfo. I did make that example project for an Objective-C module that
compiles the module for anyone who needs to write an Objective-C based mo
On Nov 29, 2009, at 10:01 PM, John Horigan wrote:
>
> On Nov 29, 2009, at 9:09 PM, Graham Cox wrote:
>
>>
>> On 30/11/2009, at 2:44 PM, Glenn McCord wrote:
>>
>>> What I'm expecting is the drawAtPoint method to draw nsString inside
>>> the bitmapRep of the NSContext at which point I can retri
is it possible to bend the pitch of a sound using AudioToolbox? how
can i accomplish a pitch bend of a live running sound?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Conta
On Nov 30, 2009, at 8:48 AM, Mr. Gecko wrote:
> I decided to write it like PHP CGI, it's working fine for me, and I'm able to
> get all the information I need from the server by NSFileHandle and
> NSProcessInfo.
Cool. If you find that performance is a problem, you should look into using
SCGI.
On Nov 30, 2009, at 9:04 AM, Chunk 1978 wrote:
> is it possible to bend the pitch of a sound using AudioToolbox?
Nope. For that you need to use AudioUnits; there's a built-in unit that will do
time/pitch shifting.
> how can i accomplish a pitch bend of a live running sound?
Basically you'd
On Mon, 30 Nov 2009 07:48:42 -0700, Richard Somers
said:
>Consider a string constant, @"string", in source code that also
>appears in the compiled unix executable file. If someone knew the
>value of the string they could easily open the executable with
>TextEdit, find the string, replace it with a
thanks. i'm going to check out apple's iPhoneMultichannelMixerText
sample code. i assume the sample code shows how to change volume for
each track (audio-in / volume / audio-out), so i'm hoping replacing
volume for a pitch shift won't be too difficult..
On Mon, Nov 30, 2009 at 12:14 PM, Jens Alf
On Nov 30, 2009, at 9:23 AM, Matt Neuburg wrote:
> If the app is code-signed, it will not run when the executable is altered.
In which case, the hacker just needs to strip the signature.
If your code checks for a signature, the hacker can re-sign it with his own.
If your code checks for your key
On Nov 30, 2009, at 10:23 AM, Matt Neuburg wrote:
If the app is code-signed, it will not run when the executable is
altered.
I could be wrong but I do not think this is the case. The
documentation states "Once you have signed your code, any change in
the code that you did not intend—whet
To remove all sublayers from a layer, it is sufficient to set that layer's
sublayers property to nil, so this code is completely unnecessary. But I'm
just curious as to why it doesn't work:
for (CALayer* sub in myview.layer.sublayers)
[sub removeFromSuperlayer];
This crashes as if the fast enum
Hi, all...
In various places in my app, I'd like to create labels that have the same
color, weight, and font size as the labels in default UITableView cells. For
example, I'd like to duplicate the appearance, especially the color, of the
textLabel and the detailTextLabel of the table cell with
Hi,
I'm doing bit-packing via a C function. Logging the bits of the C function
shows the expected result. If I create a string with a hex value format, I get
the correct hex string, but, if I try to put the bytes into an NSData object
with [NSData dataWithBytes: length], the order of the bits
Your modifying an array that is being enumerated, which is illegal.
--
David Duncan @ My iPhone
On Nov 30, 2009, at 2:23 PM, Matt Neuburg wrote:
To remove all sublayers from a layer, it is sufficient to set that
layer's
sublayers property to nil, so this code is completely unnecessary.
But
On Nov 30, 2009, at 12:23 PM, Matt Neuburg wrote:
> To remove all sublayers from a layer, it is sufficient to set that layer's
> sublayers property to nil, so this code is completely unnecessary. But I'm
> just curious as to why it doesn't work:
>
> for (CALayer* sub in myview.layer.sublayers)
>
On or about 11/30/09 11:33 AM, thus spake "David Duncan"
:
> Your modifying an array that is being enumerated, which is illegal.
I thought of that, of course, but I doubted that could be the reason,
because I changed the code to look like this:
NSArray* arr = [NSArray arrayWithArray: myview.laye
Is the crash due to an exception? Is anything printed to stdout?
I'll go out on a limb and say your view is layer-backed instead of
layer-hosted... ?
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator
The documentation for CFStringUppercase says:
locale
A CFLocale object that specifies a particular language or
region. Prior to Mac OS X v10.3, this parameter was an untyped
pointer and not used.
The locale argument affects
On Nov 30, 2009, at 11:27 AM, Brad Gibbs wrote:
> I'm doing bit-packing via a C function. Logging the bits of the C function
> shows the expected result. If I create a string with a hex value format, I
> get the correct hex string, but, if I try to put the bytes into an NSData
> object with
I guess it is. I had another issue that was preventing the code from working
properly. Another list member mailed me an explanation offline, causing me to
look for and find the real problem preventing my code from running.
Thanks for the response.
On Nov 30, 2009, at 12:22 PM, Jens Alfke w
On Nov 30, 2009, at 11:27 AM, Brad Gibbs wrote:
Hi,
I'm doing bit-packing via a C function. Logging the bits of the C
function shows the expected result. If I create a string with a hex
value format, I get the correct hex string, but, if I try to put the
bytes into an NSData object with
On a related, yet different note...
I run into this all the time where I need to iterate through an
NSMutableArray (or set, etc, etc) and remove some of the items. My normal
pattern has been this:
NSMutableSet *removeSet = [[NSMutableSet alloc] init];
for(NSObject *foo in myArray) {
if(needTo
Not that I'm advocating it, but you can also declare a field as @public to
allow you to access it via the -> operator. Of course, I could be missing
some compiler magic going on behind the scene as well, and it may not
actually be the same speed wise as @defs was.
Not to mention that it's just pl
On Nov 30, 2009, at 12:50 PM, Dennis Munsie wrote:
> Not that I'm advocating it, but you can also declare a field as @public to
> allow you to access it via the -> operator. Of course, I could be missing
> some compiler magic going on behind the scene as well, and it may not
> actually be the
You might take a look at the BaseTen framework
(http://basetenframework.org/). It claims to be a Core Data-like API
on top of PostgreSQL. I haven't used it myself but have been following
the project.
On Thu, Nov 26, 2009 at 6:53 PM, William Squires wrote:
> Hi all!
> Is there a way to back a Cor
On Nov 30, 2009, at 2:45 PM, Dennis Munsie wrote:
> I run into this all the time where I need to iterate through an
> NSMutableArray (or set, etc, etc) and remove some of the items. My normal
> pattern has been this:
>
> NSMutableSet *removeSet = [[NSMutableSet alloc] init];
> for(NSObject *foo
On 30-Nov-09, at 4:06 PM, Bill Bumgarner wrote:
On Nov 30, 2009, at 12:50 PM, Dennis Munsie wrote:
Not that I'm advocating it, but you can also declare a field as
@public to allow you to access it via the -> operator. Of course,
I could be missing some compiler magic going on behind the sc
On Mon, Nov 30, 2009 at 4:21 PM, Ken Thomases wrote:
> On Nov 30, 2009, at 2:45 PM, Dennis Munsie wrote:
>
> Some alternatives:
>
> * Iterate over the array just using an index, rather than fast enumeration
> (or NSEnumerator).
A safe way to do that is to iterate backwards, starting at the max
i
On Nov 30, 2009, at 1:33 PM, Ben Haller wrote:
> On 30-Nov-09, at 4:06 PM, Bill Bumgarner wrote:
>> On Nov 30, 2009, at 12:50 PM, Dennis Munsie wrote:
>>
>>> Not that I'm advocating it, but you can also declare a field as @public to
>>> allow you to access it via the -> operator. Of course, I co
Greetings,
CocoaHeads is an international Mac programmer's group. Meetings are
free and open to the public. We specialize in Cocoa, but everything
Mac programming related is welcome.
Upcoming meetings:
Australia
Sydney- Thursday, December 3, 2009 18:30.
Austria
Wien- Thursday, December 10,
On 30 Nov 2009, at 21:33, Ben Haller wrote:
> On 30-Nov-09, at 4:06 PM, Bill Bumgarner wrote:
>
>> On Nov 30, 2009, at 12:50 PM, Dennis Munsie wrote:
>>
>>> Not that I'm advocating it, but you can also declare a field as @public to
>>> allow you to access it via the -> operator. Of course, I
On Nov 29, 2009, at 9:52 AM, glenn andreas wrote:
> On Nov 29, 2009, at 9:38 AM, Symadept wrote:
>
>> How can I scale my button or Label to be able to accomodate the localized
>> string?
>
> That's the whole purpose of being able to localize the nib/xib...
Exactly. It's not possible to create
Quincey,
Thanks for the response. Shape is just a made-up example, but we can
say the entity that contains shape is Diagram for the purpose of
discussion. I am not sure what the mapping "DiagramToShape" would do.
Here's my problem in more concrete terms.
Let's say I have the entity mapping
On Nov 30, 2009, at 1:37 PM, Sherm Pendley wrote:
> A safe way to do that is to iterate backwards, starting at the max
> index and counting down to 0. That way, removing the item at the
> current index will only change the indexes of the items you've already
+1. I often use this idiom. You can d
On Nov 30, 2009, at 2:53 PM, Ricky Sharp wrote:
> Exactly. It's not possible to create a single nib such that its layout and
> control sizes will be appropriate for every language.
It's not impossible, it's just that it requires a very different approach,
which in turn makes it a lot harder t
On Nov 30, 2009, at 14:56, Yi Lin wrote:
> Let's say I have the entity mapping "DiagramToDiagram". And one of the
> property mappings is "shape". In the Relationship Mapping panel (the third
> column in the mapping model GUI), I set the KeyPath to "$source.shape". The
> question is what to put
On 30-Nov-09, at 5:52 PM, Mike Abdullah wrote:
On 30 Nov 2009, at 21:33, Ben Haller wrote:
What I want is essentially a struct with methods; I need super-fast
access to ivars for clients of the class in some places in my
code. But I also want functionality provided by the class itself
vi
Hi !
I have some trouble understanding this implementation:
- copyWithZone:(NSZone *)zone
{
ImageAndTextCell *cell = (ImageAndTextCell *)[super
copyWithZone:zone];
cell->image = [image retain];
return cell;
}
It is from the Apple's sample code.
First question is why there is no
On Mon, 30 Nov 2009 14:45:04 -0500, Dave Keck said:
>Is the crash due to an exception? Is anything printed to stdout?
No, that's part of what's so weird. If we were going to throw an exception,
I'd expect to see a coherent explanation in the log. However, the call chain
does show we're in somethi
2009/11/30 Mario Kušnjer :
> Hi !
>
> I have some trouble understanding this implementation:
>
> - copyWithZone:(NSZone *)zone
> {
> ImageAndTextCell *cell = (ImageAndTextCell *)[super copyWithZone:zone];
> cell->image = [image retain];
> return cell;
> }
>
> It is from the Apple's sample
> In most cases, yes. However, copyWithZone: is special, the superclass'
> implementation just blindly copies all of the raw bits in the source
> object to the newly created one. If you were to use the normal
> -setImage: call, that old value would be released one too many times.
> Assigning to the
cell->image is semantically identical to (*cell).image. That is, it's
directly accessing the instance variable "image" of the object "cell"
This part is what trouble's me.
cell->image = [image retain];
This could not be like this, right ?
[cell image] = [image retain];
Mario Kušnjer
mario.
Coca64 only:
recently our app has stopped responding to "odoc" apple events on startup.
that is, if the user double clicks a document of our app, and this causes the
app to launch, then the document is not opened. (cnr when app is already
launched). same story dropping the doc icon onto the a
On 01/12/2009, at 12:26 PM, Jeff Laing wrote:
>> In most cases, yes. However, copyWithZone: is special, the superclass'
>> implementation just blindly copies all of the raw bits in the source
>> object to the newly created one. If you were to use the normal
>> -setImage: call, that old value woul
Hello.
I'm trying to implement my custom NSView derived class to draw a chessboard
with chess pieces on it. I'm using Core Animation's CALayer classes since I
want to use animation with other effects later on.
Currently I have have Board and Piece classes, which both derive from CALayer.
Board
On 01/12/2009, at 12:30 PM, Mario Kušnjer wrote:
> This could not be like this, right ?
>
> [cell image] = [image retain];
No, because [cell image] returns a value, it does not set a value. You might
consider doing this though:
[cell setImage:image];
Clark is right that if the copy was a bi
Hey all,
I'm drawing a graphing line, looks like a wave within an NSView. The
line looks fine, except that it's not scaled to the size of the
window. So my problem is trying to figure out how to scale it to the
window size and every time that the window is resized.
I currently have something like
i see theres this NSAppleEventManager, and that with that you can "suspend" an
event and resume it later. i think this is what i want.
but how do I get my app to force all these events to get sent (and therefore
handled) on demand (before i go thru loading all the startup stuff)? i can
only s
On Mon, Nov 30, 2009 at 7:55 PM, Shane
wrote:
> Anyone see what I'm doing wrong here, or know how to get the
> NSBezierPath to take up 90% of my NSView (leaving 10% blank for
> borders which is what I tried to do below)?
You call concat before you apply the scale. Do the translate, scale,
and the
On 01/12/2009, at 12:55 PM, Shane wrote:
> I'm drawing a graphing line, looks like a wave within an NSView. The
> line looks fine, except that it's not scaled to the size of the
> window. So my problem is trying to figure out how to scale it to the
> window size and every time that the window is
On 01/12/2009, at 4:05 AM, Richard Somers wrote:
> I could be wrong but I do not think this is the case. The documentation
> states "Once you have signed your code, any change in the code that you did
> not intend—whether introduced accidently or by hackers—can be detected by the
> system." No
Thank you for your explanations, Clark, Jeff and Graham.
I think i will go now and read a C book (yes, I know I should have
read it by now) because it seems to me I have been missing something.
Bye
Mario Kušnjer
mario.kusn...@sb.t-com.hr
+385957051982
_
I'd imagine NSApp's delegate method -application:openFile: is what you
should be using, unless there's a reason you need to handle the raw
Apple event.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator
Hi,
I have a Carbon app that I am moving to Cocoa. In an attempt to do that, I
wrote code similar to this in the main function:
[NSApplication sharedApplication];
…
…
[NSApp run];
All the event handling in currently Carbon based. I was expecting problems
but after the changes, the app launche
I have read about this online, but I can't find a solution that (a)
works and (b) seems wise.
I'm trying to have my table immediately enable editing of added
items. The NSTableView is bound to an NSArrayController. I've
subclassed NSArrayController, and tried this first:
- (void)add:(id)s
> But the order of operations you apply to the transform is the reverse of what
> you might think will happen. One way to simplify the maths slightly is to
> generate the graph path using a fixed reference bounds of 1 x 1, located at
> the origin. Then you can directly use your view's size and p
Just adding the other methods for clarification.
- (void) drawAxes:(NSRect) rect
{
NSRect bounds = [self bounds];
NSBezierPath *path = [NSBezierPath bezierPath];
[path moveToPoint:NSMakePoint(0.1, 0.0)];
[path lineToPoint:NSMakePoint((bound
Thanks for all the feedback guys. I got it to work using the NSString
drawWithRect.
For the sake of all those who stumble across this thread, the code
used (minus lots of font and string code) is as follows...
unsigned char* bitmapData = 0;
NSBitmap
Sent from my iPhone
On Nov 30, 2009, at 17:26, Jeff Laing
wrote:
In most cases, yes. However, copyWithZone: is special, the
superclass'
implementation just blindly copies all of the raw bits in the source
object to the newly created one. If you were to use the normal
-setImage: call, th
On 01/12/2009, at 3:21 PM, Shane wrote:
> I'm trying to keep the stroke path
> the same size, even thought I resize and scale the entire NSBezierPath
> to the view size. Having a little trouble figuring out how to do this.
Instead of concatenating your transform to the current graphics context,
> > Why would you not just do:
> >
> >[cell->image retain];
> >
> > That makes it a lot clearer to me - since it was a bitwise copy,
> > cell->image and image are identical values whereas the assignment
> > looks like you are changing something.
>
> Because it may *not* have been a bitwise cop
yes i have that method. i'm just saying it is not being called in this case.
the event is never received by the app on startup.
if i double click the icon AFTER startup, it works fine.
On Nov 30, 2009, at 6:50 PM, Dave Keck wrote:
> I'd imagine NSApp's delegate method -application:openFile: is
On Mon, Nov 30, 2009 at 9:57 PM, Jeff Laing wrote:
>> > Why would you not just do:
>> >
>> > [cell->image retain];
>> >
>> > That makes it a lot clearer to me - since it was a bitwise copy,
>> > cell->image and image are identical values whereas the assignment
>> > looks like you are changing s
75 matches
Mail list logo