triangulating webcams

2008-07-12 Thread em
I'm proto-typing a tri-screen GUI. I have 3 mac minis in a local network and would like to triangulate their three web-cams. It's purely exploratory self-funded research on my part at this point. Any positive, constructive replies would be appreciated. -em One laptop per child--one

Problem: Glyps get drawn outside Line Fragment Rect.

2008-07-12 Thread chaitanya pandit
In my custom NSTextView i override NSTextContainer's lineFragmentRectForProposedRect: sweepDirection: movementDirection: remainingRect: method to lay text only in certain parts of the text view, so in this method, i return the line fragment rectangles in which i allow text to be laid. The

Re: how to get the status of network when the network is set disable.

2008-07-12 Thread xiaobin
Thank you the quickly advices of Michael and Mike very much. I test Michael's sample, it works well. But I think the SCNetworkReachability API is also used to try to connect to the server, right? What I want is to get the status of the network without any connection to the server. Maybe What I

Re: Trashing files and undo

2008-07-12 Thread Charles Srstka
On Jul 12, 2008, at 2:25 AM, Ruotger Skupin wrote: Hi, if I get you right, you are suggesting I put an alias to the file into (say) ~/Library/Application Support/MyApp/UndoAliases/ remember the original path/filename then trash the file. To get it back I resolve the alias and move/rename

Re: garbage collection and NSConnection

2008-07-12 Thread Marcel Weiher
On Jul 12, 2008, at 8:25 AM, Michael Ash wrote: On Sat, Jul 12, 2008 at 2:25 AM, Marcel Weiher [EMAIL PROTECTED] wrote: So as I said: (a) object allocation slowest (b) out-of-band retain count slow (c) inline retain count much faster than either. Well that all makes sense, thanks.

Servicing Core Animations?

2008-07-12 Thread Chilton Webb
Hi, I have a core animation layer backed view that doesn't animate. It only happens to not animate during mousedown events. Is there something I have to do to make it work, or is it likely I'm short circuiting something, somewhere? It doesn't animate, or move at all. But when I release the

Re: Servicing Core Animations?

2008-07-12 Thread I. Savant
I have a core animation layer backed view that doesn't animate. It only happens to not animate during mousedown events. Is there something I have to do to make it work, or is it likely I'm short circuiting something, somewhere? Hard to say with what you've provided. Do you have custom -

mysterious core data crash

2008-07-12 Thread Daniel Richman
Hi All, I'm trying to create a simple Core Data app. I've done this before with success. I'm using an NSArrayController set to Entity mode. The entity is a chemical with three string attributes: chemid, name, and description. In MyDocument.xib, I've created a table view and done all the

Re: garbage collection and NSConnection

2008-07-12 Thread Gary L. Wade
Marcel Weiher wrote: uint16_t _rc; Oh, the horror of it all! Only 65,535 objects can retain a string!!! What am I to do when I model all the citizens of the US voting for just one presidential candidate in November, and the retain count overflows?!?! Okay, that's not a real concern

Updating print panel preview

2008-07-12 Thread chaitanya pandit
I have a document based application in which i need to print about 50-70 pages of NSTextView, the printing is working fine, but in the small print preview shown in the print panel, it doesn't show all the pages. Like if there are say 50 pages to be printed, it'll show only abt 20 pages

Re: ArrayController

2008-07-12 Thread I. Savant
On Jul 12, 2008, at 3:29 PM, Ashley Perrien wrote: Click the add button to add a line, click through the table and fill in the fields to get the data in. Instead what I want is to have several textfields in the view, fill those out, click add, it performs all the necessary operations with

Re: triangulating webcams

2008-07-12 Thread Gary L. Wade
Sounds intriguing; at first thought, you may want to consider Xgrid to provide such collaboration, although it may not be what you're needing; there's other means to provide collaborative networking between Macs. If you want feedback on an experimental GUI, try the mac-gui-dev list on Yahoo

Re: ArrayController

2008-07-12 Thread mmalc Crawford
On Jul 12, 2008, at 12:29 PM, Ashley Perrien wrote: when I click the add button which calls a method in MyDocument it ultimately does a [array addObject: newobject] and the arraycontroller is not being notified that the array is being updated so it's not redrawing the table. Any tips on

Re: mysterious core data crash

2008-07-12 Thread mmalc Crawford
On Jul 12, 2008, at 11:00 AM, Daniel Richman wrote: The entity is a chemical with three string attributes: chemid, name, and description. http://developer.apple.com/documentation/Cocoa/Reference/CoreDataFramework/Classes/NSPropertyDescription_Class/Reference/NSPropertyDescription.html

Re: garbage collection and NSConnection

