Custom components and the navigator object

Hi all,
I'm starting on a mobile project which is a ViewNavigator based application. I've created a custom component which contains a button. I'd like the button to be able to use the pushView method however as it's a custom component, it doesn't appear to recognise the navigator object. If anyone has any advice/tips on how I might go about this, it'd be greatly appreciated!

The button sits in a custom component - actually in a datarenderer. Code looks like:
<?xml version="1.0" encoding="utf-8"?>
<s:DataRenderer xmlns:fx="http://ns.adobe.com/mxml/2009"
                                        xmlns:s="library://ns.adobe.com/flex/spark">
  <fx:Script>
                    <![CDATA[
                              import mx.utils.ObjectUtil;
                              protected function button1_clickHandler(event:MouseEvent):void
                    ]]>
  </fx:Script>
  <fx:Declarations>
  </fx:Declarations>
          <s:Button label="{data.firstName}" click="button1_clickHandler(event)" width="150" height="150" />
</s:DataRenderer>
which is being called from a View. There's no error, I'm simply unable to/unsure how to access the navigator object so I can push a new view onto the stack from within that component.
Cheers!

Similar Messages

  • Using custom fonts in the Navigation pane

    Hi
    I'm using custom fonts in my webhelp. To do this, I created a folder for the web versions of the custom fonts and put it in the same folder as my css. I then added the font face elements to the top of my css (in Notepad). Next I used the custom font name for all the style defined in the css (in Notepad). That makes the content of the topics use the custom font. All good.
    Next, I edited the htt file (in Notepad) to use the name of the custom font. Now the breadcrumbs and topic footer use the custom font. All good.
    Finally, I want to use the custom font in the navigation pane (the text next to the books and page icons). I edited the skn file (in Notepad) to use the custom font. I also added a dependency for my css to the bottom of the skn file. Then I generated the webhelp.
    When I launch the help, the browser (IE) doesn’t allow running scripts or ActiveX controls (this is normal). At this point, the TOC in the Navigation pane looks like it uses the correct font. Once I click to allow IE to run scripts, etc. the font in the TOC changes to something that looks like Times or some default serif font.  So, it appears that something in the javascript is changing the font.
    For good measure, I checked the whtdhtml file and the custom font name is used there.
    Any ideas on what's happening and how to get my custom font to appear in the Navigation pane?
    BTW, I use images only in the toolbar pane (that spans the top of the webhelp window), so I don't need to specify the custom font there.
    Deborah

    Hi William
    I found one error. In the skin file, I had added a dependency to my css. It was missing a slash (/) to point to the correct folder level. Now that I've added that, the TOC displays the same font as the Index, Search results, and the topic (content, breadcrumbs, and footer). So, that's good, but on closer inspection, it looks like Verdana, not my custom font.
    I changed the font in whthost.js to the name of my custom font and generated the help, but it made no difference. I also changed the font and just opened the help without generating and got the same results.
    For your second suggestion, you mean whtdhtml.htm not whtdhtml.js? The custom font is in the lines:
    setFont("Normal", "MyFont","10pt","Black","Normal","Normal","none");
    setFont("Hover", "MyFont","10pt","#004080","Normal","Normal","underline");
    I added the <font> tag to this file, but the tag just shows up as plain text within the webhelp TOC (no matter where I insert it in the file).
    I also tried changing the font to my custom font for the Index body and Search results using the steps in Rick's Skinny on Skins (editing the whibody.htm and whfbody.htm files). When I do this, the serif font appears in the Index body and Search results.
    It seems like the files cannot "see" my custom fonts (which are in a folder at the same level as my css).
    Deborah

  • Is there a recommended limit on the number of custom sections and the cells per table so that there are no performance issues with the UI?

    Is there a recommended limit on the number of custom sections and the cells per table so that there are no performance issues with the UI?

    Thanks Kelly,
    The answers would be the following:
    1200 cells per custom section (NEW COUNT), and up to 30 custom sections per spec.
    Assuming all will be populated, and this would apply to all final material specs in the system which could be ~25% of all material specs.
    The cells will be numeric, free text, drop downs, and some calculated numeric.
    Are we reaching the limits for UI performance?
    Thanks

  • Why can't the Menu Bar and the Navigation Tool, share the same line?

    With the Menu Bar and the Navigation Tool, now on separate lines, there's all this wasted space right above the address bar. What mental giant thought this up?

    You can move the items on the Navigation Toolbar to the Menu bar if you want to have them on that bar.
    *http://kb.mozillazine.org/Toolbar_customization
    *https://support.mozilla.org/kb/Back+and+forward+or+other+toolbar+items+are+missing
    Note that you are not able to click items on the menu bar if you hide the menu bar to get the Firefox menu button and use Alt or F10 to display the Menu bar (it is a bug).

  • Press Alt to popup Menu Toolbar, Click on a Custom Icon and the item does not come up AND the Tool Bar closes

    Options-->Menu Bar is Unchecked(off) (so, TABS are at the top of the screen):
    Press Alt to popup Menu Bar, Click on a Custom Icon and the item clicked on does not come up -and- the Menu Bar closes.
    So, Alt->Popup Menu Bar->Click a Custom Icon does not function properly.
    see Troubleshooting Info below-->

    First off if you have Firefox4 you probably also have an earlier version such as firefox 3.6.15 installed. By default firefox installs these in slightly different locations, but it leaves it up to you to create a separate profile for each version. The profile is where firefox stores data and settings. I am not sure that firefox explains this clearly, but you will run into problems if you do not have a separate profile for each version of firefox. See http://kb.mozillazine.org/Testing_pre-release_versions
    To try to get the toolbars working correctly, after you have ensured you have separate profiles in use for each version ( the following action will make changes)
    # use the restore default set from the customise / customize toolbars dialogue
    # if that does not work then
    #* use [safe mode] and the option [X] reset toolbars and controls

  • Custom Components and passing arguments

    This afternoon i got a great answer regarding the use of custom MXML components and calling a function back in the main application file. I can accomplish this now by using parentDocument BUT I need to pass the name of a function(for filtering) as a parameter of the function call in the custom component. Below are the two code fragments.
    Custom Component Code
    <mx:LinkButton label="10% off or more" click="parentDocument.filterFunction(showTenPercent)" />
    Main App Code
    public function filterFunction(functionName:Function):void {
    merchantDG.visible=true;
    merchantData.filterFunction=functionName;
    merchantData.refresh();
                public function showTenPercent(item:Object):Boolean {
                        return (item.merchantOfferCategory=="10%");
    The filterFunction in the main App is called by multiple components so I believe I need to keep in centralized in the main app. There is probably another way to do this but I am building my Flex skills slowly and need to understand how to do this. As the code is now, I get an error about functions and strings.

    I believe instead of calling the function from inside the custom component you need to do this from inside your main application whenever you're initiating the custom component.
    for ex.
    <custom:LinkBtnCustom label="10% off or more"  click="filterFunction(showTenPercent)"/>
    this way you don't need the parentDocument prefix.

  • Flash components and the properties inspector

    Don't know if any of you have had experience in creating
    components that
    can have properties set using the properties inspector or
    not, but here
    we go.
    I have several components which all have a 'data' property
    that is an
    Object in which a developer can store arbitrary data.
    I have set this up in the component so that it will display
    in the
    properties inspector, thusly:
    [Inspectable(name="Data")]
    private var _data:Object;
    Now, it does indeed appear in the inspector, but when I click
    on the
    field it brings up a box which then doesn't allow me to enter
    any data
    (see screenshot:
    http://www.moloko.f2s.com/filetransfer/componentParams.png)
    However, if I right-click on the symbol in the library, go to
    Component
    Definition, then click on the Data property in the Value
    column, it
    brings up a box that's a little bit more what I was expecting
    in that it
    contains the '+' and '-' buttons to allow me to add/delete
    data, and
    also some up/down arrows to allow me to move the data around
    in the list
    (see screenshot:
    http://www.moloko.f2s.com/filetransfer/componentDefinition.png)
    Anyone know what's going on with this? Is this a bug in the
    Flash IDE or
    am I doing something wrong??
    MOLOKO
    Macromedia Certified Flash MX 2004 Developer
    Macromedia Certified Flash MX Developer
    ::remove _underwear_ to reply::
    'There ain't no devil - it's just God when he's drunk' Tom
    Waits
    GCM/CS/IT/MC d-- S++:- a- C++ U--- P+ L++ !E W+++$ N++ O? K+
    w+++$ !O M+
    VMS? PS+++ PE- Y PGP+ t+ 5-- X-- R* tv++ b++++ DI++++ D+ G e
    h-- r+ y++

    The flashComponents are standard AS2 components, and you can look up their APIs in the Flash documentation.  Here is the button docs:
    http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001977.html#3654189
    Looking at that, there is a getStyle() method, and I just tested it out:
    put sprite(1).getStyle("borderStyle")
    -- "inset"
    put sprite(1).getStyle("fontFamily")
    -- "_sans"
    put sprite(1).getStyle("color")
    -- 734012.0000
    I'm not real sure what that means (probably the hex color converted to a float), but you can change the color like this:
    sprite(1).setStyle("color","red")
    And here is a page that lists all the styles that are defined:
    http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00001973.html#3136306

  • Upgrading packages from 2005 to 2012 : Custom components and delyavalidation woes

    Hey folks
    I've two specific cases with upgrading SSIS 2005 to 2012
    1st : most annoying
    I have a custom transformation written in c# 2005. It references sql server 2005 dlls such as from 
    Microsoft.SQLServer.DTSRuntimeWrap
    Microsoft.SQLServer.ManagedDTS
    Microsoft.SqlServer.PipelineHost
    Those are stored under 
    C:\Program Files\Microsoft SQL Server\90\SDK\Assemblies
    The requirement is to upgrade the package to 2012 and the code as well. Since 2005 was not installed on new server , I copied the referenced dlls from old server , added them back to C# project and rebuilt the Custom components dlls then added to GAC
    When I open the packages , they complain about the version
    Error 2
    Validation error. : The component metadata for "My_Comonents, clsid {874F7595-FB5F-40FF-96AF-FBFF8250E3EF}" could not be upgraded to the newer version of the component. The PerformUpgrade method failed.  
    So I thought , I can add the dll to the toolbox and add it again. WHen I try this , I get this error
    "Could not load file or assembly Microsoft.SqlServer.PipelineHost  ,version = 9.0.242.0"
    Now I assume this is because I don't have 2005 components installed.
    Before getting things messy , what should be the right approach :
    a- Should I just leave the custom components dlls as they are and add them to GAC ? but they will still need 2005 dlls , should I install 2005 client components ?
    b- I can not change the code of the c# project to use new SQL 2012 components , it's a lot of work. so what should be right approach here ?
    That was the important part
    2- Validation
    Even for disabled tasks , like data flow task , setting delyavalidate= True still doesn't help against them being validated and raising error. removing them will help but I do not want , any workaround ?
    Thanks

    Thanks a lot Joost , appreciate the feedback
    This is what I thought too.
    I came to the blog you mentioned , but I wasn't sure how it should be related to my problem. Now I think I'll need to make the code changes.
    Indeed , I see some declarations of *****90
    public void CreateExternalMetaDataColumn(IDTSOutput90 output, int outputColumnID)
                IDTSOutputColumn90 oColumn = output.OutputColumnCollection.GetObjectByID(outputColumnID);
                IDTSExternalMetadataColumn90 eColumn = output.ExternalMetadataColumnCollection.New();
        public override DTSValidationStatus Validate() {
                IDTSVariables90 variables = null;
    public override void SetOutputColumnDataTypeProperties(int outputID, int outputColumnID, Microsoft.SqlServer.Dts.Runtime.Wrapper.DataType dataType, int length, int precision, int scale, int codePage) {
                IDTSOutputCollection90 outputColl = this.ComponentMetaData.OutputCollection;
                IDTSOutput90 output = outputColl.GetObjectByID(outputID);
                IDTSOutputColumnCollection90 columnColl = output.OutputColumnCollection;
                IDTSOutputColumn90 column = columnColl.GetObjectByID(outputColumnID);
    SO I should use 2012 references and start migrating this code over ? is it as easy as so ?
    Thanks

  • Problem with Jdeveloper and the Web Object Manager

    I am trying to register a servlet through the web object manager.
    As soon as click the web object manager menu pick I get the following
    error: Could not load servlet information from web server.
    On other peoples machines here it works fine and they can register
    servlets. What am I missing!

    hmmmm, wondering if I understood you correctly:
    first try the file association - right click on one of the movie files (you should tell as well with extension) then 'open with' menu then go to 'choose program' and then choose one of them and coach the box "always use the selected program to open this kind of file" in your example 'window media player'.
    the other point I understood is that in download directly into your browser, well there is a settin for this in the option, don't know where exactly, but you can avoid this by right clicking on the movie/file link and choose 'save target as ...' this forces it to download it on your disk and then you can open it.
    hope this kinda helps
    Cheers
    Slarti

  • About the difference between the AWT components and the swing components

    As we know that an AWT component has a peer, but dose a lightweight component(e.g: a swing component) has also a peer? And could somebody tell me that who and how creates the CLICKED_EVENT when I click a JButton(a swing component), and where the CLICKED_EVENT to go util it was processed by a method like btn_ok_clicked(Event e)? And if I click a Button(an AWT component), what's the difference?
    Thanks a lot!

    The main difference is that AWT are native components, and Swing components are entirely in java written. That's besides the look and feel. There are a lot of other differences between AWT and Swing, and there are better described in the documentation.

  • Custom components and binding ... help !!

    hi, i have created a component that wraps the TextInput
    control with its own set and get text methods, but it does not work
    well with the Binding mechanism.
    here is the code:
    <vc:myTextInput text="{str}" y="8" tabIndex="0" x="100"
    id="in1"/>
    and the binding
    <mx:Binding source="in1.text" destination="str"/>
    does not update the str field.
    can any one tell me what i did wrong / forgot to add ??
    cheers,
    Jaimon

    hi as ntsii said i am looking for a two way binding meaning
    that for every change in either of the controls, will be seen by
    the other...
    i am guessing that in order that the custom component work
    with the binding mechansim a certain API must be implemented of a
    mechanism that dispaches the right event ... but i could not find
    any ducomentation
    any help would be blessed ... happy new year
    Jaimon

  • Swing components and the garbage collector

    How much care does one need to take with swing components, with reference to running out of stack space? I ask because I'm writing a system for an automotive parts company, and the company tends to not reboot the machines very often...
    Anyway... if a JFrame is closed, is it and all its components marked for GCing? Do I need to call the dispose method, or is this part of the default close behaviour? Or is there something else entirely?
    Cheers

    In class that calls for .setVisible(false) of one JFrame u MUST call
    for dispose() method.
    so
    myFrame.setVisible(false)
    myFrame.dispose()
    myFrame = null // to help the garbage collector
    If u have classes that becames from JFrame (or JDialog) u can
    invoke in its constructors:
    this.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)
    This makes uncecessary to call for dispose() method explicetly.
    If u do not have this kind of classes u can invoke this method
    after u have create your JFrame
    JFrame myFrame = new JFrame();
    myFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE)
    The most important thing is REMOVE ALL LISETNERS that u have added, so, if u have classes that becames from JFrame u can ovverride
    the dispose method to do that
    eg
    public void dispose()
    super.dispose()
    removeActionListener(.....)
    and so on
    If u do not have this kind of classes u must remove all listeners u have
    added before u invoke the setVisible(false) method.
    Regards

  • Components and The Transform Tool

    I'm relitivly new to action script, and am just starting
    component creation. I'm trying to deturmine if there is any way to
    detect and respond to changes to an instance. Primarily, How can I
    tell if the transform tool has been used on a specific instance and
    respond accordingly. I'm interested in this both in the final SWF
    and in the live preview.
    For example, is there anyway to detect the change in the live
    preview instance, and pass the value to xch the way you would from
    the custom interface?
    Thank you for your time and help

    hedger,
    How do you expect anyone to help when we don't know a darned thing about the file, abut your setup, exact version of Photoshop and your OS, machine specs, etc.?
    BOILERPLATE TEXT:
    Note that this is boilerplate text.
    If you give complete and detailed information about your setup and the issue at hand,
    such as your platform (Mac or Win),
    exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
    your settings in Photoshop > Preference > Performance
    the type of file you were working on,
    machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
    what troubleshooting steps you have taken so far,
    what error message(s) you receive,
    if having issues opening raw files also the exact camera make and model that generated them,
    if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
    etc.,
    someone may be able to help you (not necessarily this poster, who is not a Windows user).
    a screen shot of your settings or of the image could be very helpful too.
    Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
    http://forums.adobe.com/thread/419981?tstart=0
    Thanks!

  • The menu bar and the navigation toolbar do not function though they appear in shaded grayscale. Why?

    There is no response to any of the actions in the Menu Bar. Only "Home" works on the Navigation Toolbar: no response from "Go back on page", "Go forward one page", "Reload current page", or "Stop loading this page". Everything appears in a light grayscale except for the "Home" icon.

    This can be a problem with the file places.sqlite that stores the bookmarks and the history.
    * http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox

  • 0FIA_DS13 and the cumulative objects

    Hello
    I hope to use the ODS (0FIA_DS13), but I don't understand how the cumulative objects are loaded... I use the datatsource 0FI_AA_12 or 0FI_AA_11, but Idon't find these objects
    for example
       ***. Intrst at Start of Fis. Year
       Accumulated ordinary depreciation
       Cumulative reserves transfer
       Cumulative revaluation of ordinary depreciation
    Have you got an idea?
    Thanks you

    Hi,
    Help says :
    <i>The object is supplied with data from both ODS object 0FIA_DS11 and InfoSource 0FI_AA_12. This ensures that, when inventory values are posted to the ODS object, they are calculated precisely by period from the transactions and annual values, while the depreciation values are extracted directly from the source system.</i>
    With rgds,
    Anil Kumar Sharma .P

Maybe you are looking for