Using mx:itemRenderer for my extended List class

Create a new class MyList extends mx:List; then
<my:MyList> mxml tag can't enclose <mx:itemRenderer>.
How can I keep using <mx:itemRenderer> with MyList class in
MXML?
(I can create a separate MyItemRenderer class and set to
<my:MyList itemRender="my.MyItmeRenderer"> but I prefer using
MXML tags to creating extra little classes if possible.)
Thanks,
-James

Components and Modules are two topics that should start from
in the FB help.
Briefly, yes you can and should put these two into separate
files. Call components.
If you want to keep load time of your app short, you might as
well turn the view after successful login into a Module. A module
unlike a component can be loaded/unloaded on demand.

Similar Messages

  • How to use one variable for 2 datatype inside class

    Dear all
    i have create 2 class GDI and OGL need use use in M_VIEW as per condition
    in the class M_VIEW (example below)
    #define M_FLAG 1
    class GDI {public: int z;};
    class OGL{public: double z;};
    // in class M_VIEWi need to use GDI or OGL as per user condition
    class M_VIEW{
    public:
    #if (M_FLAG == 1)
    GID UseThis;
    #else
    OGL UseThis;
    #endif
    this is work but it always it take OGL. of if i change condition it take GDI only. but i need to use it runtime as per user choice.
    how to switch GDI to OGL, and OGL to GDI on runtime ;
    is that possible to change M_FLAG  value on run time or is there any other way to achieve it.
    i have try with polymorphism also. switch is ok but all function does not work with dll. when call function on mouse move or some other event it take base class virtual function. it doesn't goes to derived class function. don't know why?
    base class function like this and does not have any variable. all function are virtual.
    virtual void MoveLine(POINT pt1, POINT pt2){};
    virtual void DrawLine(POINT pt1, POINT pt2){};
    please help.
    Thanks in Advance.

    Well, #define, and #if are compile time only constructs.  Technically they are processed before you program is compiled (that is why they are called preprocessor directives).  If you need to support both flavors at runtime you will need a different
    approach.
    Inheritance/polymorphism could be a good approach here, but I don't really understand what you are trying to do well enough to say for sure.  Based on guesses about what you want, here are some thoughts.
    class GDI {public: int z;};
    class OGL{public: double z;};
    class M_VIEW_BASE {
    virtual void MoveLine(POINT pt1, POINT pt2) = 0;
    virtual void DrawLine(POINT pt1, POINT pt2) = 0;
    class M_VIEW_GDI {
    GDI UseThis;
    void MoveLine(POINT pt1, POINT pt2) override {}
    void DrawLine(POINT pt1, POINT pt2) override {}
    class M_VIEW_OGL {
    OGL UseThis;
    void MoveLine(POINT pt1, POINT pt2) override {}
    void DrawLine(POINT pt1, POINT pt2) override {}
    std::unique_ptr<M_VIEW_BASE> drawBase;
    enum DrawMode { DrawGdi, DrawOgl };
    extern "C" __declspec(dllexport) void Init(DrawMode whichMode) {
    if (drawMode == DragGdi) {
    drawBase.reset(new M_VIEW_GDI);
    } else if (drawMode == DrawOgl) {
    drawBase.reset(new M_VIEW_OGL);
    } else {
    throw std::runtime_exception("whoops");
    extern "C" __declspec(dllexport) void MoveLine(POINT pt1, POINT pt2) {
    drawBase->MoveLine(pt1, pt2);
    extern "C" __declspec(dllexport) void DrawLine(POINT pt1, POINT pt2) {
    drawBase->DrawLine(pt1, pt2);

  • A Cocoa window which is used multiple times (for instances of a class)

    Hi everyone,
    I develop with newest xCode using Obj-C, Java and Cocoa.
    It works perfectly to create a window and connect it to some code: I just design it, and connect it to a class which has been instantiated previously.
    What I need now is a window, which is used multiple times. Means that I create a class where the window should be connected to, from which I create multiple instances.
    I've seen that it works to create a class in Obj-C and just generate the window by code: it works to generate multiple windows. But how would I be able to design a window with InterfaeBuilder for a class which is not yetinstantiated? A class for which I create the instances while my app is running?
    Thanks a lot for your answers!
    -Lucas

    Like PeeJay says, a custom window controller seems the way to go. Try creating a subclass of NSWindowController, with header something like this:
    #import <Cocoa/Cocoa.h>
    @interface MyWindowController : NSWindowController
    IBOutlet NSTextField *infoField;
    -(void)setInfoText:(NSString *)str;
    @end
    The implementation of the setInfoText would be something like:
    -(void)setInfoText:(NSString *)str{
    [infoField setStringValue:str];
    Create a nib file with your window in interface builder. Drop the header file for your custom window controller into the interface builder window. Set the custom class of the nib's File's Owner to MyWindowController. You can then hook up the window and infoField outlets from File's Owner to your window.
    In the body of your code where you open a new info window, add something like:
    MyWindowController *windowController=[[MyWindowController alloc] initWithWindowNibName:@"nameOfWindowNibFile"];
    [windowController setInfoText:@"Whatever"];
    [windowController showWindow:self];
    If you are going to have an undetermined amount of these custom window, it might be a good idea to store the window controller instances in a mutable array, rather than retaining instance variables for each one.
    Jim

  • Use "grid display" for background job of RM07DOCS / MB51

    Hello experts,
    When you execute program RM07DOCS with transaction MB51, it uses a "hierarchy display" for the output, a list of material documents. User can then use the menus for "Goto>Detail List" and the display changes to a "grid display".
    If we define a background job for program RM07DOCS with a variant, the program uses the "hierarchy display". Is it possible to use "grid display" instead?  do we need to call a different program?
    Thanks.
    Raul V

    Hi Raul,
    Copy standard program RM07DOCS to ZRM07DOCS
    Then add this code "PERFORM detail_list."
    before the code "CALL FUNCTION 'REUSE_ALV_HIERSEQ_LIST_DISPLAY' "
    This will solve your problem.
    Regards.

  • Using List Class in java.awt / java.util ?

    have a program that:
    import java.util.*;
    List list = new LinkedList();
    list = new ArrayList();
    ... read a file and add elements to array
    use a static setter
    StaticGettersSetters.setArray(list);
    next program:
    import java.awt.*;
    public static java.util.List queryArray =
    StaticGettersSetters.getArray();
    If I don't define queryArray with the package and class, the compiler
    gives an error that the List class in java.awt is invalid for queryArray.
    If I import the util package, import java.util.*; , the compiler
    gives an error that the list class is ambiguous.
    Question:
    If you using a class that exists in multiple packages, is the above declaration of queryArray the only way to declare it ?
    Just curious...
    Thanks for your help,
    YAM-SSM

    So what you have to do is explicitly tell the compiler which one you really want by spelling out the fully-resolved class name:
    import java.awt.*;
    import java.sql.*;
    import java.util.*;
    public class ClashTest
        public static void main(String [] args)
            java.util.Date today    = new java.util.Date();
            java.util.List argsList = Arrays.asList(args);
            System.out.println(today);
            System.out.println(argsList);
    }No problems here. - MOD

  • How to map a custom enum list to a custom form property in an extended incident class

    Hi,
    I'm struggeling to understand how to map a custom enum list to a custom form property in an extended incident class.
    Here's what i want to have happen:
    I am going to publish a request offering on my SMPortal for allowing users to submit basic IT incidents. I want the form to include "Whom does this problem affect" (answers(This is the custom enum list): Me, Multiple Users, Whole department or Whole
    company), "What is the problem about", "Description" and "Attachments".
    Here's what i've done:
    In the authoring tool i created a MP for the custom enum list and put only the list in it. I sealed the MP and imported it.
    I created another unsealed MP called TST.Incident.Library for storing incident library customizations and extended the incident class to add an extension class i called ClassExtension_Affected scope with a custom property i called AffectedScope. Then i am trying
    to set the datatype of this property to "list". In the "select a list" dialog i cannot chose my previously sealed MP with the custom enum list in it. Why?
    - Do i need to scratch the sealed MP and put the custom enum list in the latter TST.Incident.Library MP instead?
    - If so, can i do that and keep this MP unsealed, or will i get an error on import saying "Unsealed management packs should not contain type definitions"
    - Should i create one sealed MP for both the custom enum list and the extension class + custom property?

    Hi,
    Authoring Tool simply isn't informed about your list. Open the sealed management pack where you define the root of the list in the Authoring Tool and in the same time open TST.Incident.Library. You will have two opened MPs in the Authoring
    Tool and be able to add a custom list for your custom field.
    Cheers,
    Marat
    Site: www.scutils.com  Twitter:
      LinkedIn:
      Facebook:

  • I have a 4 gen Time Caps. and a 2nd Gen Airport Extreme I would like to extend my TC network to use the Extreme for the purpose of having internet available to my TV box wired.  Is this possible and how to I get them to work together?

    I have a 4 gen Time Caps. and a 2nd Gen Airport Extreme I would like to extend my TC network to use the Extreme for the purpose of having internet available to my TV box wired.  Is this possible and how to I get them to work together?
    How can I get my Time Cap (TC 4 gen) to recognise my 2gen Airport Extreem (AE)
    Frank

    Thanks for the info, this really helps.
    Power up the AirPort Extreme for a few minutes, then hold in the reset button on the back of the Extreme for 10 seconds and release. Allow a full minute for the Extreme to restart to a slow, blinking amber light.
    It might be possible to use wireless to configure the Extreme, but I recommend using a wired connection. Temporarily, connect an Ethernet cable from your Mac to one of the LAN <-> ports on the Extreme.
    Click the AirPort icon at the top of the Mac's screen and wait a few seconds for a listing of New AirPort Base Station to appear. Just below that, click on  AirPort Extreme.
    The illustration below shows an AirPort Express. You will see AirPort Extreme on your screen.
    AirPort Setup will open up automatically and take a minute to analyze the network, then announce that the Extreme will be configured to extend the Time Capsule network.
    Enter a device name that you want to use for the Extreme and click Next
    Wait a minute while AirPort Setup configures things for you. When you see the message of Setup Complete, click Done.
    You can disconnect the Ethernet cable that you used for the set up now. Things should be working. The Extreme is providing additional wireless coverage the the Ethernet ports are enabled. You can connect to any port that you want since they all operate the same in this type of setup.

  • Error 1172 trying to use mx.controls.List class

    I am trying to write code in Action Script in Flex Builder 3
    but I am having trouble using some of the classes in the mx
    package. When I import like this:
    import mx.managers.PopUpManager;
    import mx.controls.List;
    import flash.display.SimpleButton;
    The SimpleButton imports just fine but for PopUpManager and
    List, I get these errors:
    1172: Definition mx.managers:PopUpManager could not be found.
    1172: Definition mx.controls:List could not be found.
    Other controls in the mx package seem to be available such as
    mx.managers.IFocusManager (along with three other interfaces in
    mx.managers.
    Why is only part of the mx package available?

    Hi,
    I had a similar issue with the flash.desktop package. It
    turned out I was running Flex Builder 3 Beta 2, not Flex Builder 3
    Beta 3. I uninstalled Flex Builder, the Flex sdks & the Air
    sdks & re-installed all the latest, that resolved the problem.
    Hope this is some help.

  • Searching for extended ABAP Classes documentation

    Hi,
    I'm a newbie to this forum (perhaps I'm a newbie in an abap too - with my 1.5 yrs abaping) but I'm interested in a few topics related to classes available in the repository:
    1. Where can I find full and detailed info (means description of interfaces both public and private/static) on classes included in a dev.class SLIS, SCET, especially specific ones - currently I'm looking for a documentation on class <cl_alv_changed_data_protocol>, because the info supplied in the repository is not so obviously clear for me.
    2. Can someone point me to a SAP cource/academy -name(s) related to the public classes related to a gui programming and!!!! their support-classes (such as mentioned one above) - which is most important.
    3. (specific question) In the OO framework(s) I worked with in my background there was a possibility to 'extend' some class' behaviour (usualy adding interface). Is there any possibility in a SAP environment to do this and if yes where can I find a docu/info on how to achieve this? Is this achieved only with a related access key?
    4. Please could someone provide me a dev.class names with demo-programs (such as SLIS, SCET) related (mostly) to a GUI-programming?
    Perhaps checking the source of the demo-reports supplied in these dev.classes would help me, but occasionaly it's a bit more complicated and time-consuming than to check a related docu, isn't it?
    The info-sources I have (and used widely) are:
    a) html-documentation with my (ok, our) installation > 4.6C (both integrated into an environment and CHM-help).
    b) 'Controls Technology - Workbench edition' - which I would recommend to all the programmers interested in this area.
    c) 'An Easy Reference for ALV Grid Control'  by Serdar SIMSEKLER (BTW, thank you very, very much Serdar! for providing this reference to the public, I found it very usefull)
    d) of cource, the Class Builder via Repository Browser (se80) which usually and unfortunately doesn't report me any class information when asked.
    e) occasionaly google-ing the world with a specific question and checking this fourm or some related one(s) in the sap community and in de.alt.comp.sap-r3 newsgroup (unfortunately for me the last one is basicaly with postings in German, which makes it unusable to me).
    Perhaps most of you would agree there is a lack of information on these topics. Or, of course, I'm still a newbie and don't know how/where to find it
    Please note, answers in sort of 'Feel free to ask with a specific question here...' are not the answer(s) I'm looking for I know this possiblilty and am using it :-).
    Finaly, one question off topic and related mostly to the moderators:
    Is there an intention or even better a possibility to achieve this forum via NNTP-protocol (means using a standard news-client)? It would be great for me if it's possible or is intended to become possible - I'm using a news-client to track few newsgroups (forums) and it would be great not to switch to a different browser to track this one, which is IMHO the best english-speaking abap-related forum.
    Many thanks in advance.
    Best Regards,
    Ivaylo Mutafchiev
    BC Consultant - Abap developer
    VBS Ltd.
    Varna. Bulgaria
    Message was edited by: Ivaylo Mutafchiev

    From within SE80 choose menu Environment->Controls Examples.  This will lead you to many fine Enjoy Control Example programs.
    Also SAP had a class several years ago called BC412 ABAP Dialog Programming Using EnjoySAP Controls.  It might still be around in some format.

  • Using High-Level API, need to use KeyRelease just for Lists

    I'm coding a MIDlet with High-Level API, but I found that is really annoying to press down 30 times in a long List to reach the item you want to select. So I thought "what about pressing right/left and make it working like pressing down/up like 10 times"?
    Something like this:
    Canvas canvas = new Canvas() {
             public void paint(Graphics g) { }
             protected void keyPressed(int keyCode) {
                switch(keyCode) {
                    case -3:mylist.setSelectedIndex(mylist.getSelectedIndex()-10,true);break;
                    case -4:mylist.setSelectedIndex(mylist.getSelectedIndex()+10,true);
          }; // end of anonymous class*/But I have no idea about how to implement this =(

    first of all, is there any particular reason you want to stick to the high-level API?
    Well, I have already nearly 700 lines of code. I don't want to start from 0 :P
    I think the best way to implement this would be to use customItems so you can control the view of the list.
    I think that requires MIDP2.0 I'm trying to make it work in MIDP 1.0
    The best you could do with high level UI is add navigation Commands to the List.
    I have already 2 Commands per List. Not all phones have a button in the center of "cursors", so I use right button for select and left for back/exit.
    Thanks for replies anyway

  • Instantiating a class using new with implements or extends

    I have created a class as follows:
    class MyFileFilter extends javax.swing.filechooser.FileFilter implements java.io.FilenameFilter {     
         ...code here...
    }and it all works fine. If I try to use this code directly without importing the class, I would normally use the new keyword, but since this uses extends and implements, it is giving me errors such as:
    [javac] ';' expected
    Is there any way that I can use this with the new keyword, such as:
    MyFileFilter theFilter = new MyFileFilter extends javax.swing.filechooser.FileFilter implements java.io.FilenameFilter {
         ...code here...

    maybe your ';' error is really a coding error. Here is a sample of code where I do something similar in the middle of a method.
        public static void redirectOutput() {
            try {
                // make a print stream that logs the time for each entry.
                class TimeStampPrintStream
                    extends PrintStream {
                    public TimeStampPrintStream(OutputStream out, boolean b) {
                        super(out, b);
                    public void println(String s) {
                        super.println(new Date() + ": " + s);
                System.out.close();
                System.err.close();
                System.setErr(new TimeStampPrintStream(new FileOutputStream(com.perigee.fileio.LogFile.getLogDirectory() + "System.err"), true));
                System.setOut(new TimeStampPrintStream(new FileOutputStream(com.perigee.fileio.LogFile.getLogDirectory() + "System.out"), true));
                System.err.println("System.err File");
                    System.out.println("System.out File");
            } catch (Exception e) {
                System.out.println("Could not redirect System.out/err");
                e.printStackTrace();
        }

  • Hi I  newly started using Iphone 6, I am not getting all the applications list under Use Cellular date for to restrict my unwanted apps on cellular data

    Hi I  newly started using Iphone 6, I am not getting all the applications list under Use Cellular date for to restrict my unwanted apps on cellular data
    Please help me out

    Hi Rajesh778484,
    Welcome to the Apple Support Communities!
    I understand that some of your applications are not appearing under Settings > Cellular on your iPhone so that you can restrict or allow use of cellular data. If you have some installed applications on your iPhone that are not showing here, the first troubleshooting step I would suggest would be to reset your iPhone. Please refer to the attached article for information on how to perform a reset. 
    Restart or reset your iPhone, iPad, or iPod touch - Apple Support
    Best regards,
    Joe

  • Is there a way to turn the wireless capabilities off on an AirPort Express?  I have an AirPort Extreme as my main router and use the express to just extend it. I only really want to you use the express for hard ethernet connections

    Is there a way to turn the wireless capabilities off on an AirPort Express?  I have an AirPort Extreme as my main router and use the express to just extend it. I only really want to you use the express for hard ethernet connections. For whatever reason when I have my express extend my wifi at home the download speed from just the express is absolutely terrible, drops to about 1.5 mb compared to when it's on the extremes part of the network the speed goes up to 50-75mb. These terrible download speed really only affects the iPhones as my MacBook Pro usually gets the good speed no matter where it is. I don't believe there is anything wrong with my phone because if I am in the part of the house that uses just the extreme the download speeds on the iphone goes up to 50-75mb. As a note I have an AirPort Extreme on the top floor of my house (second floor) that's where my modem is located. On the first floor that's where one airport express is located. I also have another airport express in the basement that is accessed by my landlord. Any thoughts on how to fix this would be helpful.

    Is there a way to turn the wireless capabilities off on an AirPort Express?  I have an AirPort Extreme as my main router and use the express to just extend it. I only really want to you use the express for hard ethernet connections.
    It appears that your networking goals with the AirPort Express is to use it as a wireless Ethernet bridge instead of using it to extend the wireless range of your AirPort Extreme. The latter requires that the Express Wi-Fi radios be enabled.
    If you intended to use the Express as a wireless bridge, you just need to reconfigure it to "Join a wireless" network instead of "Extend a wireless network."
    For whatever reason when I have my express extend my wifi at home the download speed from just the express is absolutely terrible, drops to about 1.5 mb compared to when it's on the extremes part of the network the speed goes up to 50-75mb.
    In an extended network, the placement of the extending base station is critical as it can only extend the wireless network at the bandwidth at which it receives it.
    Please check out the following AirPort User Tip for details on optimal base station placement.

  • Got the following message when trying to install Photoshop CC "You are running an operating system that Photoshop no longer supports. Refer to the system requirements for a full list of supported platforms." I use Windows Vista so not sure what I need to

    Hi there
    I got the following message when trying to install Photoshop CC, "You are running an operating system that Photoshop no longer supports. Refer to the system requirements for a full list of supported platforms."
    I use Windows Vista so not sure what I need to do now! Any help would be much appreciated thanks.

    Photoshop CC only runs on Windows 7 or Windows 8/8.1. Not Vista.
    System requirements | Photoshop

  • I am using Numbers on my iPhone5 and cannot get the app to do a simple (SUM) calculation.  It shows the formula correctly in the cell, but all I get for my long list of numbers to add is 0.  How can I get this to work?

    I am using Numbers on my iPhone5 and cannot get the app to do a simple (SUM) calculation.  It shows the formula correctly in the cell, but all I get for my long list of numbers to add is 0.  How can I get this to work?

    Oaky, at least we got that far.  Next step is to determine if all those "numbers" are really numbers.  Changing the format to "number" doesn't necessarily change the string to a number. The string has to be in the form of a number.  Some may appear to you and me as numbers but will not turn into "numbers" when you change the formatting from Text to Number. Unless you've manually formatted the cells to be right justified, one way to tell if it is text or a number is the justification. Text will be justified to the left, numbers will be justified to the right.
    Here are some that will remain as strings:
    +123
    123 with a space after it.
    .123

Maybe you are looking for