Hi
before I report this, I want to check, whether I misunderstood
something.
I've a window controller subclass with three outlets. Additional the
class owns to ivars, one of them typed id. These ivars are not marked
as outlet.
@interface GroupsWC : NSWindowController {
IBOutlet NSArr
On 21/08/2008, at 01.56, John C. Randolph wrote:
On Aug 20, 2008, at 4:15 PM, Torsten Curdt wrote:
There was a common perception that NULL is not really the same as
nil. But seems like in the end it really is (void*)0.
They differ in type, not in value.
"NULL" is (void *) 0.
"nil" is (
On 21 Aug 2008, at 09:06, Jules Colding wrote:
On 21/08/2008, at 01.56, John C. Randolph wrote:
On Aug 20, 2008, at 4:15 PM, Torsten Curdt wrote:
There was a common perception that NULL is not really the same as
nil. But seems like in the end it really is (void*)0.
They differ in typ
On Aug 20, 2008, at 7:54 PM, John Murphy wrote:
I have a Person class with name and image properties stored in an
array. When I access its properties from within the controller class
like this:
Person *person = [objectArray objectAtIndex:0];
[nameField setStringValue:person
haha gros malin why free (func) does this test?
arf sorry your trusting scale is going to zero
Not sure what you're trying to say. According to the C standard, given
a variable (foo) the following are identical:
if(foo == 0)
if(foo == nil)
if(foo == NULL)
if(!foo)
if(foo == '0')
and any oth
On 21/08/2008, at 09.21, Thomas Davie wrote:
On 21 Aug 2008, at 09:06, Jules Colding wrote:
On 21/08/2008, at 01.56, John C. Randolph wrote:
On Aug 20, 2008, at 4:15 PM, Torsten Curdt wrote:
There was a common perception that NULL is not really the same as
nil. But seems like in the
On 21 Aug 2008, at 04:03, Michael Ash wrote:
This hazard goes away if you turn on the appropriate warnings. I
compile all of my code with "-W -Wall -Wno-unused-parameter", and it
has caught much more than just this error over the years.
[getting slightly off topic]
Speaking as a battle-harde
On 20 Aug 2008, at 19:37, Ken Thomases wrote:
On Aug 20, 2008, at 12:42 PM, Dave wrote:
On Aug 20, 2008, at 6:05 AM, Dave wrote:
-(void) setFirstName:(NSString*)theNewValue
{
if (FirstName != theNewValue)
FirstName = [theNewValue copy];
}
The reason I did it like this in that ca
On Thu, Aug 21, 2008 at 12:21 AM, Thomas Davie <[EMAIL PROTECTED]> wrote:
>
> On 21 Aug 2008, at 09:06, Jules Colding wrote:
>
>>
>> On 21/08/2008, at 01.56, John C. Randolph wrote:
>>
>>>
>>> On Aug 20, 2008, at 4:15 PM, Torsten Curdt wrote:
There was a common perception that NULL is not
On Thu, Aug 21, 2008 at 12:39 AM, Jean-Daniel Dupas
<[EMAIL PROTECTED]> wrote:
>>>
>>> haha gros malin why free (func) does this test?
>>> arf sorry your trusting scale is going to zero
>>
>> Not sure what you're trying to say. According to the C standard, given
>> a variable (foo) the followi
Am 20.08.2008 um 22:54 schrieb Jesse Grosjean:
Does anyone know what the best way to parse form values from and
HTTP Post is?
I have a mini HTTP server in my app, and it needs to accept posts.
I'm using CFHTTP to implement the server, so I have a
CFHTTPMessageRef. I'm trying to figure ou
Le 21 août 08 à 10:06, Clark Cox a écrit :
On Thu, Aug 21, 2008 at 12:21 AM, Thomas Davie <[EMAIL PROTECTED]>
wrote:
On 21 Aug 2008, at 09:06, Jules Colding wrote:
On 21/08/2008, at 01.56, John C. Randolph wrote:
On Aug 20, 2008, at 4:15 PM, Torsten Curdt wrote:
There was a common pe
When the 'tab' or 'backTab' key is pressed, NSTextView accepts it as a
character to be typewritten. But sometimes I want NSTextView to
behave like an NSTextField, with 'tab' or 'backTab' selecting the next
or previous key view. So, in my NSTextView subclass, I over-ride -
keyDown: and re-i
Am 21.08.2008 um 04:07 schrieb Jesse Grosjean:
So now at least I have a more specific question. Is there any OS X
framework for decoding x-www-form-urlencoded, or sample code
floating around. I've found what I need in Java:
http://kickjava.com/src/java/net/URLDecoder.java.htm
And
Am Do,21.08.2008 um 08:58 schrieb Oleg Krupnov:
I need to make the design decision regarding how the model and the
views will be kept in sync with each other. Namely:
- I can use key-value coding and observing (KVC and KVO)
- I can use bindings (not sure if it's really different from the KVC/
Am Do,21.08.2008 um 09:54 schrieb Jules Colding:
On 21/08/2008, at 09.21, Thomas Davie wrote:
On 21 Aug 2008, at 09:06, Jules Colding wrote:
On 21/08/2008, at 01.56, John C. Randolph wrote:
On Aug 20, 2008, at 4:15 PM, Torsten Curdt wrote:
There was a common perception that NULL is
Am 21.08.2008 um 05:03 schrieb Michael Ash:
There was a common perception that NULL is not really the same as
nil. But
seems like in the end it really is (void*)0.
They differ in type, not in value.
"NULL" is (void *) 0.
"nil" is (id) 0.
"Nil" is (Class) 0.
This is true conceptually but
Hey Amin -
It's a compatibility feature that, I believe, dates from before the
existence of IBOutlet. All id typed ivars without a leading underscore
are available as outlets. There are similar rules for actions. I
For example, IB will treat any method with a single id typed argument
named
Am 21.08.2008 um 05:25 schrieb Clark Cox:
Not sure what you're trying to say. According to the C standard, given
a variable (foo) the following are identical:
if(!foo)
if(foo == '0')
YIKES!
(NULL == (char_type_t) 0x30 ) != ( NULL == '0' ) ?
C99 or C99 + C++98?
Regards,
Tom_E
Am Do,21.08.2008 um 10:51 schrieb Jon Hess:
Hey Amin -
It's a compatibility feature that, I believe, dates from before the
existence of IBOutlet. All id typed ivars without a leading
underscore are available as outlets. There are similar rules for
actions. I
For example, IB will treat an
Am Do,21.08.2008 um 10:47 schrieb Thomas Engelmeier:
Am 21.08.2008 um 05:03 schrieb Michael Ash:
There was a common perception that NULL is not really the same as
nil. But
seems like in the end it really is (void*)0.
They differ in type, not in value.
"NULL" is (void *) 0.
"nil" is (id)
Hey Jerry -
A couple of comments.
If you want to call super's super method, one way to do that is to put
a category on you super class with a method name that is unique that
invokes the selector you want on super. If that sounds evil, that's
because it is :). Calling super super is usually
On Thu, Aug 21, 2008 at 9:17 AM, Thomas Engelmeier
<[EMAIL PROTECTED]> wrote:
>
> Am 20.08.2008 um 22:54 schrieb Jesse Grosjean:
>
>> Does anyone know what the best way to parse form values from and HTTP Post
>> is?
>>
>> I have a mini HTTP server in my app, and it needs to accept posts. I'm
>> usi
Am 21.08.2008 um 11:04 schrieb Negm-Awad Amin:
Sometimes you see in source code something like this:
if( booleanVarOrExpression == YES )
(I think, Rentzsch does it that way, IIRC) and Ithink, that this is
simply correct.
Oh, that is another discussion.
Bool != Boolean != bool, and sometimes
On 21 Aug 2008, at 09:06, Clark Cox wrote:
This is not a "hack" or a "coincidence", this is by design. A non-NULL
pointer *is* a boolean expression that evaluates to true, just as a
non-zero integer is. Again, it doesn't work by coincidence, it is a
guarantee of the language standard.
To go off
Am Do,21.08.2008 um 12:25 schrieb Thomas Engelmeier:
Am 21.08.2008 um 11:04 schrieb Negm-Awad Amin:
Sometimes you see in source code something like this:
if( booleanVarOrExpression == YES )
(I think, Rentzsch does it that way, IIRC) and Ithink, that this is
simply correct.
Oh, that is an
Am 21.08.2008 um 13:25 schrieb Chris Holloway:
If you look at section 7.17 of ISO/IEC 9899:1999, then it states that
NULL is a macro which "expands to an implementation-defined null
pointer constant". So, what is a null pointer constant? Section
6.3.2.3 states that "An integer constant expressi
On Aug 21, 2008, at 4:47 AM, Thomas Engelmeier wrote:
Am 21.08.2008 um 05:03 schrieb Michael Ash:
There was a common perception that NULL is not really the same
as nil. But
seems like in the end it really is (void*)0.
They differ in type, not in value.
"NULL" is (void *) 0.
"nil" is (id)
On 21.08.2008, at 02:43, Torsten Curdt wrote:
On Aug 21, 2008, at 01:50, Ken Thomases wrote:
On Aug 20, 2008, at 6:15 PM, Torsten Curdt wrote:
I guess my questions wasn't phrased correctly. The point was more:
is 'nil' really the equivalent of 0 or NULL.
Let's put it this way: freshly a
On Aug 21, 2008, at 7:57 AM, Sam Mo wrote:
On Aug 21, 2008, at 4:47 AM, Thomas Engelmeier wrote:
Am 21.08.2008 um 05:03 schrieb Michael Ash:
There was a common perception that NULL is not really the same
as nil. But
seems like in the end it really is (void*)0.
They differ in type, not in
On 21.08.2008, at 06:10, mm w wrote:
great alignement
Great mail client on your end, more likely. For me, the source code
came across correctly indented.
But honestly, isn't it a bit childish to complain about the
alignment in a thread about something else?
Cheers,
-- Uli Kusterer
"T
So now at least I have a more specific question. Is there any OS X
framework for decoding x-www-form-urlencoded, or sample code
floating around. I've found what I need in Java:
http://kickjava.com/src/java/net/URLDecoder.java.htm
And while it's not that much code, it seems like the k
>> I suspect that it could be way easier, when a property's value
>> changes, to just explicitly send a concise and clearly named message
>> to the subscribed objects,
>
> This is, what is done. The name of the message is
> -observeValueForKeyPath:ofObject:change:context:
Then how is it better tha
On 2008 Aug, 21, at 2:07, Jon Hess wrote:
You may not know this, but when you edit an NSTextField, you're
actually typing into an NSTextView. So NSTextView already has all of
the logic to "act like a text field".
Of course I ^knew^ that, Jon. I'd heard the teacher say it. I just
didn't
Am Do,21.08.2008 um 15:22 schrieb Oleg Krupnov:
I suspect that it could be way easier, when a property's value
changes, to just explicitly send a concise and clearly named message
to the subscribed objects,
This is, what is done. The name of the message is
-observeValueForKeyPath:ofObject:cha
On Thu, Aug 21, 2008 at 6:47 AM, Negm-Awad Amin <[EMAIL PROTECTED]> wrote:
>
> Am Do,21.08.2008 um 12:25 schrieb Thomas Engelmeier:
>
>>
>> Am 21.08.2008 um 11:04 schrieb Negm-Awad Amin:
>>
>>> Sometimes you see in source code something like this:
>>> if( booleanVarOrExpression == YES )
>>> (I thin
On Thu, Aug 21, 2008 at 4:22 AM, Jerry Krinock <[EMAIL PROTECTED]> wrote:
> When the 'tab' or 'backTab' key is pressed, NSTextView accepts it as a
> character to be typewritten. But sometimes I want NSTextView to behave like
> an NSTextField, with 'tab' or 'backTab' selecting the next or previous
I generally am pretty good at web mining or hacking solutions to weird
cocoa things, but this one has me a bit puzzled.
I want to use groups in an NSOutlineView that is set up with Source
List highlighting. However, I am also using horizontal grid lines,
and for some reason the drawing of
Hi there,
has anybody successfully used NSNumberFormatter's new setLenient:
feature that was introduced with 10.5 together with one of the common
number styles like currency or percent? As usual, I want the formatter
to show a currency or percent symbol when turning numbers into strings
b
Hi,
I'm either overlooking something extremely simple here or I'm losing
my mind.
I have two NSString objects in a NSDictionary object that I am passing
to a class method in the form:
(int)validateUsersFor:(NSString *)username withEmailAddress:(NSString
*)email
Within the function, I
Hi there,
Is it possible to obtain the angle of rotation from a tranformation-
matrix created with CGAffineTransfrom?
Background:
I am building a simple kitchen-timer app, that should work like the
ones in your mom's kitchen:
You set the time by touching a control and rotating it. Now I woul
Why is it that when you set a CALayer property it's retain count increases +1 ?
eg.
CALayer * testLayer = [[CALayer alloc] init];
NSLog(@"test layer retain count:: %i", [testLayer retainCount]);
testLayer.frame = CGRectMake(0, 0, 30, 30);
NSLog(@"test layer retain count:: %i", [testLayer retainC
Try putting an * after both uses of "char".
CStrings (char arrays) are char pointers.
Dave
On Thu, Aug 21, 2008 at 6:42 AM, Stuart Green <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm either overlooking something extremely simple here or I'm losing my
> mind.
>
> I have two NSString objects in a NSDic
Am Do,21.08.2008 um 16:15 schrieb Michael Ash:
On Thu, Aug 21, 2008 at 6:47 AM, Negm-Awad Amin <[EMAIL PROTECTED]
> wrote:
Am Do,21.08.2008 um 12:25 schrieb Thomas Engelmeier:
Am 21.08.2008 um 11:04 schrieb Negm-Awad Amin:
Sometimes you see in source code something like this:
if( boolean
Thanks Amin for responding.
You are correct that there's no need to reinvent the wheel, and that's
exactly what I'd like to avoid, that's why I am now re-reading about
KVC/KVO and reconsidering it.
So, does everybody really always use KVC/KVO for implementing MVC, in
all projects? Is this the rec
Il giorno 21/ago/08, alle ore 15:42, Stuart Green ha scritto:
const char cUserName = [username UTF8String];
const char cEmail = [email UTF8String];
However, come the build, I get
warning: initialization makes integer from pointer without a cast
I thought I was doing e
On Thu, Aug 21, 2008 at 1:47 AM, Thomas Engelmeier
<[EMAIL PROTECTED]> wrote:
>
> Am 21.08.2008 um 05:03 schrieb Michael Ash:
>
There was a common perception that NULL is not really the same as nil.
But
seems like in the end it really is (void*)0.
>>>
>>> They differ in type, not in
mm w
The list isn't a quiz show. If you have an answer, please provide it
in full, perhaps with a bit of an explanation.
Otherwise you're risking moderation for offering little support (and
lots of confusion)
scott
[moderator]
On 20-Aug-08, at 9:15 PM, mm w wrote:
anyway I m going to
I did something like this:
NSString *file;
// Get all of the files in the source directory, loop thru them.
NSEnumerator *files = [[myFileMgr
directoryContentsAtPath:srcDirectory] objectEnumerator];
while(file = [files nextObject] ) {
if( [
it appears that mm w has left the list in the middle of this thread.
I think it's quite safe to assume there was more than a little
trolling on his part.
scott
[moderator]
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post a
Am Do,21.08.2008 um 16:41 schrieb Oleg Krupnov:
Thanks Amin for responding.
You are correct that there's no need to reinvent the wheel, and that's
exactly what I'd like to avoid, that's why I am now re-reading about
KVC/KVO and reconsidering it.
So, does everybody really always use KVC/KVO fo
Amin,
It is true that I am new to Cocoa, and although I find the
documentation really great and engaging, I have sort of difficulty
figuring out what technology is newer/more powerful/built on top of/
other technology.
In particular, would you explain me, in just two words, what are the
relations
Oleg,
by all means, go ahead with what you started and spend more time
learning about KVC/KVO.
Yes, this is used in many many projects and I personally would really
miss it if it wouldn’t be there. Actually, as you described yourself,
if it wouldn’t be there, you’d had to brew something s
On Thu, Aug 21, 2008 at 10:06 AM, Shaun Larkin <[EMAIL PROTECTED]> wrote:
> Why is it that when you set a CALayer property it's retain count increases
> +1 ?
The obvious reason is that something else (i.e., not your code) is
retaining it. Standard memory management requires that "something
else
Am Do,21.08.2008 um 17:03 schrieb Oleg Krupnov:
Amin,
It is true that I am new to Cocoa, and although I find the
documentation really great and engaging, I have sort of difficulty
figuring out what technology is newer/more powerful/built on top of/
other technology.
In particular, would you e
On Thu, Aug 21, 2008 at 7:06 AM, Shaun Larkin <[EMAIL PROTECTED]> wrote:
> Why is it that when you set a CALayer property it's retain count increases
> +1 ?
>
> eg.
>
> CALayer * testLayer = [[CALayer alloc] init];
> NSLog(@"test layer retain count:: %i", [testLayer retainCount]);
> testLayer.fra
Hi,
I'm trying to get the 10.4+ NSNumberFormatter to properly format a
basic decimal input in a table view. For whatever reason, I keep
getting either (1) an invalid format (which causes the formatter to
refuse the input) or (2) a formatted input, but without the 3-digit
grouping separato
thanks for the answer!
--- On Thu, 8/21/08, Shawn Erickson <[EMAIL PROTECTED]> wrote:
> From: Shawn Erickson <[EMAIL PROTECTED]>
> Subject: Re: CALayer retain count
> To: [EMAIL PROTECTED]
> Cc: Cocoa-dev@lists.apple.com
> Received: Thursday, August 21, 2008, 11:27 AM
> On Thu, Aug 21, 2008 at 7
On 8/21/08 10:15 AM, Michael Ash said:
>BOOL var = 2;
>if(var == YES)
>
>That if statement will evaluate to false, even though the value of
>"var" is conceptually true.
If only BOOL was bool we would not have this problem. :)
To the best of my knowledge, there is no compiler flag to catch
compar
On Aug 20, 2008, at 9:16 PM, Jeff Wilcox wrote:
I generally am pretty good at web mining or hacking solutions to
weird cocoa things, but this one has me a bit puzzled.
I want to use groups in an NSOutlineView that is set up with Source
List highlighting. However, I am also using horizonta
On Aug 21, 2008, at 6:56 AM, Tilman Bender wrote:
Is it possible to obtain the angle of rotation from a tranformation-
matrix created with CGAffineTransfrom?
If the CTM consists of only rotation and transform (or if it is scaled
and you know the scale values) then it should be possible to re
Hello:
I'm trying to pause, and then resume an animation that uses a
CATransform3D to set animate the zoom level of a layer. I want to be
able to pause the animation, but I can't figure out how to determine
the current scale factor of the layer at the time when the animation
is paused (us
On Aug 21, 2008, at 6:56 AM, Tilman Bender wrote:
Hi there,
Is it possible to obtain the angle of rotation from a tranformation-
matrix created with CGAffineTransfrom?
If you haven't applied any other transforms to your CGAffineTransform,
you could determine the rotation (in radians) via
On Aug 21, 2008, at 1:22 AM, Jerry Krinock wrote:
When the 'tab' or 'backTab' key is pressed, NSTextView accepts it as
a character to be typewritten. But sometimes I want NSTextView to
behave like an NSTextField, with 'tab' or 'backTab' selecting the
next or previous key view. So, in my
I don't think it is not possible.. but.. does anyone know how to?
Thank you.
Original Message
Subject:[Q] SFPreferenceView and authorize as admin?
Date: Wed, 20 Aug 2008 14:53:34 -0700
From: JongAm Park <[EMAIL PROTECTED]>
To: cocoa-dev
Hello, all.
Does any
On 8/21/08 7:46 AM, Paul Archibald said:
> NSString *file;
> // Get all of the files in the source directory, loop thru them.
> NSEnumerator *files = [[myFileMgr
>directoryContentsAtPath:srcDirectory] objectEnumerator];
> while(file = [files nextObject] ) {
>
On Aug 20, 2008, at 11:10 PM, Graham Cox wrote:
On 21 Aug 2008, at 5:13 am, Gerd Knops wrote:
That'd work, but I'd have to subclass NSWindowController for that
so I can add that property. Seemed to me that the above would not
be an uncommon pattern and there ought to be a more elegant way
You make a valid point. I think I will make that change.
This is not really what we actually do. I cut out most of the real
code to keep the example simple. The actual files we are looking for
are machine generated, and the user is not really involved in the
process at this point.
Paul
Wow, don't check the list for a few days and look what happens!
> After all, that's why nil (and Nil) exist at all,
> rather than just reusing NULL.
Actually nil exists at all because Objective-C was created *before* NULL was
in such standard use! (It may have always been part of stdio.h, don't r
Am Do,21.08.2008 um 06:10 schrieb Graham Cox:
On 21 Aug 2008, at 5:13 am, Gerd Knops wrote:
That'd work, but I'd have to subclass NSWindowController for that
so I can add that property. Seemed to me that the above would not
be an uncommon pattern and there ought to be a more elegant way
On Aug 21, 2008, at 10:12 AM, Negm-Awad Amin wrote:
Probably because the GoF prefers combination over (?) subclassing.
Subclassing always discloses parts of the implementation of a class.
("white-boxing") So generally it is a good idea, to look for
alternatives for subclassing, esp. delega
Am Do,21.08.2008 um 19:24 schrieb j o a r:
On Aug 21, 2008, at 10:12 AM, Negm-Awad Amin wrote:
Probably because the GoF prefers combination over (?) subclassing.
Subclassing always discloses parts of the implementation of a
class. ("white-boxing") So generally it is a good idea, to look f
Most of the authorizations question on this list have the same answer.
It's not and will never be possible to increase the rights of a
running process (for obvious security reasons). System Preferences
(your host process) run as the current user, so it cannot access
protected locations.
Ha
On Thu, Aug 21, 2008 at 10:40 AM, Negm-Awad Amin <[EMAIL PROTECTED]> wrote:
>
> Am Do,21.08.2008 um 16:15 schrieb Michael Ash:
>
>> On Thu, Aug 21, 2008 at 6:47 AM, Negm-Awad Amin <[EMAIL PROTECTED]>
>> wrote:
>>>
>>> Am Do,21.08.2008 um 12:25 schrieb Thomas Engelmeier:
>>>
Am 21.08.2008
I love answering questions that require an essay. So here is my essay.
I think my forthcoming Cocoa Design Patterns book does a good job of
explaining the patterns used to implement Cocoa and reused to implement Cocoa
applications. In particular, the book explains how techniques like Key
On Aug 20, 2008, at 10:22 AM, Sherm Pendley wrote:
On Wed, Aug 20, 2008 at 12:13 PM, R.L. Grigg
<[EMAIL PROTECTED]> wrote:
Now I want to modify TextEdit so I can display the filenames full
path in
the title bar of the document window instead of just the filename.ext
(because sometimes I ha
Hi John,
Try the layer's presentationLayer property. The presentationLayer is
the thing that is actually moving around and you should be able to get
'current' values from it (give or take a bit).
HTH,
-bd-
http://bill.dudney.net/roller/objc
http://www.pragprog.com/titles/bdcora
On Aug 21
On 8/20/08 11:06 PM, Michael Ash said:
>It is a little known fact that when passing NULL (and by extension nil
>or Nil) as a parameter to a vararg function, you *must* cast it to the
>appropriate pointer type to guarantee correct behavior.
>
>Interestingly, Apple's vararg methods which use nil as
Le 21 août 08 à 19:06, Scott Ribe a écrit :
Wow, don't check the list for a few days and look what happens!
After all, that's why nil (and Nil) exist at all,
rather than just reusing NULL.
Actually nil exists at all because Objective-C was created *before*
NULL was
in such standard use! (
Hi All,
I'm developing an Cocoa client application.As part of application logic , i
make the Webservice Call with XML data - which returns the XML file as
response which contains the HTML code for the special characters. While
sending the data i need to convert the special characters such as &,'
e
On Aug 21, 2008, at 1:55 PM, R.L. Grigg wrote:
Yes, that's a cool feature. But if I have three versions of
AppController.m up at once, it would be great to be reminded -- at a
glance -- which one is which, especially since I get so many
interruptions. So if the path was on the title bar, tha
On Aug 21, 2008, at 12:16 PM, JanakiRam wrote:
I'm developing an Cocoa client application.As part of application
logic , i
make the Webservice Call with XML data - which returns the XML file as
response which contains the HTML code for the special characters.
While
sending the data i need t
Hello,
I am creating NSDateFormatter programmatically, and I wish to parse
any type of date string within the user's locale -- for instance
"03/13/08" or "1:30PM March 13, 2008" would both be acceptable.
Unfortunately, NSDateFormatter seems to parse only one specific format
at a time. I w
On Thu, Aug 21, 2008 at 10:46 AM, Jean-Daniel Dupas
<[EMAIL PROTECTED]> wrote:
>
> Le 21 août 08 à 19:06, Scott Ribe a écrit :
>
>> Wow, don't check the list for a few days and look what happens!
>>
>>> After all, that's why nil (and Nil) exist at all,
>>> rather than just reusing NULL.
>>
>> Actua
Those are for URL encoding; I think he wants HTML entities. I can't
remember if there are Cocoa methods to do this, but you can use
CFXMLCreateStringByEscapingEntities() (since NSString * and
CFStringRef are toll-free bridged):
NSString *input = @"2 < 4";
NSString *output = (NSString
*)CF
>> Could you tell me which part of the standard states that NULL is 0.
> NULL *can* be 0, it isn't *necessarily* 0
It follows from the rules re conversions that it must be either 0, or 0 cast
to a pointer type. No value other than 0 is guaranteed to cast to the
machine's actual null address (wh
On Thu, Aug 21, 2008 at 11:56 AM, Scott Ribe <[EMAIL PROTECTED]> wrote:
>>> Could you tell me which part of the standard states that NULL is 0.
>
>
>> NULL *can* be 0, it isn't *necessarily* 0
>
>
> It follows from the rules re conversions that it must be either 0, or 0 cast
> to a pointer type.
O
On Thu, Aug 21, 2008 at 12:16 PM, Clark Cox <[EMAIL PROTECTED]> wrote:
> On Thu, Aug 21, 2008 at 11:56 AM, Scott Ribe <[EMAIL PROTECTED]> wrote:
Could you tell me which part of the standard states that NULL is 0.
>>
>>
>>> NULL *can* be 0, it isn't *necessarily* 0
>>
>>
>> It follows from the
> as long as, when
> __builtin_special_null_keyword_that_is_specific_to_my_compiler is
> converted to a pointer type, it becomes a null pointer.
And, if converted to integer type, it becomes 0. Right; I was certainly
talking about standard integer/pointer types, without compiler magic, which
must
On Aug 21, 2008, at 3:54 AM, Jules Colding wrote:
For that simple reason, I'd go for nil == foo every time.
Yes, and in general you should always do "if (CONSTANT == foo)" to
catch the potential "if (CONSTANT = foo)" error.
If your name is Yoda, then perhaps if (3 != x) reads naturally to
On Aug 20, 2008, at 9:31 PM, Marcel Weiher wrote:
I was swayed by the "nil == foo" arguments for a while, but my gut
kept tugging at me and now I have switched back to just if ( !foo),
or better (I prefer positive ifs), if (foo). Of course, if all the
if (foo) is protecting is a message-se
Folks,
For some reason, I am not able to figure this out. I want to draw a
scaled NSImage, but the edges of the image are not drawn, it seems
like the resizing actually clips the image.
I have an NSBitmapImageRep created from some data. I then create the
NSImage like this:
NSImage *image = [[N
On Thu, Aug 21, 2008 at 12:38 PM, Scott Ribe <[EMAIL PROTECTED]> wrote:
>> as long as, when
>> __builtin_special_null_keyword_that_is_specific_to_my_compiler is
>> converted to a pointer type, it becomes a null pointer.
>
> And, if converted to integer type, it becomes 0.
No, converting a pointer
On Thu, Aug 21, 2008 at 12:45 PM, Jim Correia <[EMAIL PROTECTED]> wrote:
> For the sake of completeness (I know Marcel knows the rule), if you are
> using the return value of a message send, the value will be undefined
> depending on return type when sending a message to nil. See the runtime
> doc
You're forgetting that null pointers *must* convert to 0, this is why
if(!foo) works. I think that would be the "Except as previously
specified.." part of what you quoted ;-)
--
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice
_
Hi David,
Could you post a complete test app? There's nothing in what you've
posted that looks problematic[1]. Also, what OS are you working on?
-Ken
[1]: well, except maybe that you're likely to see antialiasing on the edges.
Your problem looks more severe than antialiasing, though.
On Thu,
On Thu, Aug 21, 2008 at 1:23 PM, Scott Ribe <[EMAIL PROTECTED]> wrote:
> You're forgetting that null pointers *must* convert to 0,
Please show me where that is guaranteed.
> this is why if(!foo) works.
if(!foo) works because of:
From 6.5.3.3:
"The expression !E is equivalent to (0==E)."
if(foo
Hi Ken,
I can build a test app - give me a couple hours to put it together.
As for antialiasing, I thought that might be the problem, but I set
the image interpolation on the graphics context to
NSImageInterpolationNone and get the same results.
I am on Leopard 10.5.4 (this all has to work on Ti
On Aug 21, 2008, at 11:18 AM, Andy Lee wrote:
On Aug 21, 2008, at 1:55 PM, R.L. Grigg wrote:
Yes, that's a cool feature. But if I have three versions of
AppController.m up at once, it would be great to be reminded -- at
a glance -- which one is which, especially since I get so many
interr
Vancouver - Senior Mac Developer With Multimedia Experience @
macProVideo.com
Company: macProVideo.com
Location: Vancouver, BC, CANADA
Description:
macProVideo.com, a leading global publisher of software tutorial-
videos, requires a Senior Mac Developer with experience creating
Multimedia
1 - 100 of 154 matches
Mail list logo