Community Questions & Answers

get child at

I was wondering if there's a way to get number of children in a particular view. For instance, I want to get the total number of children in a scroll view then animate fade out and then delete it. Below is the code I'm trying to achieve coming from an AS3...

Access child object by name

I want to select a child by a custom property I have set: ~~~ var someItem = Ti.UI.createView({ height: 90, width: 90, backgroundColor: '#000', name: 'some_name' }); ~~~ I am able to do this by looping through...

How to get first element of parent object

Hi, Perhaps a stupid question but I am new to Titanium mobile and ran into a "problem". I have a button, which contains an image. When the button is clicked I want the image to change. How could I check in the event listener what image is...

How to get children of the current window?

Hi, i'm using Titanium 2.1.0, Android 4.1, Windows 7, I created a window in the app.js and I created an other file where i get the current window `var window = Ti.UI.currentWindow;` when i tried to get the children with `window.getChildren()` it returned...

Android child node

Hi, I'm trying to do some really simple and yet finding it a real challenge to do! I have a window in which I have a three views. I want to remove the second view using the 'children' function. I am able to do this fine in iOS however on Android i get an...

Dynamically hide parents children

I would like to hide dynamically created labels when one of the labels parents is clicked. Note the comment in the code below, it may help explain my goal. Basically, there is a main view, which has several subviews and each subview has a label. I want ALL...

Undefined is not an object error

Hi all, I'm getting an undefined object error, which I'm not sure what's causing it, because each line still returns what it is supposed to and the code continues to run without any issues. Is there anything wrong with this code? The menu is a view, with...

getChildren in 1.8

The following code ~~~ var win1 = Titanium.UI.createWindow({ backgroundColor : 'red' }); win1.add(Titanium.UI.createLabel({ text:"text", color:"black", backgroundColor:"white" })) Titanium.API.info("output1 : "...

view children Undefined

Hello, I don't understand why I continually get this error when run my application ~~~ [WARN] Exception in event callback. { expressionBeginOffset = 4773; expressionCaretOffset = 4799; expressionEndOffset = 4804; line = 177; ...

Info TiDOMElement

Hi, I need to get all Children of an TiDOMElement, but i can't find anything in the Docs for get them. I currently using this code: var c = TiDOMElementObj.getElementsByTagName('my_single_tag'); Ti.API.debug("child 0="+c.getChild(0) ); // is...

Open window within a modal

I have opened a modal window outside of my main stack and then tried to open another child window inside of the modal, this doesn't do anything. Doesn't even error. I have tried adding my modal window on the root namespace and then referring to it but...

Remove childs from view

Hi. I'm trying to remove the childs inside a view but I can't find how to do it. I've seen on other posts that the views have the `children` property, but it always gives me `null` I'm using Android API 2.1 and Titanium 1.4.

Remove child views from a popover

I have tried all tricks to remove child views from a popover but they all dont work the following error is logged instead [WARN] called remove for [object TiUIButton] on [object TiUIiPadPopover], but [object TiUIButton] isn't a child or has already been...

Showing 1-44 of 44