2008-07-12 Thread Michael Ash
On Sat, Jul 12, 2008 at 1:24 PM, Marcel Weiher [EMAIL PROTECTED] wrote: No, the inline reference count is available for all CF objects, and not limited to 64 bit. What version of the structure are you looking at? For example http://www.cocoadev.com/index.pl?HowToCreateTollFreeBridgedClass

re: mysterious core data crash

2008-07-12 Thread Ben Trumbull
Whenever I try to add a new item, the app crashes. I don't get the normal gdb window: instead I get a window that says 'loading stack frames' and the assembly code. The line that the program seems to be stuck on is this: 0x92efbfe2 +0018 call 0x92efbfe7 CFBagAddValue+23 But here's the

Re: mysterious core data crash

2008-07-12 Thread Daniel Richman
Of course. I actually realized this with chemid (it had been id) but I had completely forgotten about description. Thanks to all. Daniel mmalc Crawford wrote: On Jul 12, 2008, at 11:00 AM, Daniel Richman wrote: The entity is a chemical with three string attributes: chemid, name, and

Re: garbage collection and NSConnection

2008-07-12 Thread Gary L. Wade
It looks like it was expanded in 10.5, then, but 10.4 and prior use the 16-bit variables. Regardless of whether it handles overflows or not, my little joke was meant to illustrate that too many developers (generally speaking) think that resources (generally speaking) are unlimited and put no

Janky Tab View Behavior

2008-07-12 Thread Jamie Phelps
I'm really hoping this is some stupid thing I'm doing wrong. When I first open the window pictured, I get the behavior shown in the screenshot. I can click where the tabs should be and get the other tab, after which it behaves as it should. Anyone have an idea wth is going on with this?

Re: Servicing Core Animations?

2008-07-12 Thread Chilton Webb
Hi Professor Savant, Confirmation that it should work was what I was after, so after reading your email, I decided to write up a test app, and it happens there, too. This is the problem distilled to its simplest form. I welcome any feedback, mockery, etc. If I use the option in (1) below, it

Re: triangulating webcams

2008-07-12 Thread Andrew Farmer
On 12 Jul 08, at 12:57, Gary L. Wade wrote: Sounds intriguing; at first thought, you may want to consider Xgrid to provide such collaboration, although it may not be what you're needing; there's other means to provide collaborative networking between Macs. If you want feedback on an

Re: how to get the status of network when the network is set disable.

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 9:46 AM, xiaobin wrote: I test Michael's sample, it works well. But I think the SCNetworkReachability API is also used to try to connect to the server, right? What I want is to get the status of the network without any connection to the server. The SC reachability API does

importing sqlite data into a core data database

2008-07-12 Thread John Velman
This seems to be revisiting an old question, but I haven't been able to find an answer. I have an existing set of data in sqlite. To be honest, it isn't set up in the schema I'd most like, yet, but in sqlite I know how to transform it, and put it into the desired schema. I like the features

Setting Up Socket Streams

2008-07-12 Thread StaS Bandol
Hi all, I have a basic(for most of you) question. I´m trying to make a very simple app that will have 1 button (for example) and when its pushed the app will create a socket connection with a host and will send it a message(command). So , i used this: - (IBAction)reset:(id)sender {

Re: importing sqlite data into a core data database

2008-07-12 Thread Chris Hanson
On Jul 12, 2008, at 4:54 PM, John Velman wrote: So, being new to Cocoa, XCode, objective-c, How do I get my data into my new Cocoa / core data database? I can think of two approaches off hand: 2) writing an import routine for my application, using NSTask (?) and sqlite3. This would

Re: Setting Up Socket Streams

2008-07-12 Thread Chris Hanson
On Jul 12, 2008, at 5:22 PM, StaS Bandol wrote: I have a basic(for most of you) question. I´m trying to make a very simple app that will have 1 button (for example) and when its pushed the app will create a socket connection with a host and will send it a message(command). To head this

RE: Triangulating webcams

2008-07-12 Thread em
Thanks much for your thoughtful responses. I found both of them helpful. A few years ago I ran across the MPI framework, but I don't think this required Xgrid, altho you'd certainly need someway to identify network nodes. I don't think MPI requires Xgrid, but I certainly could be wrong on

importing sqlite data into a core data database

2008-07-12 Thread Steve Steinitz
Hi John, On 12/7/08, [EMAIL PROTECTED] wrote: 1) a) generate my application in XCode, use the sqlite storage option, put in some dummy data, then use sqlite3 to explore the resulting schema, b) transform my data into the new schema using sqlite3 and sql. Replace the sqlite file created by my

NSURLConnection substitutes characters?

