Hi lists, I'm cross posting because this was already discussed in both
lists, sorry for that.
I'm looking the the Debug & Profile libraries that have been discussed
here http://lists.apple.com/archives/cocoa-dev/2008/Mar/msg01098.html
and http://developer.apple.com/mac/library/technotes/tn2
Many thanks for the reply, Martin, much appreciated. I'm testing on Snow
Leopard (and in fact things have got significantly slower on Snow Leopard, it
seems, for my particular case).
Previously I was using the shouldChangeTextInRange and textDidChange text view
delegate methods to calculate the
On 1 Oct 2009, at 22:09, Jens Alfke wrote:
On Sep 30, 2009, at 1:32 PM, jonat...@mugginsoft.com wrote:
I intend to send off my bit of data, hang around ( <= 30 secs) to
get notification and then close everything.
Why do you need to wait at all?
—Jens
Sorry the slow response.
My app us
On 2 Oct 2009, at 02:37, Colin Howarth wrote:
Thanks everyone!
The idiot savant was first to point out the http://macresearch.org/cocoa-scientists-part-xxvi-parsing-csv-data
link. And that one refers also to the cocoadev site.
As a warning, that particular bit of code is pretty inefficient
On Oct 2, 2009, at 6:34 AM, Mike Abdullah wrote:
inefficient due to its use of NSMutableCharacterSet.
Could you expand on this? Once created and manipulated, what makes
it slow for string scanning compared to NSCharacterSet? I hadn't heard
this.
--
I.S.
___
Stephen J. Butler wrote:
On Thu, Oct 1, 2009 at 10:31 PM, Colin Howarth
wrote:
NSStringEncoding *enc;
NSError *error;
NSString *file = [NSString
stringWithContentsOfFile:@"/Users/colin/developer/Trace/glass.csv"
usedEncoding:enc error:&error];
The way you pass "enc" is
I'm creating it like this:
slider = [slider initWithFrame:NSMakeRect(x, y, sliderWidth,
sliderHeight)];
[slider setCell:[[BWTransparentSliderCell alloc] init]];
but it looks strange like this:
Am I doing something wrong?
Thanks for help.
___
While using this code in an experimental project I found the app was
routinely using 500+ MB of RAM. When measured with Instruments I
realised that every time you use a character set for string scanning,
Foundation internally copies it, presumably to ensure it has an
immutable object to wor
Before I go through the 550,000 hits (some of them quite old) dare I
ask if there's one Right Way (TM) to parse this sort of data?
I'm not aware of one Right Way (™) here.
If you're stuck due to somebody else's decision to use CSV, libcsv is
a potential option.
http://sourceforge.net/proje
that sounds plausible, there are more than one attributes... I
don't know the name of the element, just that part of the name is
"nol" and that i don't want the one called "cmpb nol"...
which makes it difficult, but you gave me something i can experiment
with to see if i can see tha
On Oct 2, 2009, at 7:42 AM, Mike Abdullah wrote:
While using this code in an experimental project I found the app was
routinely using 500+ MB of RAM. When measured with Instruments I
realised that every time you use a character set for string
scanning, Foundation internally copies it, presu
On Oct 2, 2009, at 6:10 AM, I. Savant wrote:
On Oct 2, 2009, at 7:42 AM, Mike Abdullah wrote:
While using this code in an experimental project I found the app
was routinely using 500+ MB of RAM. When measured with Instruments
I realised that every time you use a character set for string
Hi,
Looking at this again, would NSLayoutManager's
-textStorage:edited:range:changeInLength:invalidatedRange:
method be a good candidate for overriding to add temporary attributes? The text
storage calls this whenever it's edited and provides it with the new range of
characters. So it seems th
Martin,
I am actually working on an identical app (as far as your description
goes), as a way of learning CoreData, but also to have something to
organize my todos and reminders in...
I am dealing with the same problem you describe below, though I took a
slightly different approach. I bin
On Oct 2, 2009, at 4:05 AM, Gregory Weston wrote:
While we're at it, the values of enc and error are (effectively)
nondeterministic before the message send. The documentation for the
method you're invoking doesn't specify what it'll put into the
encoding argument on failure or into the err
On 10/2/09 10:02 AM, Aurélien Hugelé said:
>Hi lists, I'm cross posting because this was already discussed in both
>lists, sorry for that.
Please don't cross post.
>I'm looking the the Debug & Profile libraries that have been discussed
>here http://lists.apple.com/archives/cocoa-dev/2008/Mar/msg
On Fri, 02 Oct 2009 07:05:37 -0400, Gregory Weston said:
>Stephen J. Butler wrote:
>
>> On Thu, Oct 1, 2009 at 10:31 PM, Colin Howarth
>> wrote:
>>>NSStringEncoding *enc;
>>>NSError *error;
>>>
>>>NSString *file = [NSString
>>> stringWithContentsOfFile:@"/Users/colin/devel
Hi all,
The documentation does not discuss this as all, as far as I have
looked through it. Googling brings up nothing. So I am wondering: is
anyone doing this? Any caveats?
I can live without it, but it would make what I am doing easier if I
could subclass it.
TIA,
F
__
On Oct 2, 2009, at 10:08 AM, Stamenkovic Florijan wrote:
The documentation does not discuss this as all, as far as I have
looked through it. Googling brings up nothing. So I am wondering: is
anyone doing this? Any caveats?
With a few exceptions (NSObject, NSFormatter, NSProxy, NSOperation,
On Oct 02, 2009, at 12:17, Nick Zitzmann wrote:
On Oct 2, 2009, at 10:08 AM, Stamenkovic Florijan wrote:
The documentation does not discuss this as all, as far as I have
looked through it. Googling brings up nothing. So I am wondering:
is anyone doing this? Any caveats?
With a few excep
I've just been using NSXMLParser for the first time. Can Excel files
be saved in XML format? If so, would NSXMLParser be a possible
solution here?
dkj
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or mode
On Fri, Oct 2, 2009 at 11:27 AM, DKJ wrote:
> I've just been using NSXMLParser for the first time. Can Excel files be
> saved in XML format? If so, would NSXMLParser be a possible solution here?
XML isn't a format, per se. It's a structured markup language. The
actual layout of the data (the sc
When I run my app in the iPhone simulator the view seems to be shifted
up on the screen. If that doesn't make sense I've uploaded some
images. Take a look and see if you've run into this before.
http://projects.sticksnleaves.com/iphonedev/ib.png
http://projects.sticksnleaves.com/iphonedev/si
I believe -[UIScreen applicationFrame] returns different values for
phone and simulator in OS 3.0. From your screenshots I have no idea if
that's your problem though. Did you layout your view in IB or did you
do that programmatically?
Best to set a breakpoint where you position your content
On Oct 2, 2009, at 2:50 AM, jonat...@mugginsoft.com wrote:
Seems that by the time I get the IOKit sleep notification my Bonjour
service has already disconnected so my packets end up going nowhere
anyway.
How exactly is your Bonjour service implemented? Bonjour itself only
does service di
I don't do any size or position calculations. I just set the view. I
don't do anything fancy. This is the only area of the code I mess with
the view.
On Oct 2, 2009, at 3:51 PM, Hank Heijink (Mailinglists) wrote:
Doesn't look like the relevant code to me: I see no size or position
calculat
Hmm I have a few comments:
It look like you're seeing the superposition of two problems that look
like one:
1) The status bar is covering up the very top of your view in the sim
2) The bottom button is 20px further from the bottom in the sim
The interface builder likes to make views defaul
On Oct 2, 2009, at 4:05 AM, Gregory Weston wrote:
It would be a good idea to get into the habit of initializing your
local variables at the point of declaration.
At the risk of starting a religious debate, I disagree. It makes the
code somewhat bigger and slower, and worse, it can mask uni
Sorry, I just reread your previous message. I layout the view in IB. I
load the view programmatically. I'm also using the 3.1 simulator.
On Oct 2, 2009, at 3:52 PM, Anthony Smith wrote:
I don't do any size or position calculations. I just set the view. I
don't do anything fancy. This is the
I'm not quite sure where to look for this. I need to put a lock on the
CDRom drive so that it cannot be ejected for a certain amount of time.
Could someone point me to the correct documentation or even the
framework involved?
Thanks
-B
___
Cocoa-
Yes, thanks Mike (and all others). My particular table is only around
100 x 100 cells, so Drew's code is fine.
Regarding the efficiency points raised in these posts, perhaps
Stephen's pointer
libcsv is a potential option. http://sourceforge.net/projects/
libcsv/
is a good idea. CSV isn'
Hm, I opted to set the view's programmatically rather than through a
controller so I could control what view is initially displayed
depending on the device (iPhone, iPod, etc.). I'm assuming I will be
able to achieve something like this even when using view controllers?
On Oct 2, 2009, at 3
Here is something I use that has worked for me fairly well. I found it
either on this list or somewhere on the web, so sharing back to the
list.
http://pastie.org/639863
On Oct 2, 2009, at 3:03 PM, Colin Howarth wrote:
Yes, thanks Mike (and all others). My particular table is only
around
On Oct 2, 2009, at 4:03 PM, Colin Howarth wrote:
CSV isn't *that* hard to parse, once you know about quotes and NLs
inside cells.
... and encodings and line endings. Don't forget how much goodness
Cocoa gives you automagically. :-)
--
I.S.
___
On Oct 2, 2009, at 4:15 PM, Alex Kac wrote:
Here is something I use that has worked for me fairly well. I found
it either on this list or somewhere on the web, so sharing back to
the list.
http://pastie.org/639863
This appears to be the code listing from the article I mentioned on MacRe
On 2 Oct, 2009, at 07:36, Stephen J. Butler wrote:
On Thu, Oct 1, 2009 at 10:31 PM, Colin Howarth
wrote:
NSStringEncoding *enc;
NSError *error;
NSString *file = [NSString
stringWithContentsOfFile:@"/Users/colin/developer/Trace/glass.csv"
usedEncoding:enc error:&error];
Yes! In any case, I'm sure libcsv is more powerful and correct, but
the category there worked for my purposes working with several cloud
services.
On Oct 2, 2009, at 3:16 PM, I. Savant wrote:
On Oct 2, 2009, at 4:15 PM, Alex Kac wrote:
Here is something I use that has worked for me fairly
On Oct 2, 2009, at 4:19 PM, Alex Kac wrote:
Yes! In any case, I'm sure libcsv is more powerful and correct, but
the category there worked for my purposes working with several cloud
services.
You need only address quoted fields, line breaks within fields,
respect character encodings, and
On 2 Oct 2009, at 20:50, Jens Alfke wrote:
On Oct 2, 2009, at 2:50 AM, jonat...@mugginsoft.com wrote:
Seems that by the time I get the IOKit sleep notification my
Bonjour service has already disconnected so my packets end up going
nowhere anyway.
How exactly is your Bonjour service impl
it means both.
the animations will start at the commit
and the animations will have the same duration.
Is this unclear in the doc?
On Sep 28, 2009, at 7:07 AM, Gabriel Zachmann wrote:
I am trying to learn about the Core Animation framework.
One thing I am still a bit unclear about is the ex
On Sep 28, 2009, at 12:48 PM, David Melgar wrote:
The Spotlight seem to talk exclusively about talk about searching
metadata. But what about the data itself? When I use Spotlight, it
finds references within the content of documents not just their
metadata.
When writing an importer, what
On Sep 28, 2009, at 3:12 AM, Kyle Sluder wrote:
Do you mean I should avoid using blocking animations and only use
non-blocking? Never tried to use animator proxies, only NSAnimation
directly, so I don't know if the proxies are blocking or non-
blocking.
The animator proxies are related to Co
On a standard Cocoa Document based project, I want to add a new
window object/instance on startup (similar to adding a preference
panel, but a permanent offscreen window)
as an experiment, i did this below with a new onScreen window:
i get the new window to load alright on start up, but
Not sure if this matters but when I run the view from IB the view
looks fine. However, when I run my application from Xcode it shifts
everything up. Just thought I'd put that out there.
On Oct 2, 2009, at 4:08 PM, Anthony Smith wrote:
Hm, I opted to set the view's programmatically rather tha
Views shouldn't be drawn to the full height of 480 unless you intend
to hide the status bar. The application window extends behind the
status bar, so if you add a view to the window with frame.origin.y =
0.0, it will be behind the status bar. Unless you're hiding the status
bar, your view's
Beautiful! That did it!
- (UIView *)determineView {
Device device = [DeviceDetection currentDevice];
if (device == IPOD_1G || device == IPOD_2G || device == UNKNOWN) {
[self setViewController:[[UIViewController alloc]
initWithNibName:@"UnsupportedDeviceView" bundle:[N
On Oct 2, 2009, at 2:30 PM, Anthony Smith wrote:
if (device == IPOD_1G || device == IPOD_2G || device == UNKNOWN) {
[self setViewController:[[UIViewController alloc]
initWithNibName:@"UnsupportedDeviceView" bundle:[NSBundle
mainBundle]]];
This seems like a bit of brute force...
I have a window and controller that get instantiated per-document, and
there's some confusion when multiple documents are open as to which of
these windows belongs to which document.
I'm considering changing it to behave like an inspector window, where
a single window changes its content to
Keith,
If your custom attributes modifies just the graphics state (don't
affect the layout), you can override -[NSLayoutManager
showPackedGlyphs:length:glyphRange:atPoint:font:color:printingAdjustment
:].
The method is the bottleneck for calling CG APIs. You can query the
text attribute
Do I understand correctly that using NSHTTPCookieStorage I can read
cookies received by browsers on Mac.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moder
On Oct 2, 2009, at 4:44 PM, David Blanton wrote:
Do I understand correctly that using NSHTTPCookieStorage I can read
cookies received by browsers on Mac.
Since browsers are free to implement cookies in any way they want, not
all of them use the class. Safari & WebKit-based browsers use it
On Oct 2, 2009, at 15:20, Rick Mann wrote:
I have a window and controller that get instantiated per-document,
and there's some confusion when multiple documents are open as to
which of these windows belongs to which document.
I'm considering changing it to behave like an inspector window,
You might want to look into the OmniInspector framework. We use it in
all of our apps. While it's not for the faint of heart, you might
find it usefull nonetheless. http://github.com/omnigroup/omnigroup/
--Kyle Sluder
___
Cocoa-dev mailing list (Coco
I would look at DiskArbitration. Don't know if there is something to
do this, but if there is, it is here.
Maybe DARegisterDiskEjectApprovalCallback() may do the trick ?
Le 2 oct. 2009 à 21:58, Bryan Matteson a écrit :
I'm not quite sure where to look for this. I need to put a lock on
the
DARegisterDiskEjectApprovalCallback
Actually, that's perfect. It's a better idea than where I was heading.
This way, I can still allow the disk to eject but just do some cleanup
before hand. I don't know how I missed that, I use DA for appeared and
disappeared notifications currently.
Th
Hi Aki,
Many thanks for your reply, much appreciated. Would you mind giving me a little
more information on how to override this method? The docs are a little sparse
in this regard. For instance, if I try passing a different colour into super's
method, it has no effect; instead, it seems that I
Is there a way to do an asynchronous fetch request against Core data
returning partial results?
The only means I've found to fetch is via the [ManagedObjectContext
executeFetchRequest] method.
And there does not seem to be a way to retrieve partial results. In
the Core Data Programming Guid
The font and color attributes are just hint for the settings already
applied to the current graphics context.
You can do:
NSGraphicsContext *context = [NSGraphicsContext currentContext];
[context saveGraphicsState];
[yourCustomColor set];
[super showPackedGlyphs:...];
[context restoreGraphi
I'd like to populate the contents of a sub menu on an item of a menu
in my menu bar, using bindings. But I don't see an obvious way to do
this. Even if I could, I don't know how to invoke an action in my code
and know which object in the submenu was selected.
Is this even possible?
Thanks!
I second the previous poster's opinion: view controllers are
definitely the way to go here. They'll let you take care of rotation
and plenty of other stuff: read the view controller programming guide.
Using a view controller gives you many more places to customize what
happens.
There's vi
On Thu, Oct 1, 2009 at 7:09 PM, Colin Howarth wrote:
> Hi,
>
> I'd like my app ('tis progressing steadily :-) to read some simple tabular
> data. The original file is from Excel, but it's not too much bother to
> convert it to CSV.
>
> Searching the developer docs gets me
>
> "gestaltGraphicsVers
I'm fairly new to Core Data but I do believe that when tieing an
NSFetchedResultsController with an NSManagedObjectContext and an
NSTableViewController, (yes, this is an iPhone example) indeed, results for
the NSTableView are retrieved lazily, ie: as necessary.
I do not know how this is implemente
On 2009 Oct 02, at 18:22, Rick Mann wrote:
I'd like to populate the contents of a sub menu on an item of a menu
in my menu bar, using bindings. But I don't see an obvious way to do
this. Even if I could, I don't know how to invoke an action in my
code and know which object in the submenu w
I have an NSStepper with maxValue bound to myarr...@count, minValue
fixed at 1.
value bound to myArrayController selectionIndex and a
PlusOneTransformer.
Works fine.
Also an NSTextField with value bound to myArrayController
selectionIndex and a PlusOneTransformer.
Looks also ok.
But wh
64 matches
Mail list logo