Thanks for the feedbacks -- makes total sense to me now. Yeah, I was
under the mistaken impression NSManagedObject's -validateForDelete was
something that would work for me to call before actually attempting
the delete. After actually performing a delete and save (based on my
toy example) I
> If Apple later on wants to change how it works
> internally so that the function returns a temporary object instead,
> well, too bad, can't!
Well, that's patently untrue. It can just return a temporary object with a
retain count of 1.
It comes down to a simple question of whether or not you a
> How about perl instead? (I don't think egrep is a fair test, it
> doesn't have to 'do anything' with the results, like create a new
> string from them). This is a rough perl equivalent of my original
> problem:
I guess that's the point I was trying to get across - the overhead of
creating all t
Karen van Eck wrote:
We have a lot of code in libraries in Applescript. Now starting to
look at using Cocoa to move forward, as we are really using
Applescript to pretty much its limit.
But it is not a short term solution to rewrite all our Applescript
libraries in Objective-C. We need to be ab
On Sat, Mar 14, 2009 at 6:11 AM, Paul Sanders wrote:
>> If Apple later on wants to change how it works
>> internally so that the function returns a temporary object instead,
>> well, too bad, can't!
>
> Well, that's patently untrue. It can just return a temporary object with a
> retain count of 1
Have you looked at OSAKit? It has methods for executing subroutines of
scripts without having to do that "initWithSource" hack.
You can find the header files here: "/System/Library/Frameworks/
OSAKit.framework/Versions/A/Headers/"
A couple of caveats about using it though. Subroutine names h
I happily used ActiveRecord
http://github.com/aptiva/activerecord/tree/master
Look how nice it is to connect:
NSDictionary * databaseConnectionInfo = [NSDictionary
dictionaryWithObjectsAndKeys:
@"127.0.0.1", @"host",
@"obama", @"user",
@"supersecretpassword", @"password",
@"databasename", @"da
I am a Cocoa expert, and I have been teaching myself Microsoft Managed
C++ (a language very different from ANSI/ISO standard C++) along with
Microsoft's CLR/CLI (.Net) frameworks.
I am still a novice with Managed C++ and .Net, but I have already
drawn some conclusions that were surprising t
On Mar 14, 2009, at 3:29 AM, Paul Sanders wrote:
I'm sorry Bill, but the more I hear about GC and in particular the
difficulties of using it with malloc'd memory the gladder I am not
to be
using it. I guess that one should not be surprised that it is
difficult to
retro-fit it in the way tha
On Sat, Mar 14, 2009 at 12:22 PM, Bill Bumgarner wrote:
> On Mar 14, 2009, at 3:29 AM, Paul Sanders wrote:
> GC is similar to Core Data. If you had a Core Data app on Tiger, there
> were numerous operations on Leopard that were significantly faster -- many,
> many times faster -- that you got fo
Hello all,
I was reading the "Number and Value Programming Topics for Cocoa"
section about decimal numbers and now I'm confused. If I want to use
the C interface rather than the NSDecimalNumber class, how do I
"instantiate" an NSDecimal struct? According to the "Foundation Data
Types Ref
On Mar 14, 2009, at 9:27 AM, Kyle Sluder wrote:
On Sat, Mar 14, 2009 at 12:22 PM, Bill Bumgarner wrote:
On Mar 14, 2009, at 3:29 AM, Paul Sanders wrote:
GC is similar to Core Data. If you had a Core Data app on Tiger,
there
were numerous operations on Leopard that were significantly faster
>> Well, that's patently untrue. It can just return a temporary object with
>> a
>> retain count of 1.
> No, it can't. I specified a Get function, where convention specifies
> that the caller does not own it. Even if Apple were willing to break
> with convention, such a change would cause every e
On 13 mar 2009, at 23.55, Ken Tozier wrote:
I would like to customize an NSToolbar to make it's tools wrap
rather than overflow, but I can't see any way to control the toolbar
height. Is there some way to do this? I've had a lot of practice
writing wrapping views but NSToolbar seems to be
I have a Main object which has:
- (void)add2Number: (NSNumber *)n;
{
self.sum += [ n intValue ];;// bound to TextField
self.count++; // bound to TextField and
ProgressIndicator
}
The UserInterface has a Start/Stop button which does (on St
> But, heck, if you think it will serve your product's time to market
> better by focusing on the innards than the directly customer facing
> bits and then playing catch-up when Apple significantly advances the
> state of the art of similar technologies, well... bully for you!
I believe I mentione
> Is anyone interested in an article or series of articles comparing and
> contrasting Managed C++ with Objective-C and CLI (.Net) with Cocoa ?
Yes, very much so. It would be good if you could post a notification to
this list when you have decided where to publish this. The Code Project
might
On Mar 14, 2009, at 11:28 AM, WT wrote:
I was reading the "Number and Value Programming Topics for Cocoa"
section about decimal numbers and now I'm confused. If I want to
use the C interface rather than the NSDecimalNumber class, how do I
"instantiate" an NSDecimal struct? According to the
On Mar 13, 2009, at 4:20 PM, Sean McBride wrote:
Hi all,
I'm trying to make a cheap, modal, indeterminate progress dialog, but
I'm having trouble animating the progress bar.
(Yes, I know this is only slightly better than the spinning wheel of
death. Yes, I know I should thread my long runnin
> So: what should be done?
1. Do the calculations in a sub-thread.
2. Test a 'please stop' variable each time round the loop in that thread.
3. Set this variable in the main thread when the user clicks the Stop
button.
4. To show progress, call performSelectorOnMainThread from the sub-thre
On Fri, 13 Mar 2009 14:23:37 +, Karen van Eck
said:
>We have a lot of code in libraries in Applescript. Now starting to
>look at using Cocoa to move forward, as we are really using
>Applescript to pretty much its limit.
>
>But it is not a short term solution to rewrite all our Applescript
>lib
Bill Bumgarner (b...@mac.com) on 2009-03-14 12:40 PM said:
>On Mar 14, 2009, at 9:27 AM, Kyle Sluder wrote:
>> On Sat, Mar 14, 2009 at 12:22 PM, Bill Bumgarner wrote:
>>> On Mar 14, 2009, at 3:29 AM, Paul Sanders wrote:
>>> GC is similar to Core Data. If you had a Core Data app on Tiger,
>>> th
Paul Sanders (p.sand...@dsl.pipex.com) on 2009-03-14 6:29 AM said:
>I'm sorry Bill, but the more I hear about GC and in particular the
>difficulties of using it with malloc'd memory the gladder I am not to be
>using it.
My unsolicited 2¢: :)
I am happy that the GC implementation keeps GC memory
You can also create NSDecimals using NSDecimalFromString().
--Luca C.
2009/3/14 Ashley Clark
>
> You can get an NSDecimal structure from any NSNumber or NSDecimalNumber
> object by sending it the -decimalValue message. As far as I know that's the
> only way to create one.
>
>
> Ashley
>
> ___
To bring this back around to the concrete...
First -- a very hearty and public THANK YOU to Sean for filing quality
bug reports that often include minimal examples. The community has
definitely benefited from your contributions to the bug database!
On Mar 14, 2009, at 11:17 AM, Sean McBrid
Hi,
retainCount is not in anyway useful when debugging - I had many cases
of rc > 5 with the object being gone the next instance. your error
sounds like you loose the image at some point in time. retain it and
use Instruments to see if you leak or over alloc.
Volker
Am 14.03.2009 um 01:2
Ah, right, sorry. I'm not saying the existing API would permit such a
change, more's the pity. All I'm saying (and I doubt that saying
this has
any value) is that it could, and in my opinion should, have been
done that
way in the first place.
It's very tempting to try to enforce this in a
I don't see NSDecimalFromString() in any of the docs or header files,
only NSDecimalString() to create strings. Where is that defined?
Ashley
On Mar 14, 2009, at 2:08 PM, Luca Pazzerello wrote:
You can also create NSDecimals using NSDecimalFromString().
--Luca C.
2009/3/14 Ashley Clark
I'm trying to parse an HTTP Post response using the following code.
The problem is that CFHTTPMessageAppendBytes always returns false.
I've tested by stripping down the response to just "HTTP/1.0 200 OK\r\n
\r\n" and still no go. Does anyone know what the appropriate response
format is?
I am trying to work out how to flash two rects in a frame. I have it
working with one rect using the view cacheImageInRect method but this
only works on one rect. I tried putting two such calls in serial but
the second one doesn't work for some (optimisation?) reason. Then I
tried copying and modi
Hello my name is Emiro Uribe and I am new to Cocoa. My system is OS X
10.4 and Xcode 2.5.
I am trying to make PDFView a source for drag and drop.
I would like to be able to drag the inner view into other applications.
I see that I can set it to be destination by setting
setAllowsDragging:YES,
The GC thread that is ongoing has been crossposted between cocoa-dev
and obj-c. Please do not do this.
Crossposting between cocoa-dev and other groups is not allowed.
Starting threads that are crossposted will cause your messages to be
moderated, and that will slow down posting.
Also, ple
Le 14 mars 09 à 21:24, Uribe Emiro a écrit :
Hello my name is Emiro Uribe and I am new to Cocoa. My system is OS
X 10.4 and Xcode 2.5.
I am trying to make PDFView a source for drag and drop.
I would like to be able to drag the inner view into other
applications.
I see that I can set it to b
On Mar 14, 2009, at 2:35 PM, Ashley Clark wrote:
I don't see NSDecimalFromString() in any of the docs or header
files, only NSDecimalString() to create strings. Where is that
defined?
It's part of Foundation, defined in NSDecimal.h.
On Mar 14, 2009, at 2:08 PM, Luca Pazzerello wrote:
Yo
I think a lot of that was aimed at me, although I didn't start the
cross-post.
Once again I'd like to apologise for cluttering up the list with irrelevant
chit-chat. That was not the intention and it's not as if it's going to
change anything, however valid or otherwise my opinion might be. I
Is it possible to set an HTML string on a UIWebView and have it resize
automatically to the right height, but NOT take up the entire screen?
I sure can't figure it out. I feel like the iPhone really HATES rich
text.
Here's what I've tried so far. Most of these are "Hail Mary" attempts,
wh
On Sat, Mar 14, 2009 at 1:29 PM, Paul Sanders wrote:
>> So: what should be done?
>
> 1. Do the calculations in a sub-thread.
>
> 2. Test a 'please stop' variable each time round the loop in that thread.
>
> 3. Set this variable in the main thread when the user clicks the Stop
> button.
Better
On Sat, Mar 14, 2009 at 6:55 PM, Keary Suska wrote:
> On Mar 14, 2009, at 2:35 PM, Ashley Clark wrote:
>
>> I don't see NSDecimalFromString() in any of the docs or header files, only
>> NSDecimalString() to create strings. Where is that defined?
>
> It's part of Foundation, defined in NSDecimal.h.
Wow. Don't you hate it when its staring you in the face and you still
can't see it.
Thanks.
On Mar 14, 2009, at 5:31 PM, Michael Ash wrote:
On Sat, Mar 14, 2009 at 5:17 PM, Greg Hoover
wrote:
I'm trying to parse an HTTP Post response using the following
code. The
problem is that CFHTTP
Use the NSDecimalNumber class (subclass of NSNumber) and create it
like you would any other NSNumber. Then use decimalValue to get the
NSDecimal struct from it. There is no NSDecimalFromString, only the
other way NSDecimalString. The only other way is to do it is manually
by setting the
I have a custom NSManagedObject class MyEntity. It works just fine.
However when I add an initializer and override the superclass's
designated initializer an error occurs.
[< MyEntity 0x1f3f70> valueForUndefinedKey:]: the entity (null) is not
key value coding-compliant for the key myAttribu
On Mar 14, 2009, at 8:02 PM, Richard Somers wrote:
I have a custom NSManagedObject class MyEntity. It works just fine.
However when I add an initializer and override the superclass's
designated initializer an error occurs.
[...]
{
[super initWithEntity:entity
insertIntoManagedObjec
On Sat, Mar 14, 2009 at 11:02 PM, Richard Somers
wrote:
> I have a custom NSManagedObject class MyEntity. It works just fine. However
> when I add an initializer and override the superclass's designated
> initializer an error occurs.
Not only should you not do this, if you do you really need to r
On Fri, Mar 13, 2009 at 11:21 PM, Peter Ammon wrote:
>
> I think you're saying that it's more convenient for you to work with a
> pointer than directly with an array. If so, another way you can defeat
> write barriers is with a cast to void*:
> void func(id *ptr) {
> ptr[0] = @"foo"; // <--- w
On Mar 15, 2009, at 1:50 AM, Michael Vannorsdel wrote:
The only other way is to do it is manually by setting the struct
members.
typedef struct {
signed int _exponent:8;
unsigned int _length:4;
unsigned int _isNegative:1;
unsigned int _isCompact:1;
unsi
This is also what I'm looking for.
I want to create a UIWebView with a frame size that will adjust itself
according to the contents of the HTML string, or even more simpler an
image.
Anybody have any experiences with this ?
Jesse Armand
(http://jessearm.b
Hello, all
I'm just curious about the naming convention for Core Graphics and
Foundation.
For example, NSMakeRect and CGRectMake are similar but different about
where the "Rect" is in its method name.
What is even worse is NSPointInRect and CGRectContainsPoint.
So, if a person is used to the
47 matches
Mail list logo