How can I return data in dataProvider of entering text in listRenderer?
Hi people,
I would like to set up a list that I can add/remove data from. I used a custom listRenederer to set up a list with 3 text entries in each line and fill in the data:
package
{
import flash.events.Event;
import flash.events.MouseEvent;
import qnx.ui.listClasses.AlternatingCellRenderer;
import qnx.ui.listClasses.CellRenderer;
import qnx.ui.text.KeyboardType;
import qnx.ui.text.TextInput;
import qnx.ui.text.TextInputIconMode;
public class ColumnCellRendere extends AlternatingCellRenderer
{
private var column1:TextInput;
private var column2:TextInput;
private var column3:TextInput;
public function ColumnCellRendere()
{
super();
}
override protected function init():void
{
column1 = new TextInput();
column1.restrict = "0-9";
column1.keyboardType = KeyboardType.PHONE;
column1.clearIconMode = TextInputIconMode.NEVER;
column1.width = 50;
addChild(column1);
column2 = new TextInput();
column2.restrict = "0-9";
column2.keyboardType = KeyboardType.PHONE;
column2.clearIconMode = TextInputIconMode.NEVER;
column2.width = 50;
column2.x = 60;
addChild(column2);
column3 = new TextInput();
column3.restrict = "0-9";
column3.keyboardType = KeyboardType.PHONE;
column3.clearIconMode = TextInputIconMode.NEVER;
column3.width = 50;
column3.x = 120;
addChild(column3);
column1.addEventListener(MouseEvent.CLICK, onClick);
column1.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
super.init();
}
private function onClick (e:MouseEvent):void
{
dispatchEvent(new Event(Event.SELECT, true, true));
}
private function onMouseDown (e:MouseEvent):void
{
e.stopImmediatePropagation();
}
override public function set data(data:Object):void
{
super.data = data;
column1.text = data.col1;
column2.text = data.col2;
column3.text = data.col3;
}
}
}
I can happily fill the list, but when I want to change the values, I can't have the data to account for the data provider. Similarly, if I add a new line to the list, I end up with empty values in table dataProviders and cannot work out how to get the new data into it. Any help appreciated.
In your 'data' function, maintain a reference to it:
private var _data: Object;
So, in theory, when the data changes, you can
This._data.Col1 = this.column1.text; or what ever.
Will need this code to ensure that it can do what you want.
Tags: BlackBerry Developers
Similar Questions
-
Hello
I lost the password I gave to a drive using Bitlocker in Windows 7, how can I return it or I can get the data in the back of the player? Data are very important because by my studies are concerned. Help, please. Thank you!Hello
I lost the password I gave to a drive using Bitlocker in Windows 7, how can I return it or I can get the data in the back of the player? Data are very important because by my studies are concerned. Help, please. Thank you!People like you that encryption data with bitlocker do it because they want their data accessible only by those who have the certificate. The sad news for you is that you have made a good choice with BitLocker: unless you have the certificate, your data remains inaccessible. There is no backdoor. If he had then BitLocker would be useless. -
How can I return to 4.0 3.6 I've never had a problem with 3.6 and now 4.0 crashes all the time tell me how to go back
Downgrade to Firefox 3.6 first of all uninstall Firefox 4, but do not select the option 'remove my Firefox personal data '. If you select this option, it will delete your bookmarks, passwords and other user data.
Then you can install the latest version of Firefox 3.6 available to http://www.mozilla.com/en-US/firefox/all-older.html - it will automatically use your favorite courses, passwords etc.
I recommend, to avoid possible problems with decommissioning, accessing your profile folder and delete the following files if they exist - extensions.cache, extensions.rdf, extensions.ini, extensions.sqlite and localstore.rdf. Delete these files will force Firefox to rebuild the list of installed extensions, check their compatibility and cancel the toolbar customizations.
For more information on how to find your profile folder, see https://support.mozilla.com/kb/Profiles
-
How can I return the path of a test step VI in LabVIEW?
I would create a VI that will return all of the VI paths that are associated with the test steps in a TestStand sequence. How can I return the path of the VI associated with a test step? Here is a starting point that will return the first step of the sequence.
You must convert the Module to a LabVIEWModule (use the variant to the data node), then you can use LabVIEWModule.VIPath. If you use TestStand 2010, you can call LabVIEWModule.GetVIAbsolutePath to find the VI in the case you are calling with a project.
-
How can you save data of the iCloud on an external hard drive?
How can I record data of the iCloud on an external hard drive?
Is not possible. iCloud requires a Wi - Fi connection to synchronize data. Cannot do it on an external drive.
-
I use the beta version, how can I return to the basis of Firefox?
How can I return to the basis of Firefox instead of the beta?
Backup of your profile and you will not lose your add-ons and bookmarks.
-
How can I return Ipad lost the Original owner
How can I return Ipad lost to the Original owner. I found this in a restaurant and he didn't. is it possible to give that ipad
Of course, follow this:
Report a lost or stolen - Apple Support Apple product
Please send back
EDIT: of course, you can leave in the police station the nearest and the report as lost, place, time, etc. or to personnel in the site you found.
-
After a recent update the keyboard appears in the center of the screen, rather than at the end. How can I return it down?
Press and hold the keypad icon bit, then slide your finger up to 'Dock '.
-
How can I download data from key USB flash to a Windows 7 computer
I need to transfer some files from my PC to my PC Windows 7 Windows XP using a USB flash key. I've used Windows Easy Transfer to move my files without problem and some programs but did not download some files. I downloaded these files on a USB flash and I can access the files, as long as the stick is pluged. How can I download data from the USB flash on my Windows 7 computer
Hello
The following video may help:
http://www.YouTube.com/watch?v=hrMQh0Xkpvs
or this article:
http://www.swarthmore.edu/documents/administration/its/how%20To%20Use%20A%20USB%20Flash%20Drive.PDF
and here:
http://TECHTIPS.salon.com/use-USB-flash-drive-transfer-files-PC-Mac-2544.html
(Mac here can be a PC).
Good luck.
-
my audio syestem of beats went when I choose windows 8, how can I return it with the full version? I have hp pavilion dv4 5110tx
Hello
Try the following.
Download IDT Audio Installer on the link below and save it in your downloads folder.
http://ftp.HP.com/pub/SoftPaq/sp59501-60000/sp59882.exe
One time finished, open windows control panel, open Device Manager and open sound, video and game controllers. Right click on the IDT device and select uninstall - also, you should get a command prompt to delete the current driver, check the box allow this and then proceed to uninstall.
Then, download and reinstall the Chipset driver on the following link.
After reinstalling, restart the laptop and let Windows load completely. Open your download folder, right-click on the IDT Installer and select "Run as Administrator" to launch the installation. When this has completed, restart the computer again before checking if the Beats Audio is now listed in the windows control panel.
Kind regards
DP - K
-
How can I save data in text format
How can I save data in text format in labwindows cvi
Hello
If your data is in a table, the easiest is to use the ArrayToFile function.
Automatically, it creates a file and puts your data in it depending on the size you provide.
If you have individual samples you need to write from time to time, you can either collect them in a table and then use ArrayToFile or open a file with fopen and write them as they are acquired with fwrite.
Hope this helps,
-
How can I return my computer dell laptop to factory settings
How can I return my lap top to factory settings
-
How can I return the audio for my lap top.
Original title: audio sound
I inadvertently deleted something that gives me sound on my lap top. I think it is silverlight. How can I return the audio for my lap top. THX
Hello
1 have had any changes made on the computer before the show?
2. what operating system is installed on the computer?
3. when exactly do you face the question?
I suggest to return the item and try to run the fix it:
No sound in Windows
http://Windows.Microsoft.com/en-us/Windows/help/no-sound-in-Windows
Please provide more information to help you best.
-
How can I return my T5i factory settings?
How can I return my T5i factory settings? I have problems with flash and counting and thinking, I may have inadvertently changed a setting. Appreciate any help. Thank you
Yes
-
I pressed a button on the accident and he took off to be a Director. Now, I am not recognised and cannot do things on my computer. How can I return my administrator status?
Log in as the built-in Administrator and change yourself (or leave you the user account and only use the administrator account if necessary.)
Maybe you are looking for
-
continuous reboot of failed reset
I had a broken screen and has been using the laptop with HDMI to my TV screen. I tried to reset the original hard drive to get rid of excess software and virus potential because he was slow. I didn't know that the computer would not automatically r
-
L80 Gigaframge driver for Windows 7
Hello There is no driver for gigaframe L80 for Windows 7 working as a clone or something else?I also tried looking for a vista driver but I found nothing. Thank you
-
Hi people, Anyone know how much memory is in an OfficeJet 5510? If this is not the case, can you please tell me how to find out? I can't find the answer in * any * sheets I've read. Thank you! James
-
This should be an easy question. I try to use the "write to the spreadsheet" VI from Labview 8.0 but I need to change to accept arrays of strings, rather than arrays of doubles. 8.2 does it automatically, but I'm stuck using 8.0. The instructions in
-
I received last week a number of windows updates, installed them except one who is not 18 times in 7 days. It's the "update for windows mail filter mail junk (March 2009) (KB905866). How can I make this? Missing just whether stationary or during the