Visure Easy - Direttamente sul tuo smartphone
Attraverso il browser del tuo smartphone potrai richiedere, pagare e scaricare la tua Visura!!
Visure Easy Mobile
Xcode 4 Tip: Automatically make IBOutlet, property, dealloc and
G.Morreale
1) Open Xcode 4
In order to make as property drag out outside the interface before the @end!!
Xcode 4 Tip: Automatically make IBOutlet, property, dealloc and
G.Morreale
1) Open Xcode 4
In order to make as property drag out outside the interface before the @end!!
Mac Os eject cd dvd problem
G.Morreale
From Java To Objective-C: String
From Java To Objective C: Strings
My Notes (part 2)
This is a very short introduction from my notes.
A good and complete starting point can be found by google.
The String.
In java we have String Class that represent a string, in objective C there is a NSString object.
Each string constant double quote in objective-c must be prefixed by @
Also in objective C, NSString is immutable like java String.
.objective c version
- NSString aString = @"hello world";
- NSString aString2 = [[NSString alloc] initWithString:@"Hello World2"];
- [aString release];
- #define CONSTANT1 @"HELLO";
- NSLog(@"debug string");
- NSString *ageString = [NSString stringWithFormat:@"%@ concatenate with %@", "age:", 18];
.java version
- String aString = "hello world";
- String aString2 = new String("Hello World 2");
- public static final String CONSTANT1 = "HELLO";
- System.out.println("debug string");
- String ageString = "age:" + " concatenate with " + 18;
From Java To Objective-C
From Java To Objective C
My Notes (part 1)
This is a very short introduction from my notes.
A good and complete starting point can be found by google.
I'm a java developer and when I'm going to learn objective-c for the iphone development the matching between the 2 languages became automatic.
Objective C is standard ansi C with object oriented extension.
So many OO arguments found in java can be find in objective C.
In objective C the class usually is split in two file:
- .h file for the class definition.
- .m file for the class implementation.
Let's go to see some code, this is only my simple notes.
.h file example
#import <UI/Class.h> //like import in java
//interface is a compiler directive, it tell that there is a class definiton
//myClassName the className
//NSObject the parent object
//<aProtocol> it respect the protocol definition (like abstract class in java)
@interface MyClassName: NSObject <aProtocol>
{
int count; //a simple primitive type
id *data; //Weak Type
NSString *aString;
//String type. *stay for pointer. all the instance object variable
//use this pointer notation
}
//property declare a class property
//nonatomic or atomic value regard the thread safety in the accessor method
//retain in the set accessor the variable value is retained
@property (nonatomic, retain) NSString aString
//this is a method interface definition
-(id)aMethod:(NSString)*paramName;
Flex AS3 Webservice Proxy and Object Binding
- The Object(default resultFormat) return data in form of ObjectProxy. ObjectProxy contains different datatypes like ArrayCollection etc. You would have to handle and parse this result obtaining the data you expect.
- XML format returns the data as an array of XMLNodes.
- E4X format gives an XMLList.
var ws:NameService = new NameService();
ws.addOperation1EventListener(onResultOperation1);
private function onResultOperation1(res:Operation1ResultEvent):void{var value:Operation1ReturnType = res.result._return;
}
//inside costructor possible parameter to be pass to the webservice //operationvar param:Operation1_request = new Operation1_request();ws.Operation1_request_var = param;
ws.Opearation1_send();
Java Hello World
G.Morreale
- the class notion
- the public modifiers
- the static method modifiers
- Array type
- String type
- a static method call (System.out.println(String a))
Maintaining state in Java Webservice(JAX-WS)
Flex AS3 call a Java Webservice
- Make a WebProject with a Webservice
- Make a MXML in flex side and code the call
Java and BlazeDS by Example
<destination id="echoServiceDestination" channels="my-amf">
<properties>
<source>remoting.EchoService</source>
</properties></destination>
<channel-definition id="my-amf" class="mx.messaging.channels.AMFChannel">
<endpoint url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/>
<properties>
<polling-enabled>false</polling-enabled>
</properties></channel-definition>
Make GUI with Flash and code by Flex!
- Make a simple flash project (FLA) with some movieclip
- Export it as flex component (SWC)
- Import it into flex builder and manage the imported movieclip.
<?xml version="1.0" encoding="utf-8"?><mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"><mx:Button x="10" y="10" label="Button"/></mx:Application>
Java and AMF by AS3 in Flash
Java, Flash, ActionScript and AMF
var nc:NetConnection=new NetConnection();nc.connect("http://localhost/amf/test1");var res:Responder=new Responder(onResult,onError);nc.call("func_name",res,"a_parameter");function onResult(e:Object):void{trace(e);}function onError(e:Object):void{trace("Error");}
Red5 is a video/audio streaming oriented solution and more close to the Adobe's Flash Media Server. It does also Flash remoting and remote shared objects which provide limited data connectivity. (BlazeDS does not have video/audio streaming.)

