Wednesday, May 23, 2012

iPhone Sencha Touch: In which JS / HTML file I need to start my application?

I have started implementing my application using phone gap and Sencha Touch.



I have added sencha touch sdk to my application using kitchen sink application.



When I execute the app it displays a list of user interfaces, etc on left side and a home page for sencha touch kitchen sink app on right side.



When I select any rows they shows buttons, lists, pickers and different types of demos as shown in kitchensink demo.



But I need to create my own views rather than kitchen sink demo views.



Here i have bundle of .JS & HTML files in wich file i need to start my application,



How should i create a basic panel as initial step in which .JS file?





Architecture and Serialisation advice

I need a bit of a architecture help, I think what I've been doing may not necessarily be the best approach.



Things to note:




  • This is not an android specific question.

  • Android does however require that I need to serialise objects across 'screens'.



Consider the following:



I'm currently working on a game for android where a character class needs to be passed between different screens. In order to do this I need to serialise the objects. Taking into account that are different types of characters that will be needed I'd like to create a class that inherits for each of these. Where I have static characters I'd like to inherit from the Character class and set the defaults such as 'Name', and 'Description' within the constructor.



Current implementation:



I'm passing the serialised sub class objects around. ( Eg: UserCharacter with a base of Character ) Ideal situation would for me to be able to deserialise the object as it's base class however that doesn't seem to me work. The only working solution I have for this at the moment is by doing the following when trying to do serialise:



new XmlSerializer(typeof (Character, new [] { typeof(CharacterUser)}));


This allows me to pass in multiple sub types. This however is not feasible in the long term as it just means code duplication across my application as well as everytime a new character sub class is created I need to add at it any point I would need to deserialise. I'd rather have the code written and working where I leave it to do it's own thing. I'm sure you can understand that.



Another thing I've tried is to do is use IXmlSerializable on the character object and deal with the Reading and Writing independantly. I think that this however requires implementation of a list to work correctly? Currently my ReadXml never gets called. (Great idea, but it's not worked for me so far)



Anyone got any ideas I could try?



I think it's quite an open question, please let me know if I need to scope a little differently.





Simple script for tracking products sales , refunds etc

I need a script for tracking the product sales , refunds etc. ,& it should save the customers emails/pay pal address . This is for iPhone unlocking website , the customer hits on checkout button , purchase the product . Then after purchasing , the sale record must be saved with his pay pal email.



Please take a look on live website , I need something similar to this



http://tinyurl.com/coz8vg9



check the back end functionality of script here



http://tinyurl.com/dyq8a8k



username - nee
pass - testpass



It's a simple script , tracked all the orders in this website. I need to use the similar script or plugin in my word press website so if someone pointed me to word press script/ plugin , which can do same things then it will be useful., Or if someone just tell me the name of the script , which is used in above domain then it will be much useful, so I will purchase it .



Thanks





C# game development after XNA

I am a game developer who made games in .Net languages with XNA for the past four versions of it.



I am surveying the ecosystem of game engines, looking for something that supports coding in Visual Studio (I use F# heavily, believe it or not!) and I am having trouble finding something that is high quality, still alive, and high performance to replace XNA. Unity for example misses the mark because it only allows for scripting in MonoDevelop, while I want a more developer friendly experience.



So what is a good replacement for XNA?





TableView does not always resize the columns

I have a TableView with CONSTRAINED_RESIZE_POLICY column resize policy.
It works great when I resize the window manually, but when I maximize it or restore it from a maximized state, the columns do not adjust.



Is there a way to force a "refresh" on the TableView so columns resize in these cases?





Repeater inside a Repeater

I have a Repeater inside a Repeater, how can a use the code below:



<input type="hidden" value='<%# Container.ItemIndex %>' />


pointing to the first repeater?





asp.net mvc3,c#

I want separate friends facebook and twitter.
Like this :



Twitter Facebook



EditorTemplates: FriendModel.cshtml



@model App.Web.Models.FriendModel
<div>
<input type="checkbox" name="saveInputs" value="@Model.FriendID"/>
<img alt="" src="@Model.ProfileImageUrl" />
<strong>@Model.Name</strong> Friends: <strong>@Model.FriendsCount</strong>
</div>
<br />


Views: FriendTeam.cshtml



@model App.Web.Models.FriendTeamModel
@{
ViewBag.Title = "FriendTeam";
}
<h2>
FriendTeam</h2>

@using (@Html.BeginForm())
{ @Html.ValidationSummary(true)
<h3>Twitter</h3>
<br />
@Html.EditorFor(model => model.Friends.Where(x=>x.SocialNetworkName=="Twitter"))

<h3>Facebook</h3>
<br />
@Html.EditorFor(model => model.Friends.Where(x=>x.SocialNetworkName=="Facebook"))
}
<div>
@Html.ActionLink("Back to List", "Index")




FriendTeamModel:



   public class FriendTeamModel
{
public long FriendTeam{ get; set; }
public IEnumerable<FriendModel> Friends { get; set; }
}


FriendModel:



public class FriendModel
{
public string FriendID { get; set; }
public string SocialNetworkName { get; set; }

public string Name { get; set; }
public int FriendsCount { get; set; }
public string ProfileImageUrl { get; set; }
}


error :
Models can only be used with expressions access field of homeownership, the index of one-dimensional array or custom indexer single parameter.



Thanks,