reading data from a UDP port - questions

2008-03-16 Thread Jason Ellemor
Hi, I have a device which basically outputs a UDP data stream. FYI the protocol specs are at : http://www.enttec.com/docs/enttec_protocol.pdf I found a really helpful post on the forum here titled : Re: Listen on a UDP Port( http://lists.apple.com/archives/cocoa-dev/2008/Feb/ msg01180.ht

Re: Convert NSString to FSRef

2008-03-16 Thread stephen joseph butler
On Sat, Mar 15, 2008 at 2:04 PM, Kevin Dixon <[EMAIL PROTECTED]> wrote: > Also, is there a better way to accomplish this? There are a lot of buggy or unnecessarily complex answers in this thread. Use the code at the bottom of this CocoaDev link and be done with it: http://www.cocoadev.com/index

Re: Best Way To Lookup From a Huge Table

2008-03-16 Thread Paul Thomas
On 15 Mar 2008, at 02:35, Scott Ribe wrote: Of course, for me, the "simplest" way would probably be std::map< int, string >, but that's just my personal taste. Just out of interest (this is a common problem) - how would you initialise a std::map with 41000 entries? pt. ___

Fullscreen NSWindow or NSView?

2008-03-16 Thread Audun Frøysaa
Hello. As a learning path I am trying different things. I want to create a fullscreen app, but i don't now if i should use NSWindow or NSView. I do now NSView has the enterfullscreenmode that i could use, but how can i add and remove other subviews? For NSWindow i use this code: NSI

Re: Convert NSString to FSRef

2008-03-16 Thread Nir Soffer
On Mar 16, 2008, at 10:11, stephen joseph butler wrote: On Sat, Mar 15, 2008 at 2:04 PM, Kevin Dixon <[EMAIL PROTECTED]> wrote: Also, is there a better way to accomplish this? There are a lot of buggy or unnecessarily complex answers in this thread. Use the code at the bottom of this Co

Re: Convert NSString to FSRef

2008-03-16 Thread Jean-Daniel Dupas
Le 16 mars 08 à 07:49, Stuart Malin a écrit : Kevin, Here's two variants that you can start to work with. Use the first one if it works. The second one is a more roundabout way of getting the NSString to bytes. Two disclaimers: 1: I have never worked with CF functions before, but have b

Re: reading data from a UDP port - questions

2008-03-16 Thread Jens Alfke
On 16 Mar '08, at 12:25 AM, Jason Ellemor wrote: I guess, I don't fully understand the code posted enough because I can't seem to access the dictionary object created and posted to the notifications with the previous example. The code is sending the dictionary as the object of the notifica

Re: Fullscreen NSWindow or NSView?

2008-03-16 Thread Jens Alfke
On 16 Mar '08, at 2:46 AM, Audun Frøysaa wrote: But how can i display other views? Just add them as subviews of the window's contentView. But almost certainly what you really want to do is to design your views layout in Interface Builder, then load the window from the nib, just as all th

Re: Convert NSString to FSRef

2008-03-16 Thread Jens Alfke
On 15 Mar '08, at 11:49 PM, Stuart Malin wrote: 1: I have never worked with CF functions before Then, with all due respect, you might want to hold off giving advice to others until you get some more experience with it. CF can be tricky to work with. (1) Both of your examples leak memory

CA: How to wait for an animation to finish?

2008-03-16 Thread Jens Alfke
One thing I still haven't figured out how to do in Core Animation is how to schedule an animation to start after previous animations have finished. Anyone know how? For example, in GeekGameBoard, moving a checkers piece is done by (1) Changing the piece's superlayer to be the root layer, inst

Re: CA: How to wait for an animation to finish?

2008-03-16 Thread Joachim Deelen
Hi Jens, maybe the Delegation Method: - (void)animationDidStop:(CAAnimation *)animation finished: (BOOL)finished; is what you are looking for?! regards Joachim Am 16.03.2008 um 17:03 schrieb Jens Alfke: One thing I still haven't figured out how to do in Core Animation is how to schedule

Re: Convert NSString to FSRef

2008-03-16 Thread Stuart Malin
Jens, Thank you for pointing these out. I provided the info I did because I hadn't seen anyone else reply to Kevin with detailed code suggestions, but rather, vague suggestions. I stated clearly that my suggestion was from a Cocoa perspective on how to convert NSString to bytes, and were

Re: CA: How to wait for an animation to finish?

2008-03-16 Thread Jens Alfke
On 16 Mar '08, at 9:43 AM, Joachim Deelen wrote: maybe the Delegation Method: - (void)animationDidStop:(CAAnimation *)animation finished: (BOOL)finished; is what you are looking for?! It would be, if I had a CAAnimation object. But I don't. All I did was something like "layer.position = n

Re: CA: How to wait for an animation to finish?

2008-03-16 Thread Jens Alfke
On 16 Mar '08, at 10:15 AM, I wrote: It would be, if I had a CAAnimation object. But I don't. All I did was something like "layer.position = newPos". That creates an implicit animation behind the scenes, but I don't see any way to get the object corresponding to that animation, so I have n

Re: Convert NSString to FSRef

