Events have me stumped

I'm a flex noob and have been stuck on this one problem for
hours and still haven't found a solution - any suggestions?
My application includes a custom component (canvas container
with 10 comboboxes). I populate each of the comboboxes with data I
collect from my database using simple SQL queries (SELECT DISTINCT
MIXES FROM MYTABLE, etc). The custom component isn't displayed at
startup and isn't between the <mx:Application> ...
</mx:Application> tags but I would like to populate the
comboboxes at application startup so that they are ready for
display later. Initially I thought that a simple
creationComplete="initCombos()" call in my custom component mxml
would do this but I found that this function is called 10 times for
each of the comboboxes, which overwhelms the database. Setting a
boolean flag to ensure that the initCombos function was only called
once also didn't help - the flag is reset :(
Is there an event that I can trigger when the custom
component has been completely created i.e. after all the combos
have been created?
I tried applicationComplete in the application mxml but how
do I reference a function in the custom component mxml. I can
reference a public function in the application mxml from my custom
components mxml using the Application.application.Function1
approach but not vice versa. I am hesitant to create a custom event
and am eager to hear of possible solutions to this. TIA
Andre

Here's some code - sorry I'm pasting as is but the "Attach
Code" button isn't showing.
This is my application mxml showing the initApp function
called after the creationComplete event. It calls my custom
component that is embedded within customWidget.
<code>
<mx:Application
xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:awx="
http://www.arcwebservices.com/2007/awx"
xmlns:widget="com.esri.aws.awx.widget.*"
xmlns:custom="components.*"
xmlns:local="*"
xmlns:view="view.*"
layout="absolute"
horizontalAlign="center"
verticalAlign="middle"
pageTitle="TxFlex Database"
creationComplete="initApp()">
<mx:Script>
<![CDATA[
import mx.containers.VBox;
import mx.controls.Alert;
import com.esri.aws.awx.widget.WidgetPopupManager;
import com.esri.aws.awx.map.layers.overlays.BubbleMarker;
import components.*;
private function initApp():void {
WidgetPopupManager.openWidget(customWidget);
]]>
</mx:Script>
<awx:DockWidgetContainer>
<widget:MyWidget id="customWidget"/>
<awx:BaseMapWidget/>
<awx:FindWidget/>
<awx:PanZoomWidget/>
</awx:DockWidgetContainer>
</mx:Application>
</code>
Here's the custom component trimmed down. The function I
would like to run at startup is initArrays().
<code>
<mx:Canvas
xmlns:mx="
http://www.adobe.com/2006/mxml"
width="225"
height="225">
<mx:Script>
<![CDATA[
import mx.core.Application;
import mx.collections.ArrayCollection;
[Bindable]
private var Database_dp:ArrayCollection;
private var response:Responder;
private var SQL:String;
private function getDatabases(Database:Array):void {
var DatabasesForComboBox:Array=new Array(Database.length);
DatabasesForComboBox[0]={label:"ALL",data:"%"};
for(var i:int=1;i<=Database.length;i++) {
DatabasesForComboBox
={label:Database[i-1].ORIGINAL_DB,data:Database[i-1].ORIGINAL_DB};
Database_dp=new ArrayCollection(DatabasesForComboBox);
public function initArrays():void {
response=new
Responder(getDatabases,Application.application.onFault("DB
Error"));
SQL="SELECT DISTINCT ORIGINAL_DB FROM SEC_DEF;";
Application.application.gateway.call("TxFlex.doSQL",response,SQL);
response=new
Responder(getFacilities,Application.application.onFault("FAC
Error"));
SQL="SELECT DISTINCT FACILITY_TYPE FROM SEC_DEF;";
Application.application.gateway.call("TxFlex.doSQL",response,SQL);
response=new
Responder(getDistricts,Application.application.onFault("District
Error"));
SQL="SELECT DISTINCT DISTRICT FROM SEC_DEF;";
Application.application.gateway.call("TxFlex.doSQL",response,SQL);
response=new
Responder(getCountys,Application.application.onFault("County
Error"));
SQL="SELECT DISTINCT COUNTY FROM SEC_DEF;";
Application.application.gateway.call("TxFlex.doSQL",response,SQL);
response=new
Responder(getClimates,Application.application.onFault("Climate
Error"));
SQL="SELECT DISTINCT CLIMATE FROM SEC_DEF;";
Application.application.gateway.call("TxFlex.doSQL",response,SQL);
response=new
Responder(getLayers,Application.application.onFault("Layer
Error"));
SQL="SELECT DISTINCT LAYER_TYPE FROM SEC_DEF;";
Application.application.gateway.call("TxFlex.doSQL",response,SQL);
]]>
</mx:Script>
<mx:Label text="Database" width="70" fontWeight="bold"
x="10" y="10"/>
<mx:ComboBox dataProvider="{Database_dp}" id="cbDatabase"
width="120" x="88" y="8"
change="numberSections()"></mx:ComboBox>
<mx:Label x="10" y="36" text="Facility" width="70"
fontWeight="bold"/>
<mx:ComboBox x="88" y="34" dataProvider="{Facility_dp}"
id="cbFacility" width="120"
change="numberSections()"></mx:ComboBox>
<mx:Label x="10" y="62" text="District" width="70"
fontWeight="bold"/>
<mx:ComboBox x="88" y="60" dataProvider="{District_dp}"
id="cbDistrict" width="120"
change="reDistrict()"></mx:ComboBox>
<mx:Label x="10" y="88" text="County" width="70"
fontWeight="bold"/>
<mx:ComboBox x="88" y="86" dataProvider="{County_dp}"
id="cbCounty" width="120"
change="numberSections()"></mx:ComboBox>
<mx:Label x="10" y="114" text="Climate" width="70"
fontWeight="bold"/>
<mx:ComboBox x="88" y="112" dataProvider="{Climate_dp}"
id="cbClimate" width="120"
change="numberSections()"></mx:ComboBox>
<mx:Label x="10" y="140" text="Layers" width="70"
fontWeight="bold"/>
<mx:ComboBox x="88" y="138" dataProvider="{Layer_dp}"
id="cbLayer" width="120"
change="numberSections()"></mx:ComboBox>
<mx:Button label="Map Sections" width="120"
id="btnUpdate" click="filterSections()" x="88" y="192"
toolTip="Plot markers identifying the filtered sections on the
map"/>
<mx:Label x="10" y="166" text="Number of filtered
sections" fontWeight="bold"/>
<mx:Label x="173" y="166" text="..." width="35"
textAlign="right" id="lblN" color="#ff0000"/>
</mx:Canvas>
</code>
Here's my widget container that holds the custom component
which is displayed using <custom:sectionFilter
id="buttonBox"/>
<code>
<mx:VBox
xmlns:mx="
http://www.adobe.com/2006/mxml"
xmlns:widget="com.esri.aws.awx.widget.*"
xmlns:custom="components.*"
implements="com.esri.aws.awx.widget.IWidgetView">
<mx:Script>
<![CDATA[
import com.esri.aws.awx.widget.WidgetStates;
import com.esri.aws.awx.widget.IWidget;
private var m_widgetContainer:IWidgetContainer;
[Bindable]
private var m_widget:MyWidget;
public function get widget():IWidget {
return m_widget;
public function set widget(value:IWidget):void {
m_widget=value as MyWidget;
public function set widgetState(value:String):void {
currentState=value;
public function get widgetState():String {
return currentState;
public function get widgetContainer():IWidgetContainer {
return m_widgetContainer;
public function set
widgetContainer(container:IWidgetContainer):void {
m_widgetContainer=container;
]]>
</mx:Script>
<mx:states>
<mx:State name="{WidgetStates.INFO}">
<mx:RemoveChild target="{buttonBox}" />
<mx:AddChild>
<mx:Text width="214" text="Use this filter tool to narrow
your search. Only markers for those sections that satisfy your
filter criteria will be shown." />
</mx:AddChild>
</mx:State>
<mx:State name="{WidgetStates.ICON}">
<mx:RemoveChild target="{buttonBox}" />
<mx:SetStyle target="{this}" name="paddingLeft" value="0"
/>
<mx:SetStyle target="{this}" name="paddingTop" value="0"
/>
<mx:AddChild>
<widget:IconWidgetView toolTip="Filter Sections"
widget="{m_widget}"
upIcon="@Embed(source='/images/customUp.png')"
downIcon="@Embed(source='/images/customDown.png')"
overIcon="@Embed(source='/images/customOver.png')"
disabledIcon="@Embed(source='/images/customDisabled.png')"
/>
</mx:AddChild>
</mx:State>
</mx:states>
<custom:sectionFilter id="buttonBox"/>
</mx:VBox>
</code>
Hope this all makes sense.

Similar Messages

  • Many contacts and calendar events have disappeared

    Many of my contacts and calendar events have suddenly disappeared. Can they be retrieved?

    Mine too. I have a J Home and J Work calendar. The J Home calendar is completely gone and had all my personal events. I checked iCloud and it is gone there. No one has access except me. I opened my calendar on my iphone this afternoon to add an appt for my son. The data was there and basically disappeared in front of my eyes. I didn't touch the calendars menu until everything was gone so it wasn't me. I'm losing my mind right now. Everything is gone...just gone.
    I just noticed my wife's shared calendars also no longer appear on my phone or iCloud. Both of her calendars appear on her iCloud and they still say they are shared with me. That's just f****n great. iCloud broke something and I'm the one to suffer. I'll bet anything Apple won't do anything to help as they don't back up iCloud data. I'm sure they do as they are required by law, but they won't admit it. SONOFA!!!!

  • I have downloaded IOS7 on my iPhone and all calendar events have disappeared. The general functions of the calendar have changed and are definitely not 'user friendly'. How can I retrieve my calendar events. Will Apple improve the calendar function

    I have downloaded IOS7 on my iPhone and all calendar events have disappeared. The general functions of the calendar have changed and are definitely not 'user friendly'. How can I retrieve my calendar events. Will Apple improve the calendar function or revert to the previous system. Even the typing function on IOS 7 is faulty - very slow to respond to the keyboard. I no longer enjoy using my iPhone. Can anyone assist. Thank you

    Very strange! All of my calendar events have reappeared. This has happened one week after downloading iOS 7
    The calendar however,  is not easy to use.
    The typing function on the phone has  become even slower. Have to wait for each letter to show on screen.

  • Upon syncing my iPhone and mac all of my ical and iPhone calendar events have duplicated. how can i fix this and avoid it in the future?

    upon syncing my iPhone and mac all of my ical and iPhone calendar events have duplicated. how can i fix this and avoid it in the future?

    Greetings,
    Questions:
    1. What version of the Mac OS are you running (Apple > About this Mac)?
    2. What version of the iOS are you running (Settings > About)?
    3. Do you backup your computer (http://support.apple.com/kb/HT1427)? 
    --- If you don't regularly backup your computer, now is the time to start.
    4. Do you backup your iPhone (http://support.apple.com/kb/ht1766)?
    Check the calendar list on the left hand side of iCal.  Is it that the individual events are duplicated or is it just that you have the same calendar listed more than once?  If its that you have more than 1 copy of each calendar, you can delete one of the duplicate calendars to eliminate the duplicates.
    If you find that it is the individual events that are duplicated then there are 2 options:
    1. Restore your computer iCal database or iPhone from a backup made before the duplication occurred.
    2. Use a duplication removal program (or do it by hand) to remove the duplicates: http://www.nhoj.co.uk/icaldupedeleter/
    If you have a backup made before the duplication occurred, reply back with what kind of backup you have and I'll suggest how to recover the calendars.
    To avoid this issue in the future:
    Keep regular backups.  They are your best defense against data anomalies which are a fact of life in computers (although hopefully rare).
    Keep your computer and iPhone software fully up to date (Apple > Software Update / Settings > General > Software Update).
    Make sure the date and time on your computer and iPhone are correct before you sync the two devices.
    Make sure the cable connections between the two is solid and that the cable shows no signs of physical damage.
    Hope that information helps.

  • In setting up ICloud on my new Iphone 4s, I lost most of my calendar events in my Outlook 7 calendar.  I used to have MobileMe but in the set-up process was told to turn that off which I did but now most of my calendar events have disappeared

    In setting up ICloud on my new Iphone 4s, I lost most of my calendar events in my Outlook 7 calendar in my Vista PC.  I used to have MobileMe but in the set-up process was told to turn that off, which I did but now most of my calendar events have disappeared after syncing with ICloud.  How can I get my missing calendar events back?  They are still on my 3Gs Iphone which I have not yet updated to IOS5.
    Thanks for any help.
    marybpod

    Plug your phone into the wall charger for at least 30 minutes...make sure you have a sim card in the phone...then:
    Leave the USB cable connected to your computer, but NOT your phone, iTunes running, press & hold the home button while connecting the USB cable to your dock connector, continue holding the home button until you see “Connect to iTunes” on the screen. You may now release the home button. iTunes should now display that it has detected your phone in recovery mode, if not quit and reopen iTunes. If you still don’t see the recovery message repeat these steps again. iTunes will give you the option to restore from a backup or set up as new.
    Make sure you have no anti-virus software running or any firewalls...turn all of that stuff off.

  • (final cut pro x 10.0.9 )After numerous troubleshooting tips, I am still getting the dreadful your disk have ran out of space, your events have moved or permissions have changed. This happened after I moved some files to another drive. They won't relink?

    (final cut pro x 10.0.9 )After numerous troubleshooting tips, I am still getting the dreadful your disk have ran out of space, your events have moved or permissions have changed. This happened after I moved some files to another drive. They won't relink eventhough the files are there.

    (final cut pro x 10.0.9 )After numerous troubleshooting tips, I am still getting the dreadful your disk have ran out of space, your events have moved or permissions have changed. This happened after I moved some files to another drive. They won't relink eventhough the files are there.

  • How can you tell if all photos in an event have a Place assigned?

    How can you tell if all photos in an event have a Place assigned, without clicking every photo in the event individually with the Info bar open to see if there is a little map in the bottom left hand corner please?
    cheers

    Terence Devlin wrote:
    File -> New -> Smart Album
    Event -> Contains -> Name of Event
    Plus
    Place -> Does not contain -> leave the last field blank
    Thanks for that, just getting used to these brilliant smart albums, do I have to have one of these smart albums for every event though? can I not just use it for all photos?
    cheers

  • Many security events have been identified by the proxy stack.

    On our Lync Edge servers I can see lots of warning events are getting generated every second. Any idea how to stop this events.
    Log Name:      Lync Server
    Source:        LS Protocol Stack
    Date:          3/26/2014 5:40:43 AM
    Event ID:      14425
    Task Category: (1001)
    Level:         Warning
    Keywords:      Classic
    User:          N/A
    Computer:      servername
    Description:
    Many security events have been identified by the proxy stack.
    In the past 55 seconds, 30 security events have been identified by the proxy stack. A large number of security events could indicate that the server is under attack. The last event was:
    $$begin_record
    LogType: security
    Text: The connection from a remote user client is refused because remote user access is disabled
    Result-Code: 0xc3e93d6d SIPPROXY_E_CONNECTION_EXTERNAL_INTERNET_ACCESS_DISABLED
    Peer-IP: 192.168.10.1:50224
    Peer: 192.168.10.1:50224
    $$end_record
    Cause: The server may be under attack, or there might be a configuration problem that is causing errors.
    Resolution:
    Launch the Lync Server 2010 Logging Tool. Select the "SIPStack" component, the "Errors" level and the TF_SECURITY flag. Review the events reported to the trace log using the "Analyze Log Files" feature of the logging tool.

    Hi,
    What's your Edge NIC and certificate configuration? And the DNS SRV records?
    It may happen because the Lync server does not pass the correct certification authority information back to the Lync client during the negotiation of the TLS connection.
    You can refer to the part “Workaround” in the link below:
    http://support.microsoft.com/kb/2464556
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

  • Photos in some events have disappeared....

    Photos in some events have disappeared leaving a grey image of a sunset and palm tree. I have tried rebuilding iPhoto 11, but no change. What can I do to restore these?

    Thanks Japp74.  The photos were still in the main photo file, but the events had dissappeared. I have now created new events. I'm not sure what has happened but it may be something to do with iCloud as the photos had moved from several events on seperate days into one large event with several dates.  thi si sthe first time this has happened so may be a glitch that Apple fix in the future.

  • Many security events have been identified - federation disabled error

    We are getting lots of warnings in our event log for Event ID 14425:
    Many security events have been identified by the proxy stack.
    In the past 20 seconds, 30 security events have been identified by the proxy stack. A large number of security events could indicate that the server is under attack. The last event was:
    $$begin_record
    LogType: security
    Text: All federation is disabled
    Result-Code: 0xc3e93d74 SIPPROXY_E_EPROUTING_MSG_FEDERATION_DISABLED
    SIP-Start-Line: SUBSCRIBE sip:[email protected] SIP/2.0
    SIP-Call-ID: 819af7ce193e4deb8db8fd2f14a9df41
    SIP-CSeq: 1 SUBSCRIBE
    $$end_record
    Cause: The server may be under attack, or there might be a configuration problem that is causing errors.
    Resolution:
    Launch the Lync Server 2010 Logging Tool. Select the "SIPStack" component, the "Errors" level and the TF_SECURITY flag. Review the events reported to the trace log using the "Analyze Log Files" feature of the logging tool.
    So we did as the resolution states, and logged the traffic, and we are getting thousands of these types of messages:
    TL_ERROR(TF_SECURITY) [0]05E8.00CC::01/05/2011-15:12:11.015.00000013 (SIPStack,SIPAdminLog::WriteSecurityEvent:SIPAdminLog.cpp(424))$$begin_record
    LogType: security
    Text: All federation is disabled
    Result-Code: 0xc3e93d74 SIPPROXY_E_EPROUTING_MSG_FEDERATION_DISABLED
    SIP-Start-Line: SUBSCRIBE sip:[email protected] SIP/2.0
    SIP-Call-ID: 2249db6d65ac4a11ba9aea022e8fe17c
    SIP-CSeq: 1 SUBSCRIBE
    $$end_record
    If we have Federation disabled, how do I keep all this traffic from hammering my edge server?  What I am assuming it is trying to do is get the presence for every person in every email being sent or received (or read?)
    Thanks,
    Bob

    If you're not going to leverage Lync federation and enable it for your environment, it's probably worth considering the removal of your public SRV record for federation for the sake of tidiness. They won't do you any harm providing that they are indeed genuine
    subscription requests from foreign users.
    Kind regards
    Ben
    Note: If you find a post informative, please mark it so using the arrow to the left. If it answers a question you've asked, please mark the thread as answered to aid others when they're looking for solutions to similar problems or queries.
    Lync | Skype | Blog: Gecko-Studio

  • In photos,events have lost dates and been replaced with IMPRT numbers.Any ideas?

    In photos,events have lost dates and been replaced with IMPRT numbers

    When is this going to be fixed?

  • Strange PCD-message: "openEditor events have changed"

    Hi All,
    for some time now we're getting the following message when working with objects e.g. in the Portal Content Studio (changing IDs, copying iViews):
    "WARNING: openEditor events have changed and now require another parameter: DISPLAY NAME !"
    ("openEditor" is not a typo)
    The message appears briefly (for approx. 1s) in a message bar above the PCD-browser upon manipulation of a PCD object. Apart from the message being quite enigmatic, everything seems to work just fine.
    I've never encountered this message before. It startet to apper at some point (which I don't recall) and wasn't there in the beginning (when the portal was freshly installed). The patch level of the portal installations has not been changed since installation. Strange enough the message started to appear on all three (identical) portal installations.
    Server restarts etc. have been performed, of course.
    We're on EP 7.00 SP9.
    Any ideas?
    Thanks a lot,
    Jens

    Hi,
    I can't explain why it happens but I get this too all the time.
    I think it's and SAP internal thing and it shouldn't affect your work.
    Roy

  • On my iphone and in icloud all calander events have gone

    On my work iphone 4s and in icloud all my calander events have gone

    Welcome to the Apple community.
    There's a small number of such reports currently, I'd be inclined to hang on a little while to see if they return.

  • I haven't added events but am getting "This calendar is unreadable. No events have been added to your iCal calendar"

    I recently started getting the message "This calendar is unreadable. No events have been added to your iCal calendar".  However, I typically add my events by typing them myself either on my MacBook Pro or my iPhone. I don't import from outside sources. I don't know if it's related or just coincidental that around the same time, events that I add to my MacBook Pro are not syncing to my iPhone, but the events added by iPhone seem to appear on my MacBook Pro and my MiniMac.  Is there a way to find the event that is being referenced in this error message??

    iPhone:
    Plug in your iPhone
    Go to iTunes > Your iPhone > Info and ensure that calendars is not checked off to sync -- if you are using MobileMe to sync, this option should not be checked
    On both Macs:
    1.) Go to Apple > System Preferences > MobileMe > Sync and remove the check Mark for calendars.  With the new MobileMe calendar system there is no need to have this checked.  Close the MobileMe window once this is complete.
    2.) Open iCal and then go to iCal > Preferences > Accounts and remove the MobileMe account from here with the minus sign.
    3.) Go to iCal > Quit iCal
    4.) Remove the following to the trash and restart your computer:
    Home > Library > Caches > com.apple.ical
    Home > Library > Calendars > Calendar Cache, Cache, Cache 1, 2, 3, etc. (Do not remove Sync Cache or Theme Cache if present)
    Home > Library > Preferences > com.apple.ical (There may be more than one of these. Remove them all.)
    5.) Open iCal and go to iCal > Preferences > Accounts
    -- If the MobileMe Account is already here remove it again and then re-add it being very careful to use the correct name and password (for your 10.5 system follow these steps for re-adding: http://support.apple.com/kb/HT4330)
    -- If the MobileMe account is not already here, add it in.
    iCal will download your calendars from the MobileMe server.  Watch and see if you get the error message.  If it completes the download (little spinning gear stops spinning next to the MobileMe calendar) go ahead and add a new uniquely named event to one of your MobileMe calendars on both computers and see if it syncs between.
    Let us know what happens.

  • "iCal can't read this calendar file. No events have been added to your iCal calendar."

    How do I deal with this error message-"iCal can’t read this calendar file. No events have been added to your iCal calendar." ? .ics vs .vcs?
    Thanks

    Greetings,
    What version of the Mac OS and what version of iCal are you running?
    Are you using MobileMe calendars (or any other server based calendars like Google) in your iCal?
    While you answer those questions you can try the following troubleshooting:
    1. First make an iCal backup:  Click on each calendar on the left hand side of iCal 1 at a time highlighting it's name and then going to File Export > Export and saving the resulting calendar file to a logical location for safekeeping.
    2. Remove the following to the trash and restart your computer:
    Home > Library > Caches > com.apple.ical
    Home > Library > Calendars > Calendar Cache, Cache, Cache 1, 2, 3, etc. (Do not remove Sync Cache or Theme Cache if present)
    Home > Library > Preferences > com.apple.ical (There may be more than one of these. Remove them all.)
    ---NOTE: Removing these files may remove any shared (CalDAV) calendars you may have access to. You will have to re-add those calendars to iCal > Preferences > Accounts.
    Once the computer is back up and running open iCal and test.
    Hope that helps.

Maybe you are looking for

  • How to transfer music from iPhone 3GS to 4s

    I need help on how to transfer music from my old iPhone 3GS to my new iPhone 4s.  Thanks

  • Append with out duplicates ?xml version="1.0" encoding="UTF-8"? in receiv

    Hi, When I am Using append mode in file adapter,for each file that i send a seperate <?xml version="1.0" encoding="UTF-8"?>  tag is getting generated in the target. eg: File 1 <?xml version="1.0" encoding="UTF-8"?> <DEPT> <name>e1</name> </DEPT> File

  • How to Install Oracle developer suite in Ubuntu

    I'm using Ubuntu hardy 8.04, and I have to use oracle developer suite to create some report. Does anybody know how to install the thing in Ubuntu. The documentation mention that I have to use Red Hat Enterprise, which I don't have.

  • What is the shortcut to get back to the start page

    after browsing for a while I want to return to the start page but at the moment there seems to be no way to do this except by continuously and repeatedly going back through the pages I have been visiting one by one whereas in every other browser ther

  • Generic / Text Only printer crashes FM10

    In Windows 7 64-bit SP-1, selecting the Generic / Text Only printer with a document open or selecting it and then opening a document crashes FrameMaker 10 with the following error: Error Internal Error 10024, 7687720, 7688010, 10076471. FrameMaker ha