Re: Encoding a Custom Object which has a CALayer instance Variable (newbie Question)

2008-12-12 Thread Gustavo Pizano
On 13.12.2008, at 6:16, Michael Ash wrote: When you get to an object, you can simply encode it using [coder encodeObject:obj forKey:@"key"]. Of course obj must implement NSCoding as well, otherwise this will not work. For your own classes, you'll need to implement NSCoding for everything that w

Re: how to let the NSOutlineview to display the line number?

2008-12-12 Thread Ashley Clark
On Dec 12, 2008, at 9:46 PM, Alex.Wang wrote: Hi everyone. Currently I have a very huge NSOutlineview to manage my tree-like data. So to annotate the line number on the left side of the NSOutlineview is a very important feature for my application. Can anyone tell me whether there is a method to

Re: Trying To Understand Bindings

2008-12-12 Thread Bridger Maxwell
Woops, I posted some wrong code which might confuse the issue. This is the real code that binds the view to the dictionary, but only sends notifications from the view to the dictionary (and not the other way around). [databaseClient bind:@"database.selectedShortRangeContact" toObject:sineWaveView w

Re: NSTableView Selection

2008-12-12 Thread David Blanton
Allowing empty selection did not clear the first row being selected. Also, calling deselectRow:0 at various time during table load does not clear the first row being selected. Note that Apple has said this is somewhat of a bug and asked that I log a bug report. Thanks for all suggestions!

Re: Resizing an image

2008-12-12 Thread Glenn Bloom
So it looks like I now have a better solution for copying an image file and reducing its size both in dimensions and in bytes, thanks to a couple of recommendations I received. Of course, other recommendations made clear that I need to learn more about alternative approaches: - some experimentatio

Trying To Understand Bindings

2008-12-12 Thread Bridger Maxwell
Just when I thought I had bindings down I have a custom view subclass (sineWaveView) that the user interacts with to change a property (connectedContact). I would like to bind this to a value (selectedShortRangeContact) in a dictionary (database) in another object (databaseClient). Simp

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread Scott Ribe
> One way of doing so would be to use an if-statement, and just type out > all the possibilities: Well, if the API is really that broken, then that's essentially what you have to do. You can wrap that if statement in your own method that takes an NSArray--providing for yourself something the API o

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread Michael Ash
On Fri, Dec 12, 2008 at 12:02 PM, Jonathan del Strother wrote: > On Fri, Dec 12, 2008 at 4:42 PM, Michael Ash wrote: >> On Fri, Dec 12, 2008 at 9:41 AM, Jonathan del Strother >> wrote: >>> Maybe an example would be helpful. Let's say I want to call >>> -[Bartender mixCocktailIngredients:(NSStri

Re: How to handle document scaling in an NSRulerView Client?

2008-12-12 Thread Dave Fernandes
Not sure if I'm missing your point, but you can always call registerUnitWithName again with the new conversion factor after changing the view scale. Dave On Dec 12, 2008, at 11:33 PM, Carlos Eduardo Mello wrote: Hi Everyone, my app has a view inside a scroll view with a horizontal ruler.

Re: Encoding a Custom Object which has a CALayer instance Variable (newbie Question)

2008-12-12 Thread Michael Ash
On Fri, Dec 12, 2008 at 3:43 PM, Gustavo Pizano wrote: > Hello. I want to send the following an object in a drag-n-drop operation, so > I need to transform it to a NSData > > so I have this object > > @interface Ship : NSObject { > >int size; >int impacts; >ShipLocation *

How to handle document scaling in an NSRulerView Client?

2008-12-12 Thread Carlos Eduardo Mello
Hi Everyone, my app has a view inside a scroll view with a horizontal ruler. When setting up the ruler I do the following: 1. call "setHasHorizontalRuler" 2. register my custom measurement unit with + "registerUnitWithName..." and select that unit in the ruler. 3. then I call "setRulersVi

how to let the NSOutlineview to display the line number?

2008-12-12 Thread Alex . Wang
Hi everyone. Currently I have a very huge NSOutlineview to manage my tree-like data. So to annotate the line number on the left side of the NSOutlineview is a very important feature for my application. Can anyone tell me whether there is a method to do this? Thank you very much for any reply. Best

open package installer in bundle resources directory not working

2008-12-12 Thread Denis Bohm
I'm trying to distribute an installer within my own application bundle in the resources directory and run it from my application. When I try to run it from the debugger I get the error "launch path not accessible". However, if I then use the terminal to run the command by hand using the s

Re: Announce the time every 30 minutes

2008-12-12 Thread Jonathon Kuo
On Dec 12, 2008, at 10:36 AM, has wrote: Mr. Gecko wrote: I'm trying to find out how to announce the time every 30 minutes, You could run 'say `date`' as a cron job. Interesting. The "speaker" translates "Fri Dec 12 17:52:58 PST 2008" into these spoken words: "free december twelfth s

Re: - [NSBitmapImageRep tiffRepresentation] malloc error

2008-12-12 Thread Nick Zitzmann
On Dec 12, 2008, at 6:46 PM, Jonathon Kuo wrote: Is there a function that allocates contiguous RAM? You mean VRAM, right? I thought anything you malloc'd is VRAM, and gets mapped any which way into real RAM by the OS, so contiguity of the real RAM is not an issue, only of process VRAM?

Re: - [NSBitmapImageRep tiffRepresentation] malloc error

2008-12-12 Thread Jonathon Kuo
On Dec 12, 2008, at 2:29 PM, Nick Zitzmann wrote: In most 32-bit programs, even trying to allocate hundreds of megabytes of contiguous RAM at once often fails due to memory fragmentation. Is there a function that allocates contiguous RAM? You mean VRAM, right? I thought anything you mallo

Re: NSBitmapImageRep orientation?

2008-12-12 Thread Jean-Nicolas Jolivet
Thanks a lot for the clarification!! Oh BTW, just for giggles: If the image was rotated before, I'm pretty sure it was with Windows Picture & Fax Viewer! :) Jean-Nicolas Jolivet On 12-Dec-08, at 6:43 PM, Ken Ferry wrote: On Fri, Dec 12, 2008 at 2:32 PM, Jean-Nicolas Jolivet wrote: Hi th

Re: NSBitmapImageRep orientation?

2008-12-12 Thread Ken Ferry
On Fri, Dec 12, 2008 at 2:32 PM, Jean-Nicolas Jolivet wrote: > Hi there! > > After some more tests (i.e. with sample canon images that I downloaded) it > doesn't seem to be a problem... so basically the problem only occurs with > one set of pictures that I have on my HD... > > I don't remember rot

Funky behavior with layer-backed views

2008-12-12 Thread Randall Meadows
In this one window I have, I have 2 views and 2 buttons, all living in the same parent view (there's more than just that, but these are the relevant bits). The Notes button shows/hides the notes view, and the Info button shows/ hides the MoreInfo view. I have turned on "Wants Core Animation

Re: Announce the time every 30 minutes

2008-12-12 Thread Andrew Merenbach
On Dec 12, 2008, at 1:30 PM, Benjamin Dobson wrote: On 12 Dec 2008, at 18:36:21, has wrote: You could run 'say `date`' as a cron job. Make sure to specify your own date format. The user's default one will probably sound silly. For example, date "+The time now is %I:%m %p on %A

Re: - [NSBitmapImageRep tiffRepresentation] malloc error

2008-12-12 Thread Nick Zitzmann
On Dec 12, 2008, at 1:50 PM, Thomas Clement wrote: The image was 14340 x 14173 (8-bit RGB with no alpha). Wow, that's pretty big... Also I got these messages in the console: kernel[0]: (default pager): [KERNEL]: no space in available paging segments malloc: *** mmap(size=1073741824) fail

Re: - [NSBitmapImageRep tiffRepresentation] malloc error

2008-12-12 Thread David Duncan
On Dec 12, 2008, at 12:50 PM, Thomas Clement wrote: The image was 14340 x 14173 (8-bit RGB with no alpha). Also I got these messages in the console: kernel[0]: (default pager): [KERNEL]: no space in available paging segments malloc: *** mmap(size=1073741824) failed (error code=12) *** error:

Re: NSBitmapImageRep orientation?

2008-12-12 Thread Ken Ferry
Hi Jean-Nicolas, Could you send me one of these auto-rotated images? NSBitmapImageRep does not do any automatic orientation correction in 10.5. Is it possible that your Canon camera is writing out an already-rotated file in orientation 1? If ImageIO is doing automatic orientation correction for

Re: - [NSBitmapImageRep tiffRepresentation] malloc error

2008-12-12 Thread Thomas Clement
On Dec 12, 2008, at 9:29 PM, David Duncan wrote: On Dec 12, 2008, at 3:51 AM, Thomas Clement wrote: I'm using NSBitmapImageRep to build a new image by doing some pixel processing (which unfortunately I can't do using Core Image). Everything works great but with bigger sizes I'm getting a mall

NSBitmapImageRep orientation?

2008-12-12 Thread Jean-Nicolas Jolivet
I'm re-sizing some NSBitmapImage reps (mostly JPGs or RAW, both full- size images straight from a digital camera)... I'm working almost exclusively with NSBitmapImageRep (using [NSGraphicsContext graphicsContextWithBitmapImageRep:] when drawing etc..) With some images( the ones I took wit

Re: Announce the time every 30 minutes

2008-12-12 Thread Benjamin Dobson
On 12 Dec 2008, at 18:36:21, has wrote: You could run 'say `date`' as a cron job. Make sure to specify your own date format. The user's default one will probably sound silly. For example, date "+The time now is %I:%m %p on %A %B %e %Y" will return The time now is 09:12 p

Loading a view XIB with different owner types?

2008-12-12 Thread Randall Meadows
I have a view XIB (basically a customized NSTextView) whose File's Owner is configured to be class Foo. I would like to reuse that same XIB in a different part of my code, but the loading owner is a completely different class, Bar. I tried adding the same outlets that Foo has to Bar, and th

Encoding a Custom Object which has a CALayer instance Variable (newbie Question)

2008-12-12 Thread Gustavo Pizano
Hello. I want to send the following an object in a drag-n-drop operation, so I need to transform it to a NSData so I have this object @interface Ship : NSObject { int size; int impacts; ShipLocation * location; CALayer * shipImageLayer; } now

Re: NSApp beginSheet:NSWindow notification of sheet opening?

2008-12-12 Thread Erik Buck
Custom sheets don't spontaneously show themselves.  Right before you send messages to display a sheet, reconfigure the sheet as desired.  Better yet, add a method to the window controller for the sheet and implement that method to both do the special configuration and show the sheet on the speci

Re: - [NSBitmapImageRep tiffRepresentation] malloc error

2008-12-12 Thread David Duncan
On Dec 12, 2008, at 3:51 AM, Thomas Clement wrote: I'm using NSBitmapImageRep to build a new image by doing some pixel processing (which unfortunately I can't do using Core Image). Everything works great but with bigger sizes I'm getting a malloc error when calling - [NSBitmapImageRep tiffRep

Re: Text layout responsibility

2008-12-12 Thread Martin Wierschin
Try changing the container size once the layout is complete, you can do this by using the delegate method: - (void)layoutManager:(NSLayoutManager *)layoutManager didCompleteLayoutForTextContainer:(NSTextContainer *)textContainer atEnd:(BOOL)layoutFinishedFlag and checking the layoutFinishedF

Re: NSApp beginSheet:NSWindow notification of sheet opening?

2008-12-12 Thread Robert Mullen
I have been able to work with delegates and notifications in the window doing the opening but so far that hasn't helped me to work inside the sheet window. I need to do some specific initialization inside the controller for the sheet every time it is shown. I should have made it load from i

Re: More - Safari Download Security Alerts

2008-12-12 Thread Jim Puls
On Dec 12, 2008, at 4:25 AM, Mike Abdullah wrote: Does your app actually require an installer? If so, use Apple's built-in installer application; don't roll your own with AppleScript. If an installer is not really needed, just provide the application on its own inside the DMG file. Users ca

Re: NSTableView Selection

2008-12-12 Thread Corbin Dunn
On Dec 12, 2008, at 10:02 AM, David Blanton wrote: How do I keep the first row in a table view from being selected when the table first loads? The issue is that to get a selection did change for the first row I have to first select a different row because the first row is 'auto selected'

Re: NSTableView Selection

2008-12-12 Thread Patrick Mau
Hi David To prevent automatic row selection, you have to allow "Empty" selections in your table. Select your Table-View in IB, open the attributes inspector and check "Empty" to be enabled. It's in the "Selection" part, near "Multiple", "Column" and "Type Select". Regards, Patrick On

Re: NSTableView Selection

2008-12-12 Thread Randall Meadows
On Dec 12, 2008, at 11:02 AM, David Blanton wrote: How do I keep the first row in a table view from being selected when the table first loads? The issue is that to get a selection did change for the first row I have to first select a different row because the first row is 'auto selected'

Re: KVO and CALayers

2008-12-12 Thread Matt Long
It would appear that you are right. I took your code and plugged it into an xcode project and found that the manager property is not being observed. I knew that you couldn't use KVO for animatable properties in a CALayer, but it appears that CALayers don't allow KVO at all. As soon as I mad

Re: Announce the time every 30 minutes

2008-12-12 Thread has
Mr. Gecko wrote: I'm trying to find out how to announce the time every 30 minutes, You could run 'say `date`' as a cron job. HTH has -- Control AppleScriptable applications from Python, Ruby and ObjC: http://appscript.sourceforge.net ___ Cocoa-d

Re: NSApp beginSheet:NSWindow notification of sheet opening?

2008-12-12 Thread Keary Suska
On Dec 12, 2008, at 11:26 AM, Robert Mullen wrote: I have an NSWindow that unfortunately is in the Main nib of my project (to be changed later) and is being shown modally from the default NSWindow using beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:. How can I trap w

NSApp beginSheet:NSWindow notification of sheet opening?

2008-12-12 Thread Robert Mullen
I have an NSWindow that unfortunately is in the Main nib of my project (to be changed later) and is being shown modally from the default NSWindow using beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:. How can I trap when this modal sheet is displayed from within its co

Re: Text layout responsibility

2008-12-12 Thread Gordon Apple
I didn't attach the quotes because I just wanted to make a point: NSTextContainer has been broken for some time now and I can't even get an acknowledgement from DTS of the bug in spite of the fact that I've had others verify it on independent machines using Apple, Inc's own sample code. I'

architecture question about writing to NSUserDefaults

2008-12-12 Thread Mike Chambers
I have an application that opens a sheet. The sheet needs to read and write information to NSUserDefaults. If I built this in ActionScript (which i am familiar with) I would pass the appropriate information to the sheet, and have the sheet send a notification / event (which the controller would li

NSTableView Selection

2008-12-12 Thread David Blanton
How do I keep the first row in a table view from being selected when the table first loads? The issue is that to get a selection did change for the first row I have to first select a different row because the first row is 'auto selected' when the table first loads. David Blanton _

Re: KVO on NSSlider not observing

2008-12-12 Thread Quincey Morris
On Dec 12, 2008, at 04:36, Aaron Wallis wrote: I'm having issues setting up bindings via code (rather than in IB) I've got a NSObject subclass which is being used as the controller, and a NSView subclass which has a few controls like NSSliders. In the NSObject I have the following code: - (

Re: Looking for info on creating Plugins/Modules

2008-12-12 Thread Jean-Daniel Dupas
Le 12 déc. 08 à 18:19, glenn andreas a écrit : On Dec 12, 2008, at 11:01 AM, Jean-Daniel Dupas wrote: Le 12 déc. 08 à 17:19, glenn andreas a écrit : On Dec 12, 2008, at 9:37 AM, Sherm Pendley wrote: On Dec 12, 2008, at 4:05 AM, Chris Hanson wrote: - Your plug-ins should have a documen

Re: Looking for info on creating Plugins/Modules

2008-12-12 Thread glenn andreas
On Dec 12, 2008, at 11:01 AM, Jean-Daniel Dupas wrote: Le 12 déc. 08 à 17:19, glenn andreas a écrit : On Dec 12, 2008, at 9:37 AM, Sherm Pendley wrote: On Dec 12, 2008, at 4:05 AM, Chris Hanson wrote: - Your plug-ins should have a document type and UTI declared in your app's Info.plist

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread Jonathan del Strother
On Fri, Dec 12, 2008 at 2:54 PM, wrote: > > On 12 Dec 2008, at 15:41, Jonathan del Strother wrote: > >> Which works fine, but rapidly expands into a huge if-statement as you >> try and handle more states. Ideally I'd like to do something along >> the lines of: >> >> NSMutableArray* ingredients =

Re: Looking for info on creating Plugins/Modules

2008-12-12 Thread Jean-Daniel Dupas
Le 12 déc. 08 à 17:19, glenn andreas a écrit : On Dec 12, 2008, at 9:37 AM, Sherm Pendley wrote: On Dec 12, 2008, at 4:05 AM, Chris Hanson wrote: - Your plug-ins should have a document type and UTI declared in your app's Info.plist so they can be recognized as file packages rather than

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread Michael Ash
On Fri, Dec 12, 2008 at 9:41 AM, Jonathan del Strother wrote: > Maybe an example would be helpful. Let's say I want to call > -[Bartender mixCocktailIngredients:(NSString*)ingredient ...], and I > want to call that with different arguments depending on the user's > preferences. > One way of doing

Re: Design for showing ridiculously huge number of images in Table View

2008-12-12 Thread Matt Gough
On 12 Dec 2008, at 17:32, Corbin Dunn wrote: There are some sample images with it to ensure Spotlight had something specific do index. If you search for "Flower or Corbin" does it ever give anything back? One thing to check is to see if you have any excluded directories in Spotlight prefs.

Re: Design for showing ridiculously huge number of images in Table View

2008-12-12 Thread Corbin Dunn
On Dec 12, 2008, at 3:12 AM, Matt Gough wrote: On 11 Dec 2008, at 18:33, Corbin Dunn wrote: Also see this demo (I'm going to see how many times I can reference it): Corbin, I gave this a whirl (since it has shown up several times r

Re: Looking for info on creating Plugins/Modules

2008-12-12 Thread glenn andreas
On Dec 12, 2008, at 9:37 AM, Sherm Pendley wrote: On Dec 12, 2008, at 4:05 AM, Chris Hanson wrote: - Your plug-ins should have a document type and UTI declared in your app's Info.plist so they can be recognized as file packages rather than folders by the Finder and get a nice icon. Anoth

Re: Looking for info on creating Plugins/Modules

2008-12-12 Thread Sherm Pendley
On Dec 12, 2008, at 4:05 AM, Chris Hanson wrote: - Your plug-ins should have a document type and UTI declared in your app's Info.plist so they can be recognized as file packages rather than folders by the Finder and get a nice icon. Another nice effect of this is the same behavior you get f

Re: Change Color Of Appended NSString?

2008-12-12 Thread Chunk 1978
thanks for that... i've noticed that if i don't actively add an NSFontAttributeName to the attributes, the new attributed string will default as a smaller, different font... is this normal? if so what is the default font and size of NSMenuItems? On Fri, Dec 12, 2008 at 8:21 AM, wrote: > > On 1

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread matt . gough
On 12 Dec 2008, at 15:41, Jonathan del Strother wrote: Which works fine, but rapidly expands into a huge if-statement as you try and handle more states. Ideally I'd like to do something along the lines of: NSMutableArray* ingredients = [NSMutableArray arrayWithObjects:@"gin", @"vodka", nil];

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread Jonathan del Strother
On Fri, Dec 12, 2008 at 2:14 PM, Kyle Sluder wrote: > On Fri, Dec 12, 2008 at 9:12 AM, Kyle Sluder > wrote: >> On Fri, Dec 12, 2008 at 8:53 AM, Jonathan del Strother >>> The number of arguments isn't known at compile-time. I'd like to be >>> able to take an NSArray of the arguments, and programm

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread Jean-Daniel Dupas
Le 12 déc. 08 à 14:53, Jonathan del Strother a écrit : I'm calling a method that takes a nil-terminated variable list of arguments. It doesn't supply a va_arg alternative (like NSLogv, -[NSString initWithFormat:arguments:] etc). The number of arguments isn't known at compile-time. I'd like t

KVO and CALayers

2008-12-12 Thread Yvan BARTHÉLEMY
Hi, I had a problem this morning, and I am wondering if the behavior I've observed was normal or not. I needed to use KVO on some object and wasn't able to figure why this didn't work. I spent some time figuring out what was happening (since it was the first time I used KVO, I started to

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread Kyle Sluder
On Fri, Dec 12, 2008 at 9:12 AM, Kyle Sluder wrote: > On Fri, Dec 12, 2008 at 8:53 AM, Jonathan del Strother >> The number of arguments isn't known at compile-time. I'd like to be >> able to take an NSArray of the arguments, and programmatically convert >> that to something suitable for invoking

Require help with Mouse click event on Status Item

2008-12-12 Thread Arjun SM
Hi, I am a novice in Cocoa and require some help. I have developed a Menulet/StatusItem in Cocoa wherein i have few functionality on Menu drop down. I wanted to improvise on it. For instance clicking on the Menulet/StatusItemStatus Item, the Menu drop down populates. How can i capture the Mouse

Right-to-left text in table view

2008-12-12 Thread Craig Williams
I am writing a simple iPhone app that has English words in a table view and when touched reveal the Hebrew equivalent. What method should I use to display the Hebrew text from right-to-left. I am filling the table from data in a plist file. words.plist I אני you (m) אתה Here the Hebrew words ar

How to create blunt Edges for a NSWindow

2008-12-12 Thread Arjun SM
Hi, I am a novice in cocoa and i have created a simple app which has only one window. I wanted to display a bottom bar that has blunt edges at the corners of the window. (Ex Finder windows bottom bar) Thanks in advance Arjun ___ Cocoa-dev mailing list (

Re: Programmatically constructing list of variable arguments?

2008-12-12 Thread Kyle Sluder
On Fri, Dec 12, 2008 at 8:53 AM, Jonathan del Strother wrote: > The number of arguments isn't known at compile-time. I'd like to be > able to take an NSArray of the arguments, and programmatically convert > that to something suitable for invoking the method. Take a look at this: http://www.cocoa

Programmatically constructing list of variable arguments?

2008-12-12 Thread Jonathan del Strother
I'm calling a method that takes a nil-terminated variable list of arguments. It doesn't supply a va_arg alternative (like NSLogv, -[NSString initWithFormat:arguments:] etc). The number of arguments isn't known at compile-time. I'd like to be able to take an NSArray of the arguments, and programm

Re: KVO on NSSlider not observing

2008-12-12 Thread Kyle Sluder
On Fri, Dec 12, 2008 at 8:20 AM, Aaron Wallis wrote: > Usually I'd just use bindings in IB, but this is the first time i've had to > build the interface through code. When you set up bindings in IB, you bind the view to the controller. So, you should do the same from code. Send -bind:toObject:wi

Re: Text layout responsibility

2008-12-12 Thread Rimas
Thank you for the tip. I'll try this also. Rimas M. On Fri, Dec 12, 2008 at 1:18 PM, chaitanya pandit wrote: > Try changing the container size once the layout is complete, you can do this > by using the delegate method: > - (void)layoutManager:(NSLayoutManager *)layoutManager > didCompleteLayout

Re: Change Color Of Appended NSString?

2008-12-12 Thread matt . gough
On 12 Dec 2008, at 14:10, Chunk 1978 wrote: i have an NSMenuItem who's title changes programtically. how can i change the color of the appended string? -=-=-=-=- NSString *appendedTimeRemaining = [NSString stringWithFormat:@"%d Hours", [self timeMenuSelection]]; [appendedTimeRemaining setColo

Re: KVO on NSSlider not observing

2008-12-12 Thread Aaron Wallis
Thanks for the help Graham and Keith. Usually I'd just use bindings in IB, but this is the first time i've had to build the interface through code. There's always something to learn it seems :D - Az On 13/12/2008, at 12:12 AM, Graham Cox wrote: On 12 Dec 2008, at 11:36 pm, Aaron Wallis wr

Re: KVO on NSSlider not observing

2008-12-12 Thread Graham Cox
On 12 Dec 2008, at 11:36 pm, Aaron Wallis wrote: Hi there, I'm having issues setting up bindings via code (rather than in IB) I've got a NSObject subclass which is being used as the controller, and a NSView subclass which has a few controls like NSSliders. In the NSObject I have the follow

Change Color Of Appended NSString?

2008-12-12 Thread Chunk 1978
i have an NSMenuItem who's title changes programtically. how can i change the color of the appended string? -=-=-=-=- NSString *appendedTimeRemaining = [NSString stringWithFormat:@"%d Hours", [self timeMenuSelection]]; [appendedTimeRemaining setColor:[NSColor grayColor]]; [MainMenu_Item3 setTitle

Re: KVO on NSSlider not observing

2008-12-12 Thread Keith Duncan
Aaron, You wouldn't typically observe a view class. In this case what your problem is that NSSlider doesn't change it's internal value in a key value observing compliant manner. You should observe the underlying value that the slider represents in your controller. If you're using binding

Re: Handle Mouse Event in Background Using Cocoa Framework

2008-12-12 Thread Jean-Daniel Dupas
Le 12 déc. 08 à 12:26, sheen mac a écrit : Hi All, Is it possible to monitor mouse event in background using cocoa framework ?. Where can I get more info about this?. Could I monitor the mouse events without using carbon?. Yes, using CGEvent Tap. See "Quartz Event Services Reference" for d

KVO on NSSlider not observing

2008-12-12 Thread Aaron Wallis
Hi there, I'm having issues setting up bindings via code (rather than in IB) I've got a NSObject subclass which is being used as the controller, and a NSView subclass which has a few controls like NSSliders. In the NSObject I have the following code: - (void)setupSliders { [controlsView.

Re: More - Safari Download Security Alerts

2008-12-12 Thread Mike Abdullah
Does your app actually require an installer? If so, use Apple's built- in installer application; don't roll your own with AppleScript. If an installer is not really needed, just provide the application on its own inside the DMG file. Users can drag and drop it to their preferred destination.

Re: More - Safari Download Security Alerts

2008-12-12 Thread Kyle Sluder
On Fri, Dec 12, 2008 at 6:25 AM, Dave wrote: > Can I disable all but the warning when the disk image is opened? You're asking to disable a critical security feature. Note that on Internet-enabled DMGs containing a single .app, Safari will automatically extract the application and throw away the

- [NSBitmapImageRep tiffRepresentation] malloc error

2008-12-12 Thread Thomas Clement
Hello, I'm using NSBitmapImageRep to build a new image by doing some pixel processing (which unfortunately I can't do using Core Image). Everything works great but with bigger sizes I'm getting a malloc error when calling - [NSBitmapImageRep tiffRepresentation] (error 12: Can't allocate mem

Handle Mouse Event in Background Using Cocoa Framework

2008-12-12 Thread sheen mac
Hi All, Is it possible to monitor mouse event in background using cocoa framework ?. Where can I get more info about this?. Could I monitor the mouse events without using carbon?. Thanks In Advance, Sheen ___ Cocoa-dev mailing list (Cocoa-dev

More - Safari Download Security Alerts

2008-12-12 Thread Dave
Hi, Thanks for this. I have a little more information in the problem: The user downloads a ,dmg file, this image contains (among others) the following files: "Install.app"-- Installation AppleScript. "Cleanup.app" -- AppleScript that is run after the installation has completed, (

Re: Text layout responsibility

2008-12-12 Thread chaitanya pandit
Try changing the container size once the layout is complete, you can do this by using the delegate method: - (void)layoutManager:(NSLayoutManager *)layoutManager didCompleteLayoutForTextContainer:(NSTextContainer *)textContainer atEnd:(BOOL)layoutFinishedFlag and checking the layoutFinishedF

Re: Design for showing ridiculously huge number of images in Table View

2008-12-12 Thread Graham Cox
On 12 Dec 2008, at 8:41 pm, rajesh wrote: do I add observer at cell level OR the controller level ( dataSource level ) ? I am confused because the user might just scroll through the tabel , in first go there are definitely no images , at the same time the cells which placed request for im

Re: Design for showing ridiculously huge number of images in Table View

2008-12-12 Thread Matt Gough
On 11 Dec 2008, at 18:33, Corbin Dunn wrote: Also see this demo (I'm going to see how many times I can reference it): Corbin, I gave this a whirl (since it has shown up several times recently :) ), but cannot get it to find any images

Re: Text layout responsibility

2008-12-12 Thread Rimas
> My first suspicion was wrong, but I think you're experiencing a similarly > touchy aspect of NSLayoutManager. > > I believe the problem is that the NSLayoutManager attached to the text > storage might not have been notified of the edit before you get the > notification. So when you change the con

Plug-In Additions to Core Data Model

2008-12-12 Thread Kyle Sluder
Hi all, I'd like to provide plug-in developers with the ability to extend entities in my application's Core Data model. Ideally, I'd even extend this functionality to advanced users, but I'll start with developers. The documentation doesn't adequately describe two issues I'm having: 1) If I cre

Re: Text layout responsibility

2008-12-12 Thread Martin Wierschin
Rimas, My first suspicion was wrong, but I think you're experiencing a similarly touchy aspect of NSLayoutManager. I believe the problem is that the NSLayoutManager attached to the text storage might not have been notified of the edit before you get the notification. So when you change th

Re: Text layout responsibility

2008-12-12 Thread Rimas
> My suspicion is that you are > modifying the contents of the NSTextStorage or changing the NSTextContainer > geometry in response to a layout event. You cannot safely do either while > layout is active on the stack. Here is the stack: #0 0x92811e17 in objc_exception_throw #1 0x9071bf2

Re: Text layout responsibility

2008-12-12 Thread Martin Wierschin
Can you post the full stack backtrace for the exception? #0 0x92811e17 in objc_exception_throw #1 0x9071bf2b in +[NSException raise:format:arguments:] #2 0x9071bf6a in +[NSException raise:format:] #3 0x934598cc in _NSBlockNumberForIndex #4 0x93462baf in -[NSLayoutManager

Re: Design for showing ridiculously huge number of images in Table View

2008-12-12 Thread rajesh
I typed in the mail while I was logging off for the home yesterday, and hence few mistakes , sorry my bad :( ( though it doesn't effect the way we look at the design ) I sum it up for better understanding. Actually , I have an NSOutlineView + NSTreeController . controller has NSDicti

NSTextContainer and proposedRect

2008-12-12 Thread chaitanya pandit
Hello, list, I'm finding it hard to understand the way the proposedRect should be handled in the NSTextContainer's lineFragmentRectForProposedRect:sweepDirection:movementDirection:remainingRect : method. The problem arises in certain cases where i get a weird proposedRect t. Usually the pr

Re: AddressBook Framework, adding multiple records

2008-12-12 Thread Alexander Reichstadt
Hi again, did nobody encounter this issue so far? >> There's already an instance of AddressBookSync running. I thought it would be related to making too many calls on sharedAddressBook, but it makes no difference whether I use the sharedAddressBook or addressBook, the message is logged as s

Re: Looking for info on creating Plugins/Modules

2008-12-12 Thread jonat...@mugginsoft.com
NSBundle is the way to go IMHO. It worked for me. see: http://developer.apple.com/documentation/Cocoa/Conceptual/LoadingCode/LoadingCode.html Plus I found these useful http://www.stone.com/The_Cocoa_Files/Thanks_A_Bundle_.html http://www.stone.com/The_Cocoa_Files/Dynamic_Bundles.html On 12 De

Re: Re: Text layout responsibility

2008-12-12 Thread Rimas
Hello Martin, Thank you for your response. > The text container isn't really responsible for that. It's job is to merely > define the geometric space available for text. I would expect you'll find it > easier to override NSTypesetter's > "willSetLineFragmentRect:forGlyphRange:etc:" method. I wil

Re: Announce the time every 30 minutes

2008-12-12 Thread Andrew Farmer
On 11 Dec 08, at 23:59, Mr. Gecko wrote: Does mac os x have some sort of a event sent out every 30 minutes? No, it does not. You can create one yourself with a timer, though. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Looking for info on creating Plugins/Modules

2008-12-12 Thread Chris Hanson
On Dec 12, 2008, at 12:16 AM, Kyle Sluder wrote: On Fri, Dec 12, 2008 at 2:58 AM, Tom Jones wrote: I'm hoping someone could point me in the right direction. Where would I read up on how to create modules or plugins for a Cocoa application? I'm not even sure I'm asking the right question :-

odd "image not found"

2008-12-12 Thread Torsten Curdt
It's quite strange. From time to time I get some user reports that my application failed to start. (via the (shameless plug) feedback reporter framework) http://vafer.org/projects/feedbackreporter/ But looking at the executable it looks just fine. And it also works just fine for me and many oth

Re: Undo for non-document based applications

2008-12-12 Thread K. Darcy Otto
On 10-Dec-08, at 8:54 PM, Graham Cox wrote: On 11 Dec 2008, at 2:53 pm, K. Darcy Otto wrote: I'm trying to get undo working with an application that is not document-based. So far, I think I have got the operation on the stack, but have yet to get the menu reflecting this. What I have s

Re: Looking for info on creating Plugins/Modules

2008-12-12 Thread Kyle Sluder
On Fri, Dec 12, 2008 at 2:58 AM, Tom Jones wrote: > I'm hoping someone could point me in the right direction. Where would I read > up on how to create modules or plugins for a Cocoa application? I'm not even > sure I'm asking the right question :-) CFPlugin. --Kyle Sluder ___

Re: Announce the time every 30 minutes

2008-12-12 Thread Mr. Gecko
Does mac os x have some sort of a event sent out every 30 minutes? On Dec 11, 2008, at 5:49 PM, Andrew Farmer wrote: On 11 Dec 08, at 15:14, Mr. Gecko wrote: Hell I'm trying to find out how to announce the time every 30 minutes, I'm guessing I have to do it with NSTimer and and than have th