NSStream, parsing NSData to struct

2009-07-09 Thread Carlo Gulliani
hello, i have NSData ... NSData *d = [NSData dataWithBytes:(char*)&buffer length:len]; NSLog(@"%@", d); // and I have structure typedef struct mrim_header { u_long magic; u_long proto; u_long seq; u_long msg; u_long dlen; u_longIP; u_longPort; u_charReserved[16]; }mrim_header; how can i pa

Re: AsyncSocket. Troubles with MTMessageBroker didReceiveData

2009-07-07 Thread Carlo Gulliani
Nobody knows? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription:

AsyncSocket. Troubles with MTMessageBroker didReceiveData

2009-07-06 Thread Carlo Gulliani
I'm trying to send bytes with help AsyncSocket and MTMessageBroker At first, i have connection with static server, which return to me ip and port of dynamic server. i made so ... [socket connectToHost:@"here_is_ip" onPort:here_is_port error:&error]; // it's correct. I did receive new ip and por

Re: NSData. add 6 bytes to NSData

2009-07-04 Thread Carlo Gulliani
thanks for your reply, could you show me simple example how to add binary data to existing data and also to add header of 2 bytes i've been trying to use buffer but i have a troubles with result my code: #define PROTO_VERSION_MAJOR 1 #define PROTO_VERSION_MINOR 7 #define PROTO_VERSION

NSData. add 6 bytes to NSData

2009-07-04 Thread Carlo Gulliani
Hi, everybody, I need to add 6 bytes to my NSData steps: 1. write into NSData NSData *data = [NSData dataWithBytes:(const char*)&packet length:sizeof(packet)]; 2. read from NSData 3. In loop i need to add 6 bytes 4. And again wtite into NSData first step i did, and from 2 to 4 i dont know how

send 4bytes message and receive answer

2009-07-01 Thread Carlo Gulliani
i need to send 4 bytes message like 0x1001 to server and receive answer from it i use AsyncSocket and wrote the next code: ... [socket connectToHost:[arr objectAtIndex:0] onPort:theInteger error:&err]; ... -(void)onSocket:(AsyncSocket *)sock didConnectToHost:(NSString *)host port:(UInt16)port

Re: to check wifi connection. how?

2009-04-20 Thread Carlo Gulliani
wow, very good. many thanks ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update y

to check wifi connection. how?

2009-04-20 Thread Carlo Gulliani
is there easy way how to check is enabled wifi connection on mac or not? I need to show warning's alert (when app was launched) if the wifi's connection is not available. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not po

how to say app using only my plug-in?

2009-03-22 Thread Carlo Gulliani
I finished project, which use Flash player plug-in. But if user has same plug-in (but old version), my application load his. I wanna that app use just my plug-ins from my folder (myapp.app/Contents/PlugIns/Flash Player.plugin) and doesn't use system's plug-in. how to do so?

ipod touch and 2 UIViews