2008-03-16 Thread Michael Ash
On Sun, Mar 16, 2008 at 5:41 AM, Nir Soffer <[EMAIL PROTECTED]> wrote: > > On Mar 16, 2008, at 10:11, stephen joseph butler wrote: > > > On Sat, Mar 15, 2008 at 2:04 PM, Kevin Dixon <[EMAIL PROTECTED]> wrote: > > > >> Also, is there a better way to accomplish this? > > > > > > There are a lo

Re: Convert NSString to FSRef

2008-03-16 Thread Adam R. Maxwell
On Mar 16, 2008, at 11:15 AM, Michael Ash wrote: On Sun, Mar 16, 2008 at 5:41 AM, Nir Soffer <[EMAIL PROTECTED]> wrote: On Mar 16, 2008, at 10:11, stephen joseph butler wrote: On Sat, Mar 15, 2008 at 2:04 PM, Kevin Dixon <[EMAIL PROTECTED]> wrote: Also, is there a better way to accompl

Re: CA: How to wait for an animation to finish?

2008-03-16 Thread John Harper
On Mar 16, 2008, at 9:03 AM, Jens Alfke wrote: One thing I still haven't figured out how to do in Core Animation is how to schedule an animation to start after previous animations have finished. Anyone know how? If you're using implicit animations, the best way currently is via NSObject'

Moving a window to another Spaces space?

2008-03-16 Thread Tim Conkling
If a user clicks and holds on the title bar of a window while switching spaces in Leopard, the window will be carried to the switched-to space. Is there any way to duplicate this functionality? (I have a custom window dragging loop, and my windows are being left behind if a user switches spaces du

Re: Moving a window to another Spaces space?

2008-03-16 Thread Charles Steinman
--- Tim Conkling <[EMAIL PROTECTED]> wrote: > If a user clicks and holds on the title bar of a > window while > switching spaces in Leopard, the window will be > carried to the > switched-to space. > > Is there any way to duplicate this functionality? (I > have a custom > window dragging loop, a

Another newbie, into and cry for help...

2008-03-16 Thread Neil Jones
Dear list I'm just getting started with Cocoa and Obj-C. I've done a little bit of Java in the past but mainly I'm a tcl scripter. Apologies for the wordiness of the following. I've been following some of the tutorials and so far have been pretty successful at finding the bugs I've introd

Re: Another newbie, into and cry for help...

2008-03-16 Thread Neil Jones
On 16 Mar 2008, at 20:06, Neil Jones wrote: In the NSPersistentDocument Core Data Tutorial, I have had the thing working all the way until I added the Department - now the interface all works as expected but I cannot save my data anymore. If I invoke the File -> Save As option and enter a

Re: Moving a window to another Spaces space?

2008-03-16 Thread Tim Conkling
Good guess! This works, with a few weirdnesses: - It occasionally breaks window layering in a strange way (the window doesn't necessarily stay on top across space switches). - Saving and restoring the collection behavior produces strange results if the application is already set to appear in "Ever

Re: Another newbie, into and cry for help...

2008-03-16 Thread Michael Watson
For what it's worth, without meaning any offense, "another newbie, cry for help" is not a very good subject for your question. Remember that subjects are useful for searching and also determine who reads what sometimes. ;-) -- m-s On 16 Mar, 2008, at 16:43, Neil Jones wrote: On 16 Mar

Re: Binding Tree Controller to a singleton

2008-03-16 Thread Florent Pillet
Michael Hanna wrote: My question is, how do I make a keypath from the tree controller to the treeModel, since it's sitting inside a singleton? Would programmatically setting the binding accomplish this? If you have a NSApp subclass, an easy way to accomplish this is to add an accessor method

Re: Moving a window to another Spaces space?

2008-03-16 Thread Kyle Sluder
On Sun, Mar 16, 2008 at 5:21 PM, Tim Conkling <[EMAIL PROTECTED]> wrote: > I guess I could try to determine the application's space assignment > before attempting this collectionBehavior juggling -- anyone have > ideas of how I might go about that? A boolean ivar that you set to YES when the mo

Re: Moving a window to another Spaces space?

2008-03-16 Thread Tim Conkling
I don't follow... I'm looking for a way to determine whether the application has an "Every Space" assignment in the Spaces preference pane. On Sun, Mar 16, 2008 at 4:54 PM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > On Sun, Mar 16, 2008 at 5:21 PM, Tim Conkling <[EMAIL PROTECTED]> wrote: > > I gu

Re: Best Way To Lookup From a Huge Table

2008-03-16 Thread John Stiles
Well, at the risk of sounding silly, you call insert 41,000 times. Were you expecting a more exciting answer? :) Paul Thomas wrote: On 15 Mar 2008, at 02:35, Scott Ribe wrote: Of course, for me, the "simplest" way would probably be std::map< int, string >, but that's just my personal taste

Distributed Objects NSPortTimeoutException

2008-03-16 Thread Mac QA
Hi, I've been working on a project using Distributed Objects, and been having an issue that I haven't been able to debug all week. I started with the example code from Chapter 18 & 19 of the Advanced Mac OS X Programming book -- its the chat server (chatterd) and chat client (ChatterClient) progra

NSButtonCell doesn't visually update during trackMouse:inRect:ofView:untilMouseUp:

2008-03-16 Thread Ben Lachman
I have a few NSButtonCells that I'm using in a custom view. I need them to track the mouse during clicks and do this by calling NSCell's trackMouse:inRect:ofView:untilMouseUp:. This works fine except that the button cells never update their graphical state by highlighting or whatever. Ho