Hello
I am writing a network statistics application (a part of a bigger network
monitoring system).
On Windows I am using "spy++" application to figure out of what GUI Window
Classes are tabs of each browser and what window messages are sent to these
Tabs (in short, I can do analysis and build even
Thanks for the tips Fritz,
To address a couple of your points:
* Yes, my 'make the image square' method is a bit of a hack. It really should
be a fixed size and centred with respect to the textbox I'm drawing attention
to. That was stage 2 after getting it positioned correctly :)
* Thanks for
On Nov 25, 2011, at 5:17 PM, Steven Spencer wrote:
> I'm using a NSTrackingArea in a view to receive mouseMoved events.
> The cursor location in the mouseMoved and mouseDragged events have
> non-integer coordinates (as expected).
> e.g. x:140.601562 y:128.082031
Weird; I don’t think I’ve seen n
On Nov 25, 2011, at 7:17 PM, Steven Spencer wrote:
> I'm using a NSTrackingArea in a view to receive mouseMoved events.
> The cursor location in the mouseMoved and mouseDragged events have
> non-integer coordinates (as expected).
> e.g. x:140.601562 y:128.082031
>
> However, the mouseDown and mo
First of all, thanks all for the input.
After thinking about it a lot this morning, I probably should have approached
this with a different question :)
"Starting with a base64 encoded string, how do I obtain a series of float
values out of it?"
The string is obtained from an XML file (using NS
I want to display a window as a modal dialog.
Should I use just a Window Controller or also define another class that handles
the window contents.
-koko___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or modera
That is what I thought but just wanted too verify … thanks.
-koko
On Nov 26, 2011, at 12:28 PM, Dave Fernandes wrote:
> You can just subclass NSWindowController and make that subclass the File's
> Owner.
>
> Sent from my iPhone
>
> On 2011-11-26, at 2:14 PM, koko wrote:
>
>> I want to displ
On Nov 25, 2011, at 9:38 PM, Koen van der Drift wrote:
> Here is what I am doing, I read an NSString from the raw data, an xml file
> using NSXMLParser. This works ok. Then I convert that to an NSData object,
> and perform base64 decoding
No, you're not ;-) You read a string that is presumably
On Nov 26, 2011, at 4:23 PM, Scott Ribe wrote:
> No, you're not ;-) You read a string that is presumably already Base64
> encoded, then you stuff it into an NSData, then you Base64 encode that, then
> you decode it, leaving you with the original Base64 encoding intact...
>
> Instead of:
>
>>
On Nov 26, 2011, at 6:17 PM, Koen van der Drift wrote:
> Now I need to figure out how to go from u_int_32 to float.
I think I figured it out:
for (NSInteger n = 0; n < 4; n++)
{
u_int32_t value;
[base64DecodedData getBytes:&value range:NSMakeRange(n*
If the source code that is sending you the data in the first place is your own
code, you could have that code use the CFConvertFloat32ToSwapped() before
sending it, and then your client can use CFConvertFloat32SwappedToHost() to
convert it back, nice and easily.
At any rate, HostToBig is not wh
I've made a document based application. However whenever I switch to it through
the doc a new document is created even though I'm already working on one...
I cannot seem to find a way to prevent that from happening. I do not want it to
create a new document unless the user requests it. What setti
On Nov 26, 2011, at 6:37 PM, Charles Srstka wrote:
> If the source code that is sending you the data in the first place is your
> own code, you could have that code use the CFConvertFloat32ToSwapped() before
> sending it, and then your client can use CFConvertFloat32SwappedToHost() to
> conver
On Nov 26, 2011, at 5:44 PM, Koen van der Drift wrote:
>> At any rate, HostToBig is not what you want in the client, since you’re
>> swapping it *to* the host byte order, not *from* it. CFSwapInt32BigToHost()
>> would be more correct in that case, even though the two functions will both
>> do t
On Nov 26, 2011, at 4:17 PM, Koen van der Drift wrote:
> I'm pretty sure I messed up something. One of the reasons I posted it here :)
>
> After spitting through the internets, what I am using now is this:
>
> NSData *base64DecodedData = [NSData dataFromBase64String:
> @"Q5YIjESWO5JDlpIb
Koen van der Drift wrote:
u_int32_t value;
[base64DecodedData getBytes:&value range:NSMakeRange
(n*4, sizeof(u_int32_t))];
u_int32_t res = CFSwapInt32HostToBig(value);
float f;
memcpy(&f, &res, sizeof(f));
On Sat, Nov 26, 2011 at 4:17 PM, Greg Guerin wrote:
> Since you're just doing a memcpy(), you can simply cast the bits and avoid
> the copying. Try this:
>
> float f = *((float*) &res);
>
> Or try defining a C union:
>
> union foo { float f; u_int32_t u; };
> union foo bar;
> bar.u = CFSwapInt
On 26 Nov 2011, at 5:41 PM, April wrote:
> I've made a document based application. However whenever I switch to it
> through the doc a new document is created even though I'm already working on
> one...
> I cannot seem to find a way to prevent that from happening. I do not want it
> to create a
18 matches
Mail list logo