thank you! Jens.
sorry, I can't found example of "don't create a temporary file".
but, I can found "Re: Open safari and send post variables" :
http://www.cocoabuilder.com/archive/message/cocoa/2006/6/9/165322
it's using temporary file.
( it's not work in leopard, because of POST'argument is not
Hi all:
I have two questions, pls help me
1.
When i implement printing with cocoa,
an NSPrintOperation object is created to control the print operation (see
the NSPrintOperation class description for details).
NSPrintOperation * printOp = [NSPrintOperation
printOperationWithView:viewToPrint printI
Obviously this is less efficient than mapping which is why mapping is
still around. But it's kinda the only other option when mapping and
FS operations won't protect your mapped file. My point was that the
program and system will still run under heavy memory consumption,
albeit slowly. J
Hi,
If a combo box is using a Data Source, then how do i
programatically get the number of items in that combo
box ? If i use [self
numberOfItemsInComboBox:myComboBox], it says
*** -[NSComboBoxCell objectValueOfSelectedItem] should
not be called when usesDataSource is set to YES
My question is,
Hello,
I have an NSDocument based application with multiple
NSWindowControllers that visualize different aspects of the document.
One is the "main" view and this is the only one that should be visible
by default. The question is how does one do that?
When I create all window controllers
On 13 May '08, at 8:57 PM, Michael Vannorsdel wrote:
I actually tested this a month back and not all operations/programs
respect link counts nor does the system appear to enforce them. For
instance an rm -f will destroy the file regardless of link count, as
well as some obscure APIs. Aft
On 13 May '08, at 9:39 PM, Michael Vannorsdel wrote:
If there's some pages of your data you haven't touched in a while
the system will swap those out and use the physical pages for
something that needs them.
Yes, but it's less efficient than a mapped file, which doesn't have to
be swappe
If you want to POST a form, don't create a temporary file to make
Safari do it! Just use NSURLConnection to send the request yourself.
—Jens
smime.p7s
Description: S/MIME cryptographic signature
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
I don't know specifically about the .qtz file, but you can create a
plist programmatically from an NSDictionary rather trivially using the
writeToFile:atomically: method.
Cheers,
Brett
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Pleas
For more information you can read up on Time Profiling in the Shark
user manual, and specifically Windowed Time Facility (WTF).
Somewhere along the way someone ate my links. Thanks a lot, anonymous
gremlin. :)
Time Profiling: http://developer.apple.com/documentation/DeveloperTools/Conceptu
Hi Andrew,
I did think about that.
I've poked around in Contextual Menu Items and Input Methods folders
and can't find anything there. I don't have LCC installed, and I
avoid installing anything that uses APE. I have just had a quick
check and can't see any evidence that APE has been ins
In any case, I'll definitely be filing a radar next time it
happens. Problem is, it's next to impossible get a repro the
problem given the number of variables (environment, SCM, project,
the file itself, and whatever UI actions/history that led up to that
point), so we come back to the str
I suggest reading in the entire file into your NSData with
initWithContentsOfFile: if there's a significant chance of file
modification. I know this sounds like a huge memory usage but this
way you can know your data is static and the system is designed to
handle high memory usage programs
Hi All,
I am newb in quartz. when we right-click on .qtz file open with
PLIST editor we get PLIST file, which lists its all nodes and properties. And I
wanted to convert PLIST file to .qtz file programmatically. (I don't wanna use
quartz composer to do this.) My final aim to create
Hi, Brett,
Is it possible that you have any haxies, or any Input Managers, of any
sort installed? Logitech Control Center, for instance, or perhaps
APE? That's the only thing that I could think of that might be
yielding such a crash.
Cheers,
Andrew
On May 13, 2008, at 9:21 PM,
John:
Check this out:
http://developer.apple.com/documentation/Cocoa/Conceptual/Documents/Articles/MultiDocument.html#/
/apple_ref/doc/uid/TP40003382
Hope that helps. The developer documentation is your friend :)
Omar Qazi
Hello, Galaxy!
1.310.294.1593
On May 13, 2008, at 8:56 PM, John Joyce
Hi,
I'm having a rather weird crash in a Cocoa application. If I control-
click on a window, my application crashes instantly. If I right
click, it doesn't (and indeed my rightMouse method is eventually
called as I want it to be).
I've tried enabling zombies, but that doesn't catch anyth
Also I should add, I've yet to find a way to protect a file from
editing or deletion on OS X that can't just be ignored by something
else. Things like flock appear to be optionally supported and not
globally enforced. As long as a way exists to get around any kind of
file lock there's no
I actually tested this a month back and not all operations/programs
respect link counts nor does the system appear to enforce them. For
instance an rm -f will destroy the file regardless of link count, as
well as some obscure APIs. After the file was removed the mapping
program crashed wh
Does anybody have any code samples or tutorials on opening/saving
documents with conditional handling for different file types?
Conceptually, handling the content is not a problem. The thing I'm
not sure about is how to hook up a document-based app to handle
additional file types but with the
This code worked for me -- with one change: the NSRect from [screen
frame] has the offset set to it's relative location to the main
display. This is what was throwing me off the entire time :) By
setting the offset to 0,0 I was able to get a visible full screen
window.
BTW -- not that it matters
On May 13, 2008, at 5:41 PM, Roland King wrote:
Can someone expand on this a little more please and fill in some
blanks about why the first version isn't KVO compliant and what it
is about the second one which makes KVO work? That second piece of
code
[ [ self mutableArrayValueForKey:@"
On May 12, 2008, at 11:01 PM, Jens Alfke wrote:
On 12 May '08, at 8:15 PM, Ben Lowndes wrote:
I'm a cocoa newbie, so I may be missing something obvious here: I'd
like to get a list of open windows for all currently running
applications.
Nothing personal, but people seem to ask this questio
On Tue, May 13, 2008 at 8:41 PM, Roland King <[EMAIL PROTECTED]> wrote:
> Can someone expand on this a little more please and fill in some blanks
> about why the first version isn't KVO compliant and what it is about the
> second one which makes KVO work?
KVO requires that you use the supplied -mu
hi~ all!
because of security, we can't use GET method ( remain of browser history )
I make temp file like this, ( after 5 sec, it's deleted.)
and call like this,
[[NSWorkspace sharedWorkspace] openURL:[NSURL fileURLWithPath:bridgeFile]];
it's well done in tiger, but leopard is not.
I fou
On May 13, 2008, at 6:41 PM, Christopher Nebel wrote:
On May 13, 2008, at 6:10 PM, R.L. Grigg wrote:
Im using Xcode 3.0 and building a Foundation Tool (debug, PPC). The
base SDK path is $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk and Ive
included Foundation.framework in the project under "External
On May 13, 2008, at 6:10 PM, R.L. Grigg wrote:
Im using Xcode 3.0 and building a Foundation Tool (debug, PPC). The
base SDK path is $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk and Ive
included Foundation.framework in the project under "External
Frameworks and Libraries".
There is a line of my cod
On May 13, 2008, at 6:27 PM, Jack Repenning wrote:
On May 13, 2008, at 6:10 PM, R.L. Grigg wrote:
NSSocketPort *socketPort=[[NSSocketPort alloc] initWithTCPPort:1234];
. . .
warning: passing argument 1 of 'initWithTCPPort:' with different
width due to prototype
I checked the NSPort header
Gerd,
What XCode probably does, is simply switch documents, rather than
switching windows.
But yes, you probably need to programmatically interact with your
NSDocument, NSDocumentController, NSWindowController objects.
remember the hierarchy
NSDocumentController > NSDocument (multiple distinc
On May 13, 2008, at 6:10 PM, R.L. Grigg wrote:
NSSocketPort *socketPort=[[NSSocketPort alloc] initWithTCPPort:1234];
. . .
warning: passing argument 1 of 'initWithTCPPort:' with different
width due to prototype
I checked the NSPort header file for the NSSocketPort method
prototype, /Dev
On May 13, 2008, at 7:10 PM, R.L. Grigg wrote:
There is a line of my code that is giving me a warning I cant' douse:
#import
. . .
NSSocketPort *socketPort=[[NSSocketPort alloc] initWithTCPPort:1234];
. . .
warning: passing argument 1 of 'initWithTCPPort:' with different
width due to p
Im using Xcode 3.0 and building a Foundation Tool (debug, PPC). The
base SDK path is $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk and Ive included
Foundation.framework in the project under "External Frameworks and
Libraries".
There is a line of my code that is giving me a warning I cant' douse:
#
What about dtrace on Leopard? Isn't it supposed to let you view
several aspects of program performance simultaneously, including a
stack trace? Maybe if you could tie where it consumes the CPU cycles
with the stack trace, it'll reveal a pattern? Just a thought.
On May 9, 2008, at 2:18 PM, L
> So I think that having to write your own Cocoa object graph management
> and persistence framework is a realistic and necessary evil
Agreed. Also because of the wide variety of usage pattersn and design
trade-offs.
--
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voic
On 13 May '08, at 5:40 PM, Matt Burnett wrote:
Now your talking about hackers instead of spammers.
There's not really a difference nowadays, since most spam is sent from
pwned servers/PCs.
It is hard to sniff a HTTP session, you have to penetrate your
victim's network enough to be able
Can someone expand on this a little more please and fill in some blanks
about why the first version isn't KVO compliant and what it is about the
second one which makes KVO work? That second piece of code
[ [ self mutableArrayValueForKey:@"fieldArray" ] addObjectInFoo ];
is not perhaps the f
This is quite straightforward - it's covered by Aaron Hillegasse in
his excellent book. I use this technique and it works beautifully.
I've also wrapped up the common functionality into a class that
"undoable observables" can derive from, and once I had that, each
class that wants undo just
On 13 May '08, at 4:35 PM, Matt Burnett wrote:
Its not hard to enable HTTP authentication.
It's also not hard to eavesdrop on the HTTP session using tcpdump, or
to debug or disassemble the app to recover the password.
In other words, putting a shared secret into an application
distributed
On 13 May '08, at 12:55 PM, Daniel Vollmer wrote:
It sounds like you're creating a single NSString containing the
entire contents of the file, then?
Yes. Is that something I shouldn't do? I mean, I feel a tiny bit
silly creating such huge strings but I didn't find a nice
alternative (e.g
On May 13, 2008, at 4:22 PM, Peter Ammon wrote:
On May 13, 2008, at 2:32 PM, Jim Turner wrote:
This never gets called unless I actually click in the search field.
My custom NSView has this as it's implementation of
viewDidMoveToWindow to move the cursor into the field:
-(void) viewDidMoveT
On May 13, 2008, at 2:32 PM, Jim Turner wrote:
This never gets called unless I actually click in the search field.
My custom NSView has this as it's implementation of
viewDidMoveToWindow to move the cursor into the field:
-(void) viewDidMoveToWindow
{
[[self window] makeFirstResponder
Switch to fullscreen in a couple of line and without capturing display
('uiView' is your custom view with custom drawing code):
SetSystemUIMode(kUIModeAllSuppressed, kUIOptionAutoShowMenuBar);
NSScreen *screen = [[uiView window] screen];
NSWindow *window = [[NSWindow alloc] initWith
Other than me wanting to avoid re-writing my view drawing code? :)
I will probably look into doing this -- of the unanswered questions
that I have is will I be able to toggle (relatively) easily between a
full-screen context and a windowed context? Do I need to completely
throw out my NS* drawin
I have a custom NSView that contains static text and a NSSearchField,
it's your run-of-the-mill attempt to provide live search in a menu, a
la the Apple help menu.
My issue is that while I can get the cursor into the search field, if
I type something other than standard text (arrow keys, home, end
I was playing a bit with Cocoa and full screen and I wrote a quick blog
entry about it: http://everburning.com/news/going-fullscreen-with-medium/
I'm not sure if it's the correct way, or the best way, but it does seem to
work for me (although I believe it will limit the OS version you can run
unde
None of this really refutes what Ricky posted.
You are just lucky that it works in the one-display case. It really
isn't designed to work, and on some configurations, it just won't.
Is there anything preventing you from following Ricky's advice?
Dennis Munsie wrote:
In this case, what I am tr
In this case, what I am trying to accomplish is something along the
lines of how Keynote and Powerpoint behave. I only want to take over
one display, most likely connected up to a projector. But, I also
occasionally want to have it in a window. I'm not expecting any
controls to work -- this is s
On May 13, 2008, at 12:11 PM, Dennis Munsie wrote:
I have an app right now that I've added a fullscreen mode to. RIght
now it works for fullscreen when I go to fullscreen on the main
display. If I attempt to do this on the secondary display, I get a
blank screen.
I think one problem is proba
On May 13, 2008, at 1:04 PM, Rimas wrote:
If you want that functionality, then we recommend that you have a
separate
Page Setup menu item to invoke that dialog as this is the standard
Mac OS X
behavior and what users will expect.
Ok. I will think about that one more time. Thank you for res
> If you want that functionality, then we recommend that you have a separate
> Page Setup menu item to invoke that dialog as this is the standard Mac OS X
> behavior and what users will expect.
Ok. I will think about that one more time. Thank you for response.
By the way, as I understand, there i
On May 13, 2008, at 17:00, Jens Alfke wrote:
On 12 May '08, at 11:38 PM, Daniel Vollmer wrote:
I'm parsing a rather large text-file (usually >20MB) and in doing
so I'm iterating over its lines with [String
getParagraphStart]. I've found a rather noticeable speed-up in
the parsing op
On May 13, 2008, at 12:05 PM, Rimas wrote:
You are right. And that works very well. Except one thing. After
changing paper size in Print dialog I have two options - to press
Cancel (and revert changes I have made) or to press Print and save new
options + print document. I want only to change pap
I must admit the bindings for this are really playing with my head. I
struggled quite immensely getting the selection from the
treecontroller and in the end it started working without me fully
understanding why. I have further complications to come as I have the
decide whether the transaction am
I have a document based application with multiple windows per
document, using window controllers.
I was hoping that the window menu would magically group windows
belonging to the same document together, similar to what Xcode does.
But apparently that is not the case. Am I missing something,
At 10:44 AM -0700 5/12/08, [EMAIL PROTECTED] wrote:
Hello,
I'm using core-data in a program of mine. It uses two context where
one of these is used in a second thread to perform saving operation.
Sometimes at the end of all operations when I perform a save operation
on my main context I receive
You are right. And that works very well. Except one thing. After
changing paper size in Print dialog I have two options - to press
Cancel (and revert changes I have made) or to press Print and save new
options + print document. I want only to change paper size and save
that information for later pr
On May 13, 2008, at 11:52 AM, Rimas wrote:
What are you trying to accomplish?
Basicaly I am trying to merge "Page setup" and "Print" dialogs. That
is easy by using NSPrintPanel's setOptions. But I want to keep "Page
setup" functionality also. I mean, I want to be able to change paper
size for e
Thank you for reply.
> What are you trying to accomplish?
Basicaly I am trying to merge "Page setup" and "Print" dialogs. That
is easy by using NSPrintPanel's setOptions. But I want to keep "Page
setup" functionality also. I mean, I want to be able to change paper
size for example, without printi
On May 13, 2008, at 10:23 AM, Rimas wrote:
I am interested in adding additional button to the NSPrintPanel dialog
at the very bottom line. Between ( PDF v ) and ( Cancel ). Is that
possible under Leopard?
There no simple way to do this, and I would highly discourage trying
to do so.
Custo
On May 13, 2008, at 1:13 AM, Ben Lowndes wrote:
[...] the solution seems to lie in using the accessability API or
an input manager. Is that correct?
Please, please, please _don't_ write an input manager. They are a
gross hack, using mechanisms that (as I understand it) Apple is
planning o
Hello,
I am interested in adding additional button to the NSPrintPanel dialog
at the very bottom line. Between ( PDF v ) and ( Cancel ). Is that
possible under Leopard? Custom accessory view is not suitable for me.
Even topics from "Extending Printing Dialogs" does not help, because
they does not
Hello everyone,
I have an app right now that I've added a fullscreen mode to. RIght
now it works for fullscreen when I go to fullscreen on the main
display. If I attempt to do this on the secondary display, I get a
blank screen.
I think one problem is probably the way I am identifying which scr
Our company needs a specific small Cocoa app developed that is a
teleprompter/sound recorder for doing voiceovers. I posted on
elance.com but not getting much reaction and a macslash posting
mentioned listing here. We're looking for bids for the project now,
and anyone interested can cont
I've got a situation where an alert, attached as a sheet, just beeps
when it's called (instead of displaying and interacting with the
user.) I'm about 99.99% certain that this is being caused by a sheet
that comes up prior to the alert (not at the same time -- the previous
sheet is long go
No, not using bindings, but good point & yes, the param type was a typo.
While everything 'seems' to be working now, the info that I got in the
debugger when I was seeing problems looked suspiciously like the state
of things when an object has been released but is then referenced. I
need to
Rotating a text layer to any angle with CATransform3DMakeRotation in a
transaction goes fine, unless you stop rotating at 135 or 315 degrees
clockwise from the vertical normal. In those two cases
bounds.size.width and bounds.size.height appear to exchange values, so
that the string gets cli
On May 13, 2008, at 8:08 AM, Jens Alfke wrote:
While we're on the topic, it's worth noting that memory-mapping
files on removable or network filesystems can be dangerous. If you
read/write a mapped memory location, and the kernel has to page it
in, but the file's filesystem is no longer ac
Hi Ben,
Take a look at the new Leopard only CGWindowListCopyWindowInfo
method. Its probably what you are looking for and is able to provide
a list of windows in z-order, including rect position (screen relative
of course), pid, title etc. You cant modify windows using this API,
but you'
Hi,
I am a Cocoa developer currently coding a user interface using a
custom IR Remote extending the functionalities of Apple one.
My company have a partnership with a remote maker, and we asked them
to make a remote using Apple Remote IR codes, plus some custom ones.
Unfortunately, we hav
On 12 May '08, at 11:13 PM, Ben Lowndes wrote:
Yes, exactly: I'm working on a window management utility (or I'm
trying to...).
This might not be a good introductory Cocoa project. My hunch is that
doing anything interesting with/to the windows will become either
difficult or impossible [
In which case you need to set up KVO of the properties in a controller
object of some kind and use that to register the undos. Of course,
Core Data does this all automatically :)
On 13 May 2008, at 13:47, Laurent Cerveau wrote:
When reading through the doc for Document based application the
On 13 May '08, at 12:15 AM, Michael Vannorsdel wrote:
Basically there's no guarantee you'll get the same data that was in
the file when you first mapped it if something else modifies or
destroys it while it's mapped.
You're correct about modifications, but not about deletions. An open
fi
On 12 May '08, at 11:38 PM, Daniel Vollmer wrote:
I'm parsing a rather large text-file (usually >20MB) and in doing so
I'm iterating over its lines with [String getParagraphStart].
I've found a rather noticeable speed-up in the parsing operation if
I create the string in question from
Thanks Bill and Graham.
D'oh! I've got dozens of stringWithFormat calls in my main app and
this never occurred to me. I was thinking that somehow an NSTextField
would take a number and convert it itself.
This will let me merge all three components of the time into one
string with separato
I really need your help.
I try to make a view which is like a table view, and which has a text edit
area when focus comes to the view. And the editing area must change its
frame depending on the column. The editing area moves to the next, previous,
above, and below cell when user types tab or retur
When reading through the doc for Document based application the advice
is to implement undo by making setter invoking
prepareInvocationWithTarget.
Is there a way to have this done "automatically" with properties. For
now it looks to me like I have to remove all @synthetize directive and
r
Hello list
I have bound an NSDictionaryController to an NSTableView.
The keys in my bound dictionary are numeric strings 1... n
The dictionary keys and values display okay but the sorting of the key
column is not numeric but alphabetic.
The value column sorts fine for objects of type NSNumber.
Hi,
I'm a regular reader but not a too regular poster here. Well, I think
it's time to give something back :)
It's not much, but here we go: Attending WWDC is great, but I need to
print the available sessions. Just looking at them online is not
enough, I need to have a piece of paper to actually c
On 13 May 2008, at 2:06 pm, Johnny Lundy wrote:
It works now, but I still have to do the crazy
self.hoursString = [[NSNumber numberWithInt: self.hours] stringValue];
Or you could just do:
self.hoursString = [NSString stringWithFormat:@"%d", self.hours];
G.
__
on 2008-05-13 12:06 AM, Johnny Lundy at [EMAIL PROTECTED] wrote:
> I still have to do the crazy
>
> self.hoursString = [[NSNumber numberWithInt: self.hours] stringValue];
>
> To get a string from an int for the textField to bind to. If I bind it
> to the model deadline.hours, which is a scalar i
I think I haven't explained myself properly. I already have the
bindings worked out much as you have below however I can't achieve the
functionality I'm after using the standard method.
If my transaction entity has;
memo (string)
date (date)
amount (NSNumber)
fromAccount (reverse of debit)
t
Le 13 mai 08 à 08:01, Jens Alfke a écrit :
On 12 May '08, at 8:15 PM, Ben Lowndes wrote:
I'm a cocoa newbie, so I may be missing something obvious here: I'd
like to get a list of open windows for all currently running
applications.
Nothing personal, but people seem to ask this question her
You can also create a CGBitmapContext (with CGBitmapContextCreate) and
create a CIContext from that (with +[CIContext
contextWithCGContext:options:]) and draw to the CIContext. It will
draw the pixels into the bitmap. This will work for Tiger and Leopard.
On May 13, 2008, at 1:51 AM, N
Hi,
If you are using Leopard (10.5), you could do something like this:
CIImage* imageBlurred = .
NSBitmapImageRep* bitmap = [[[NSBitmapImageRep alloc] initWithCIImage:
imageBlurred] autorelease];
// Getting pixels data
// this returns a pointer to the pixel data
[bitmap bitmapData]
rega
Hi,
I'm currently working on a NSSearchField with an "attached"
borderless NSWindow (using NSBorderlessWIndowMask and
NSFloatingWindowLevel) that has a NSTableView to display the results
from the search field. All works fine so far except hiding the results
window when clicking e.a. on th
Il giorno 12/mag/08, alle ore 08:20, Amrit Majumdar ha scritto:
Hi All,
I am working with a PDFView.
We have the option to display the document as single page
continuous and
two pages continuous.
Is there a way wherein we can display more than two pages continuous
such as
a three page c
– stringByAddingPercentEscapesUsingEncoding:
– stringByReplacingPercentEscapesUsingEncoding:
wp
Thank you it works fine
(and thanks to everyone who
replied)___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests
On May 13, 2008, at 12:38 AM, Daniel Vollmer wrote:
Salutations!
I'm parsing a rather large text-file (usually >20MB) and in doing so
I'm iterating over its lines with [String getParagraphStart].
I've found a rather noticeable speed-up in the parsing operation if
I create the string i
88 matches
Mail list logo