2008-07-12 Thread kentozier
Hi I wrote a class (PHPInvocation) that handles all the nitty gritty details of preparing NSURLRequests, NSURLConnections etc for calls to PHP scripts, but have run across this nasty bug. What's happening is that somewhere between the creation of an NSURLConnection and the target PHP script, +

Re: NSURLConnection substitutes characters?

2008-07-12 Thread Bill Bumgarner
On Jul 12, 2008, at 7:17 PM, [EMAIL PROTECTED] wrote: I don't know if this is a Cocoa problem or a PHP problem but does anyone know if or why Cocoa would do this conversion? If it is a Cocoa feature how would I make it preserve the data exactly as it's given? The first thing I'd do is

Click to edit

2008-07-12 Thread Stefan Arentz
I would like to use text labels that turn into editable text fields when you click them. Like Address Book has when you edit an address card. Does anyone know how those work? Is it a matter of flipping the editable property or are those custom controls? S.

Re: NSURLConnection substitutes characters?

2008-07-12 Thread Stefan Arentz
On Jul 12, 2008, at 10:17 PM, [EMAIL PROTECTED] wrote: Hi I wrote a class (PHPInvocation) that handles all the nitty gritty details of preparing NSURLRequests, NSURLConnections etc for calls to PHP scripts, but have run across this nasty bug. What's happening is that somewhere between

Re: importing sqlite data into a core data database

2008-07-12 Thread John Velman
Thanks, Chris, Using the SQLite 3 api as you suggest sounds good, but there are a couple of things that must be obvious to the initiated, but not to me (yet). As I understand, the SQLite 3 api is a C api. Can I do C function calls directly from Objective C? Seems plausible, since Obj C is an

Re: how to get the status of network when the network is set disable.

2008-07-12 Thread Stefan Arentz
On Jul 9, 2008, at 8:22 AM, xiaobin wrote: Hello, I am writing a program to detect the status of network. In my program, I need get the status of network when the connection is set disable. here it is not by connecting the network to get the status. which API or method can work for it?

Re: importing sqlite data into a core data database

2008-07-12 Thread John Velman
See below: On Sun, Jul 13, 2008 at 12:09:13PM +1000, Steve Steinitz wrote: Hi John, On 12/7/08, [EMAIL PROTECTED] wrote: 1) a) generate my application in XCode, use the sqlite storage option, put in some dummy data, then use sqlite3 to explore the resulting schema, b) transform my data

Re: importing sqlite data into a core data database

2008-07-12 Thread Stefan Arentz
On Jul 12, 2008, at 11:25 PM, John Velman wrote: Thanks, Chris, Using the SQLite 3 api as you suggest sounds good, but there are a couple of things that must be obvious to the initiated, but not to me (yet). As I understand, the SQLite 3 api is a C api. Can I do C function calls

Re: NSURLConnection substitutes characters?

2008-07-12 Thread kentozier
-- Original message -- From: Stefan Arentz [EMAIL PROTECTED] If you want to send Base64 encoded data in a query parameter (or post data) then you will need to 'percentage-escape' it properly. In which case a '+' needs to be translated to a '%2b'. Bingo!

Re: NSURLConnection substitutes characters?

2008-07-12 Thread kentozier
-- Original message -- From: Stefan Arentz [EMAIL PROTECTED] If you want to send Base64 encoded data in a query parameter (or post data) then you will need to 'percentage-escape' it properly. In which case a '+' needs to be translated to a '%2b'. I

Trigonometric Problem, Particularly tan() Function

2008-07-12 Thread Patrick Walker
For some reason, using standard trigonometric functions are not behaving as they should once you hit 90 degrees. I'm not importing another framework/library and assuming the ones I'm calling are the same ones found in the standby math.h. The functions return correct values until you

Re: Trigonometric Problem, Particularly tan() Function

2008-07-12 Thread Ivan Kourtev
Just to make sure, you are aware those functions from math.h take arguments in radians, and not degrees, right? -- ivan On Jul 13, 2008, at 12:30 AM, Patrick Walker wrote: For some reason, using standard trigonometric functions are not behaving as they should once you hit 90 degrees. I'm

Re: NSURLConnection substitutes characters?

2008-07-12 Thread Stefan Arentz
On Jul 13, 2008, at 12:25 AM, [EMAIL PROTECTED] wrote: -- Original message -- From: Stefan Arentz [EMAIL PROTECTED] If you want to send Base64 encoded data in a query parameter (or post data) then you will need to 'percentage-escape' it properly. In which

Re: Trigonometric Problem, Particularly tan() Function

2008-07-12 Thread Patrick Walker
Yes, I'm aware that you need to supply radians. Everthing appears to be fine when going from 0 to 45 degrees but at 90 degrees, the tangent returns -22877334. I've even tried doing the tan(x) = sin(x) / cos(x) approach. On 13-Jul-08, at 1:36 AM, Ivan Kourtev wrote: Just to make sure, you

