»
S
I
D
E
B
A
R
«
Progress up to 11th April
4月 11th, 2009 by admin

The implementation of the platform is a bit delayed. Waited some time due to the failure of migrating the platform into a new server.

The migration problem is:

The platform can only upload some photos but not all type of photos in the new server. It doesn’t really related to the file type or file size. Or say, the new server cannot receive some photos uploaded from the platform. It may because of the header sent from the application to the server is no accepted by the server.

Anyway, it spent me lots of time and energy in seeking for the solutions that may not be easily appliable therefore I cancelled the migration plan and continue my development of the platform in the original platform.

The event post feature with the tag logging part is implemented, and currently implementing the member display part. It is more or less the same with the event tag display modules. What the most important part: search feature, will be implemented in the coming week.

Previously I predict to have the testing period in April but it will be postponed to the late April. The deadline of the Final Year Project is coming. Eventhough there is a bit different from my plan for the resulting platform, it still give me a lots experience in platform development.

To be honest, if I can implement it in HTML + PHP + MySQL and without considering about the creative design,  it would be much easier to work out what I expect. However, my advisor’s really true sentence:”It is no need to work out something that other people can work out easily.” Well, that’s why I keep using Flex as the tool and work out what I want: A map-based information platform-to link up data with geographic constrain for easier information search.

fyp_090411_01

fyp_090411_02

fyp_090411_03

Failure in moving the FYP platform from old to new server
4月 3rd, 2009 by admin

Just sign-up a new domain and webhosting for hosting the FYP, but with lots of efforts did and I finally decided to withdraw from such move.

During the early phrase of my FYP platform design, I has already consider to group all server’s related setting/ variables to a particular so-called setting file. This practice is learnt from my previous programming experience in some companies and such practice work on my project as well. I can overcome many diffuculties that I encountered during the migration, as soon as I think all migration is done, I found out the Avatar uploading component does not work.

With detail investigation, I reduced the scope of mystery to the “Flex:FileReference” part adn I found that the backend does not receive any call that generated by FileReference.upload(). I checked the target destination of that upload call and I implemented many flow checkpoint by logging the backend programs as well as the flex application but, sadly, all features work properly in the current server but not the new server.

Despite almost all the steps are overcome, I finally decided stop migrating the platform to the new server, saving time not for solving this problem which may finally resulted by some server’s header filtering mechanism that I cannot handle, but to spend more time focusing on the platform development.

Up to these days, I implemented the event posting part as well as newly added the ‘tag’(keyword) logging features, which will be very useful for the later ’search’ feature implementation.

fyp_20090402

RichTextEditor - default text/font size using CSS
3月 27th, 2009 by admin

Flex does not display Chinese text in a friendly way as all default font/text size is 10pt, for which it is too small for Chinese words to be well displayed in Flex application. For the InfoBox for the event of my application, it contains poster-defined content so I wish to use RichTextEditor as the tool for user to edit the event description with more variety, like font style, font size and color, etc. These 2 days concentrates onto the Flex RichTextEditor components. As soon as I use the component, I found it is difficult to set default value of font-size simply.

At first I tried to use actionscript to set the fontSizeCombo to select the desired size value, well, the fontSizeCombo really selected the value I wish to be selected, sadly the textArea still keep the default 10pt font size setting. Then I tried to make an event dispatch so as to simulate the comBoBox item select action using mouse, and again it seems that I am unable to make such a simulation. I tried to seek for way to set that font size attribute and no method is mentioned in the Internet.

However, I was told to use CSS as the way to set the default font/text size.
http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=60&catid=585&threadid=1434939&enterthread=y
It really makes me surprise that the htmlText attribute of the RichTextEditor is not worked in a way I think of: with a font size attribute and when ever text is inputted into the textarea, set that text as that size. It seems to work as first using CSS to render the content of textArea, and then transforming them into html format so as to return as a String type.

Hope this post sharing useful to someone else.

fyp_20090326_01

Suitable to use font size as 12 for Chinese Characters

fyp_20090326_02

Up to this state’s platform-view

More watchable phrase
3月 25th, 2009 by admin

Throughout last few days, I had been working so tide on my Final Year Project “EvtLog”. And today, with consuming 7 hours continuously, solving bugs and bugs and again bugs, I finally work out a more presentable version of my FYP:

Most of my previous effort was spent on the back-end development and algorithm:

The design of registration flow
The design of profile flow
The design of event adding flow
The design of Database schema
The re-design of User Interface
The enhancement of User Interface
The procedure of profile editing (basic information)
The procedure of member’s location capturing
The procedure of profile avatar handling
The procedure of event adding

Later I started to implement the event display and untill today, I finally make the event display part more or less presentable. With the record list panel, user can click the panel or directly click the tag on the map for the event information. Why do the platform provide both the map tag view as well as the panel? The panel is good for user to know the name of the event in a glance while user can know event’s location from the map.

The Infomation box’s content is not yet optimized but at least what I inputted into the database can be shown onto the map control view now.

I will try my best in making it more watchable before Thursday as there is a chance to meet CEO of OpenRice.com in the Industrial night of FYP.

AS3 associative array
3月 17th, 2009 by admin

Associative array is used so commonly when I write PHP program, for AS3, I used it when I pass extra data for an Event Listener. This passage is not going to discuss about how to pass parameter for Event Listener but to share how I found that the so-called “associative array” is not simply an array but is an onject, for which for a new AS3 programmer, I haven’t imagine about this.

I used to use associative array as it is quite easy to understand what the structure of the data is. For example, I have a variable called “applicationVar”, then for the following code:

applicationVar['name']=”My application”;
applicationVar['author']=”Gordon”;
applicationVar['version']=”1.0″;

By passing 1 variable, people can get the data in bulk which is the advantage of using array, and also instead of using numeric index, I can use those bracketed terms to get the extra information and the program is more readible.

However for me to do the same thing in AS3, I found it seems not so easy to do so:

One direct way is:

var applicationVar:Array=[{name:"My application",author:"Gordon",version:"1.0"}];

But this is not allow to add further item dynamically.

or to use the push function:

var applicationVar:Array=new Array();
applicationVar.push({name:”My application”,author:”Gordon”,version:”1.0″});

But it result that I need to pass 1 more ‘index’ to that ‘array’:

Alert.show(applicationVar[0]['name']); //My application

That extra “[0]” is so ugly.

And finally I found out that AS3 do not suggest people to use Array to achieve the associative array concept:

Do not use the Array class to create associative arrays (also called hashes), which are data structures that contain named elements instead of numbered elements. To create associative arrays, use the Object class. Although ActionScript permits you to create associative arrays using the Array class, you cannot use any of the Array class methods or properties with associative arrays.

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Array.html

The method of Using Object instead Array to achieve the associative array concept is:

var applicationVar:Object = new Object();
applicationVar.name = “My application”;
applicationVar.author = “Gordon”;
applicationVar.version = “1.0″;
for (var item in myArray) {
trace(item); // name,author,version
trace(myArray[item]); // My application, Gordon, 1.0

This is the sharing about how to use associative array in AS3.
}

»  Substance: WordPress   »  Style: Ahren Ahimsa