View Full Version : Maps/toolbar/input help

11 Jul 2010, 2:18 AM
I'm new in Sencha Touch but I think it's very impressive!!!
I'm trying to make a new app but I have some difficulties:

1 - When I create new items in a toolbar (top) how can I decide the position of the elements (left,center,right)?

xtype: 'searchfield',
hidden: true,
name: 'q',
placeholder: 'Cerca',
listeners: {
keyup: {
fn: function() {
scope: this,
buffer: 400
}2- How can I get the item.value in the function instead of the alert?

cibuus.detailPanel.addListener("beforeactivate", onSelectHandler);

function onSelectHandler(pComponent){
var htmlStr = "<div class='dettagli'><img src='resources/img/" + selectedLocale.img + "' width='57' height='57' /><div class='info'><p class='nome'>" + selectedLocale.nome + "</p><p class='indirizzo'>" + selectedLocale.ind + "</p><p class='indirizzo'>Tel. " + selectedLocale.tel + "</p></div><br /><p class='descrizione'>" + selectedLocale.des + "</p></div>"

}3- How can I can add a map in this element?

4- I'm developing under Chrome and Safari but on Safari the input type "searchfield" doesn't show correctly, do you know that?

Thank you very much!

11 Jul 2010, 3:16 PM
1) The toolbar uses a hbox layout internally, so you size items the same way.

2) Not sure what you mean

3) Not sure what you mean

4) Are you saying it's not working on the desktop version of Safari?

11 Jul 2010, 10:59 PM
Thank you Evan.

2) I need to get the value of the input item that I'm creating "keyup event" for. In general, is there a simple way to access form object like getElementbyId?
3) I would like to add the map item to that panel, but the panel it's updated with an html string, how can I add the map in this panel dinamically?
4) Yes, on Chrome the searchfield it's ok but on Safari on Windows it's displayed without border and white background. On Iphone it seems ok.

12 Jul 2010, 1:01 PM
2) I have found another way.
3) I will open another thread for Map component that gives me some problems.

Thank you anyway.