Re: Click to edit

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 7:50 PM, Stefan Arentz wrote: I would like to use text labels that turn into editable text fields when you click them. Like Address Book has when you edit an address card. Does anyone know how those work? Is it a matter of flipping the editable property or are those

Re: Triangulating webcams

2008-07-12 Thread Stefan Arentz
On Jul 12, 2008, at 9:40 PM, em wrote: ... I can easily transport 'strings' over a network using UDP multi- casting/broadcasting via Quartz Composer, but some of these strings may get a little lengthy. What's a good language statement(s) (obj c API) for transporting small (10MB) data

Re: Trigonometric Problem, Particularly tan() Function

2008-07-12 Thread Graham Cox
Show your code. Obviously the tan() function works as it should, so it must be how you're using it. Graham On 13 Jul 2008, at 2:43 pm, Patrick Walker wrote: Yes, I'm aware that you need to supply radians. Everthing appears to be fine when going from 0 to 45 degrees but at 90 degrees,

Re: Trigonometric Problem, Particularly tan() Function

2008-07-12 Thread Michael Ash
On Sun, Jul 13, 2008 at 12:43 AM, Patrick Walker [EMAIL PROTECTED] wrote: Yes, I'm aware that you need to supply radians. Everthing appears to be fine when going from 0 to 45 degrees but at 90 degrees, the tangent returns -22877334. I've even tried doing the tan(x) = sin(x) / cos(x)

Re: Triangulating webcams

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 6:40 PM, em wrote: I can easily transport 'strings' over a network using UDP multi- casting/broadcasting via Quartz Composer, but some of these strings may get a little lengthy. What's a good language statement(s) (obj c API) for transporting small (10MB) data

Re: Trigonometric Problem, Particularly tan() Function

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 9:43 PM, Patrick Walker wrote: Everthing appears to be fine when going from 0 to 45 degrees but at 90 degrees, the tangent returns -22877334. That's not what I get. I just compiled and ran: printf(tan(90) = %g\n, tan(M_PI/2)); which printed: tan(90) =

Re: importing sqlite data into a core data database

2008-07-12 Thread Chris Hanson
On Jul 12, 2008, at 8:33 PM, Stefan Arentz wrote: If that's OK so far, how about linking? Is Linking to the SQLite library transparent from XCode? Looks like the CoreData framework is directly linked against sqlite. That doesn't matter. If you want to use the SQLite 3 API from your

Re: Re: How to make the FileOwner of a nib file accessible globally in whole project (JArod Wen)

2008-07-12 Thread JArod Wen
Now I have found a possible solution, which is working well to me: just simply change the declaration in header file by adding extern keyword, which will prevent the instant being created repeatedly. Wish this helpful to others. On Jul 1, 2008, at 2:53 PM, [EMAIL PROTECTED] wrote:

Re: NSURLConnection substitutes characters?

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 9:25 PM, [EMAIL PROTECTED] wrote: Is there some content type I could use other than application/x-www- form-urlencoded that would work with PHP scripts? You can use any content-type you like, but your PHP script will then have to read the data from the input stream

Re: importing sqlite data into a core data database

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 8:25 PM, John Velman wrote: I'd be happy to be pointed to the right documentation! I've read a few hundred pages in the past week, but haven't come across anything directly related to this. Introduction to the sqlite3 API: http://www.sqlite.org/cintro.html Full API

Re: Setting Up Socket Streams

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 5:22 PM, StaS Bandol wrote: but my 192.168.1.1 still not recieve nothing... where i'm wrong? That's because you didn't write anything to the streams. You just opened and scheduled them. You need to wait for the streams to finish opening them, then write to the output

Problem on reload data source of a table view

2008-07-12 Thread JArod Wen
Hi all, I met some problems on updating the content of my table with the following scenario: My table is contained in a separated window(tableWindow.xib), so I use a TableController class to control it(File's Owner of the window). The following is the instant of TableController:

NSMenuItem custom view and isHighlighted

2008-07-12 Thread Francisco Tolmasky
I'm trying to use the new custom views in NSMenuItem from within an NSPopUpButton. However, I would like these items to still be selectable, that is, if the user lets go while hovering on top of one, I'd still like the NSPopUpButton to use it's index for the displayed item. I can't seem

Re: Problem on reload data source of a table view

2008-07-12 Thread Jens Alfke
On 12 Jul '08, at 10:35 PM, JArod Wen wrote: The problem is that after I update the data source, which is tableSource in tableController, [dataTable reloadData] will not update the table view in the window You're sure that, at runtime, 'dataTable' is not nil? It's easy to overlook an