2009-03-16 Thread Carlo Gulliani
i have 3 classes: SwitchController and 2 classes for each XIB. i wanna change view with help 'mapCurl' effect, my SwitchController.m has the next code: - (void)viewDidLoad { SecondViewController*secondController = [[SecondViewControlleralloc] initWithNibName:@"SecondView"bundle:nil]; self.secon

how to modify 'PictureSharing' example?

2009-02-24 Thread Carlo Gulliani
I made app like 'PictureSharing'. In this example data changing just after i select my service in list (i should press on server line in Picture sharing browser to get new picture), how can i use NSNotificationCenter to catch event while my data is changed? In general i wanna change picture in P

how to listen event 'did change my data'

2009-02-21 Thread Carlo Gulliani
I'm trying to modify apple's examples: Picture Sharing and Picture Sharing Browser I creating iphone's app, which is my server side (Picture Sharing), also i creating standalone's app, which is client side (Picture Sharing Browser), which i launched on my mac. It works great, but when i

Re: how to receive some string from iphone's app to stanalne app on mac?

2009-02-10 Thread Carlo Gulliani
From: Ricky Sharp To: Carlo Gulliani Cc: cocoa-dev Sent: Monday, February 9, 2009 5:14:06 PM Subject: Re: how to receive some string from iphone's app to stanalne app on mac? Bonjour is just for discovery. You need to add in network code to send and receive data. Check out the P

Re: how to receive some string from iphone's app to stanalne app on mac?

2009-02-09 Thread Carlo Gulliani
yes, thanks, i have seen this example. but maybe you know how to add some kind of listener, which will listen when data is changed? 'coz in example i should select once again service's name for viewing new data From: Ricky Sharp To: Carlo Gulliani

how to receive some string from iphone's app to stanalne app on mac?

2009-02-09 Thread Carlo Gulliani
hi, everybody, i've 2 apps: ipone's app and app on my mac. i wanna receive some message from iphone to my mac's app. for example, my iphone's app has 2 buttons: -(IBAction) first { // here i should send message "FIRST" to mac's app } -(IBAction) second { // here i should send message "SECOND" t

Re: control app with help iphone?

2009-02-06 Thread Carlo Gulliani
ow, thanks, i've found some examples, i'll try to understand them From: Mike Abdullah To: Carlo Gulliani Cc: cocoa-dev Sent: Friday, February 6, 2009 1:09:30 PM Subject: Re: control app with help iphone? You want to read up on Bonjour. This is h

control app with help iphone?

2009-02-06 Thread Carlo Gulliani
good morning, everybody. Does anybody know how my app can receive command from iphone? for example, how appleremote app works from appstore? example, my iphone's app has 2 buttons: the first btn, the second btn. Also i have my app on mac in objective-c, with help iphone i wanna control my app,

how to use own plugin?

2009-02-02 Thread Carlo Gulliani
I have own plugin (i use flash player plugin for my web view component). My plugin is placed in MyApp.app/Contents/PlugIns/Flash player.plugin I need use only my plugin, but now i have the next: if user has Flash plugin already, my app is using it w/o my plugin, but if users hasn't plugin my app

continue to solve problem with enterFullScreenMode...

2009-02-02 Thread Carlo Gulliani
Hi all, on last week i was writing about how to change window decoration after launching. After some manipulation i've got enterFullScreenMode. My app has main window, which has webView. webView is web view object of WebKit class. My webView can send and receive any arguments to/from javascript.

Re: theoretical, can i use the same wave effect, which i can see when i adding new widget in dashboard?

2009-02-01 Thread Carlo Gulliani
yeah, i've found one f examples which demonstrating CIRippleTransition. thanks From: Nathan To: Carlo Gulliani Cc: cocoa-dev@lists.apple.com Sent: Sunday, February 1, 2009 11:12:20 PM Subject: Re: theoretical, can i use the same wave effect, which i ca

Re: theoretical, can i use the same wave effect, which i can see when i adding new widget in dashboard?

2009-02-01 Thread Carlo Gulliani
ok, thank for info, i'll try 2morrow From: Mike Abdullah To: Carlo Gulliani Cc: cocoa-dev@lists.apple.com Sent: Sunday, February 1, 2009 9:58:09 PM Subject: Re: theoretical, can i use the same wave effect, which i can see when i adding new widget in dash

theoretical, can i use the same wave effect, which i can see when i adding new widget in dashboard?

2009-02-01 Thread Carlo Gulliani
hi all, how can i use (make) the wave effect like in dashboard when i adding new widget? i'm trying to find info in google but i've not result. any ideas? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: change NSBorderlessWindowMask on NSTitledWindowMask when app is launch. how?

2009-01-30 Thread Carlo Gulliani
t frame. I think, when app is create new NSView, app hasn't declared all methods from old. so how can i make fullscreen, also having kept the old NSView? From: douglas welton To: Carlo Gulliani Cc: Cocoa-dev@lists.apple.com Sent: Thursday, January 29,

Re: change NSBorderlessWindowMask on NSTitledWindowMask when app is launch. how?

2009-01-29 Thread Carlo Gulliani
___ From: douglas welton To: Carlo Gulliani Cc: Cocoa-dev@lists.apple.com Sent: Thursday, January 29, 2009 11:46:22 PM Subject: Re: change NSBorderlessWindowMask on NSTitledWindowMask when app is launch. how? this line: [self makeFirstResponder: self]; should

Re: change NSBorderlessWindowMask on NSTitledWindowMask when app is launch. how?

2009-01-29 Thread Carlo Gulliani
[view exitFullScreenModeWithOptions:opts]; else { [view enterFullScreenMode:[selfscreen] withOptions:opts]; } [selffadeIn]; and i haven't result again:( From: douglas welton To: Carlo Gulliani Sent: Thursday, January 29, 2009 11:13:46 PM Subject:

Re: change NSBorderlessWindowMask on NSTitledWindowMask when app is launch. how?

2009-01-29 Thread Carlo Gulliani
na listen Mouse events, because my app use flash file and in full screen mode mouse's event doesn't works From: Alexander Spohr To: Carlo Gulliani Cc: Cocoa-dev Mailing List Sent: Thursday, January 29, 2009 8:31:21 PM Subject: Re: change

Re: change NSBorderlessWindowMask on NSTitledWindowMask when app is launch. how?

2009-01-29 Thread Carlo Gulliani
Sean McBride To: Carlo Gulliani ; Mike Abdullah Cc: Cocoa-dev@lists.apple.com Sent: Thursday, January 29, 2009 1:19:18 PM Subject: Re: change NSBorderlessWindowMask on NSTitledWindowMask when app is launch. how? Carlo Gulliani (carlogulli...@yahoo.com) on 2009-01-29 7:28 AM said: >thanks, i'

Re: change NSBorderlessWindowMask on NSTitledWindowMask when app is launch. how?

2009-01-29 Thread Carlo Gulliani
ow me a part of code which add new subview to new window from old? From: Mike Abdullah To: Carlo Gulliani Cc: Cocoa-dev@lists.apple.com Sent: Thursday, January 29, 2009 12:13:05 PM Subject: Re: change NSBorderlessWindowMask on NSTitledWindowMask when app is

Re: change NSBorderlessWindowMask on NSTitledWindowMask when app is launch. how?

2009-01-29 Thread Carlo Gulliani
i thought about it, but my app contain webView object, which is loading flash's animation. If i close first window and create new window with NSTitledWindowMask my flash animation is playing again from first frame. From: Mike Abdullah To: Carlo Gullian

change NSBorderlessWindowMask on NSTitledWindowMask when app is launch. how?

2009-01-29 Thread Carlo Gulliani
hi, everybody. I have a problem: Can I change styleMask when my app already is launch? When app is launching i use NSBorderlessWindowMask, when i press any button i wanna use NSTitledWindowMask? ___ Cocoa-dev mailing list (Cocoa-dev@lis

how to override all keyboard events?

2009-01-28 Thread Carlo Gulliani
Good time, everybody. I use WebView in my app, which is loading html with flash. I'm trying to catch keyboard events, so i added the next function to my NSWindow's class - (void)keyDown: (NSEvent *) event { NSLog(@"KEYDOWN: %@", event); } It works while i didn't press on any buttons in my flash