That's a good idea, thank you! :)
On Sun, Apr 18, 2010 at 12:41 PM, Jens Alfke wrote:
>
> On Apr 18, 2010, at 12:40 AM, Henrietta Read wrote:
>
> > exactly the point germane, but in perusing NSString.h one is given to
> understand this method might not be as 'sma
>> The call to -stringWithContentsOfFile: looks correct, but you're failing
to check for errors. If it fails, it will return nil, and passing nil to
setString: is illegal and will throw an exception.
right, right... most correct. I can catch the nil.
>> This leaves the question of why -stringWith
Hi,
What's the correct way to open a text file? I'm using:
NSError *error = nil;
NSStringEncoding encoding;
[myMutableString setString:[NSString stringWithContentsOfFile:filePath
usedEncoding:&encoding error:&error]];
but on some files (say, Western Mac OS Roman) it crashes.
0x91dc50
Hi,
Think I must be doing something wrong, I just got a new laptop with 10.6 for
Christmas. My app that works fine in 10.5 seems to have all its pop-up menus
broken... ???
Here's the code:
- (IBAction)myPopupButton:(id)sender
{
gMyPopupButtonSetting = [[sender selectedCell] tag];
}
'gMyPop
Sorry to bother, got it all fixed with:
[[self window] discardEventsMatchingMask:NSLeftMouseDraggedMask
beforeEvent:theEvent];
On Tue, May 5, 2009 at 6:09 AM, Henrietta Read wrote:
> Hi,
>
> I'm using an Image Well as a button... such as:
>
>
> - (
Hi,
I'm using an Image Well as a button... such as:
- (void)mouseDown:(NSEvent *)theEvent
{
theEvent = [[self window]
nextEventMatchingMask: NSLeftMouseUpMask];
switch([theEvent type])
{
case NSLeftMouseUp:
DoVariousImportantThingsHere();
[vi
eAtPath = [fileManager displayNameAtPath:[sheet
> filename]];
> .
>
> ..
> .
> }
> }
>
> Tom
>
>
> On Apr 30, 2009, at 3:28 PM, Henrietta Read wrote:
>
> Question,
>
> I'm passing a file name such as 'MyTextFile.txt' to NSSavePanel
> runM
Question,
I'm passing a file name such as 'MyTextFile.txt' to NSSavePanel
runModalForDirectory.
When the panel appears the entire string is selected, but I would rather
that just
'MyTextFile' is selected. Is it possible to set the selection to exclude the
file
extension?
Thank you.
Hi, I have an Image Well (NSImageView) in a window. I would like to display
a drag and drop image in the view and pass the file path on to my controller
object. In my 'MyImageView' object I'm doing:
- (NSDragOperation)draggingEntered:(id )sender
{
if((NSDragOperationGeneric &
[sender