Waterfalls, the AbstractPane subclass

Is subclassing AbstracePane to create custom cascading screens possible? If so, he is encouraged? I'm trying to wrap my head around custom controls and where the logic off section for types of split-screen.

For example, if I have the list of FOOs, and I want a CreateFOO screen. Should I push a Page with a custom CreateFOOView custom control. Or do I have a subclass of AbstractPane and which push in the navigation stack.

Hope someone can clarify the correct way to approach it.

AbstractPane is not really intended for level subclassing - concrete subclasses provided as page should be better tailored to your needs.

In the sample App collector stamp; ContentPage.xml is a good example of a page that is not the root page.

Tags: BlackBerry Developers

Similar Questions

  • several signals for AbstractPane

    I want AbstractPane to emit a signal when it is pushed or view depilated. This will have many uses for everyone, but a specific use that I have is that my component currently connects to the signals of the other classes (and done a lot of work when it receives a signal), and I would call disconnect when the pane is not visible, in order to avoid the heavy calculations which are relevant only if the pane is visible.

    Currently, only NavigationPane emits a signal, for example when the upper part changes, but this tells you just what the new top is not seen just disappeared. I can subclass of the NavigationPane courses, keeps a snapshot of the view stack, and emit a signal suitable for the pane disappears and the pane that appears, but the best place for this code is in Cascased itself, not in my code.

    Please request a feature Issue Tracker: http://supportforums.blackberry.com/t5/Java-Development/Developer-Issue-Tracker/td-p/271768

    Ideally these signals should be issued of the NavigationPane rather than the AbstractPane as AbstractPane is too general and does not control when pages are displayed or hidden.

  • confused with the Page, AbstactPane, and GroupDataModel

    Hello

    I have an application that has 3 receptacles showing different content (2 show an html page, 1 to GroupDataModel).

    The pages of the interface user is written in QML, but I create the page in C++ and fill it there. Here are the important parts of my code:

    // applicationUI.cpp
    
    Page* ApplicationUI::doLoadPageDetails(QString fn) {
    
      QmlDocument *qml = QmlDocument::create("asset:///PageDetails/PageDetails.qml").parent(this);
      qml->setContextProperty("app", this);
    
      qml->setContextProperty("minutesData", &AMinutesData);
    
      Page *newPage = qml->createRootObject();
    
      AbstractPane *root = qml->createRootObject();
    
     GroupDataModel *contactModel = root->findChild("contactModel");
    
    // ------ FILL PAGE WITH CONTENT
    
      Application::instance()->setScene(newPage);
    
      return newPage;
    }
    

    Now I open a file from the file Explorer directly all information is displayed in the application as supposed, but the back button is missing.

    When I remove the AbstractPane the back button is there, but of course in my GroupDataModel contacts are not shown. Can someone tell me how I can integrate the GroupDataModel to my user interface without losing the back button?

    Or why the back button is missing when I use a component summary here? Because the AbstractPane is not a back button and then "crush" the back button?

    Very well. I "solved" the problem by going in a different way.

    I've written a C++ function that gives me a GroupDataModel.

    Can I fill this GroupDataModel with the content and call the C++ function in QML.

    It is all described here:

    http://deanlogic.com/blog/2013/09/20/DataModel-change-trigger/

  • Design problem - can not do the persistable class

    Basically I have a best score of the class that implements Persistable I want to either extend SimpleSortingVector or contain private SimpleSortingVector.

    However, as SimpleSortingVector is NOT persistent, I can't make HighScore Persistable.

    I guess that means I can't as unsimple extend SimpleSortingVector and make the persistable subclassing, then how the hell do I I still my class?

    I get a similar problem with this:

    public class MultiColumnTextField extends Field implements Persistable {
        
    }
    

    because the field is NOT persistent!

    [Cap] net.berrysoft.dib.fields.MultiColumnTextField: error! : the Persistable class marked by interface net.berrysoft.dib.fields.MultiColumnTextField: net.rim.device.api.util.Persistable is not persistent: base net.rim.device.api.ui.Field class does not implement net.rim.vm.Persistable

    Patrick

    Vector is persistent.

    List sorting vector data and persist the vector. You can repopulate the vector sorting when you restore data.

  • Clean the Code example for the abstract factory

    Hello
    I read clean Code and I do not understand something.
    On page 38, it is suggested to instead use the switch instructions, we can use the abstract factory.
    The example is the following:
    Instead:
    public Money calculatePay(Employee e)
    throws InvalidEmployeeType {
      switch (e.type) {
      case COMMISSIONED:
        return calculateCommissionedPay(e);
      case HOURLY:
        return calculateHourlyPay(e);
      case SALARIED:
        return calculateSalariedPay(e);
      default:
        throw new InvalidEmployeeType(e.type);
      }
    }
    We can do this:
    public abstract class Employee {
      public abstract boolean isPayday();
      public abstract Money calculatePay();
      public abstract void deliverPay(Money pay);
    }
    -----------------
    public interface EmployeeFactory {
      public Employee makeEmployee(EmployeeRecord r) throws InvalidEmployeeType;
    }
    -----------------
    public class EmployeeFactoryImpl implements EmployeeFactory {
      public Employee makeEmployee(EmployeeRecord r) throws InvalidEmployeeType {
        switch (r.type) {
         case COMMISSIONED:
            return new CommissionedEmployee(r) ;
         case HOURLY:
            return new HourlyEmployee(r);
         case SALARIED:
            return new SalariedEmploye(r);
         default:
            throw new InvalidEmployeeType(r.type);
         }
      }
    }
    I don't see why the plant is necessary here. (I know not much make abstract and I am a beginner)
    The abstract class used with his methods wouldn't be enough? Subclasses (CommissionedEmployee, HourlyEmployee,...) are implemented methods that can be called when necessary. Instead of calculatePay (myEmployee), we call myEmployee.calculatePay (). Doesn't it all? So I don't know why the plant is located in this example.

    Thanks in advance for any help on this!

    lemonboston

    lemonboston wrote:
    Subclasses (CommissionedEmployee, HourlyEmployee,...) are implemented methods that can be called when necessary. Instead of calculatePay (myEmployee), we call myEmployee.calculatePay (). Doesn't it all?

    Well, Yes, that's all. Almost everything is. You're right, you call

    myEmployee.calculatePay()
    

    where "myEmployee" is an object of the appropriate subclass. But whence this object? At some point, you must have had a line that says

    Employee myEmployee = new SalariedEmployee()
    

    or something along that line. But how did you know to create a SalariedEmployee object and not a HourlyEmployee object? It must have been a few if statements going on there. And here comes the factory: you pass a token representing the employee at the factory (a type code of employee of a character, an employee number that it will search in a database, or something else) and the factory returns a derived object of this token.

  • Question about the object

    public class Testing{
    public void status(Object d){
    System.out.println("object is called " + d);
    }
    
    public  void status(String s){
    System.out.println("String is called " + s);
    }
    
    public static void main(String[] args){
    Testing a = new Testing();
    a.status(null);
    }
    }
    Output : String is called null

    No doubt: I can't understand how including compiler to call status method with the String argument and not the one with the Object.Even argument if he did then why NullPointerException was not thrown during execution, since printing System.out.println ("the string is called" + s), it will call the method toString() on s and since it is null it should throw a NullPointerException.

    Any clarification on this is much appreciated.

    isocdev_mb wrote:
    I'm not clear on the method resolution (perhaps something on the more specific signature)

    NULL is considered as to be more precise in the hierarchy, so if you have overloaded methods where first one takes object, the second takes Foo (a subclass of object) and third takes the Bar (subclass of Foo), then one with the setting Bar would be called.

    But if you have a parameter Object and two methods with the subclasses of object as parameters, you will get a compilation error because specific to one can not be chosen.

    does not imply an invocation of toString(). s is a string already

    Nothing implies a call toString(). The method that is called is String.valueOf (param Object), which returns "null" when given null. No NPE, no problem.

  • Can I add a "mouseOver" method in a subclass?  How?

    I have the following subclass that extends TextArea.  The contentBackgroundAlpha is 0 at the start.  Is is possible, including mouseOver and mouseout/mouseouthandler() methods wthin this sublcass so I don't have to write managers mouseOver and mouseout/mouseouthandler() in the application code?

    package

    {

    Import spark.components.TextArea;

    public class clickableText extends TextArea

    {

    public function clickableText()

    {

    Super ();

    setStyle ("contentBackgroundAlpha", 0);

    setStyle ('borderVisible', false);

    buttonMode =true;

    Editable =false;

    mouseChildren =false;

    useHandCursor =true;

    }

    }

    }

    Thank you!

    Hi doug,.

    You can do this way...

    package
    {
    Import spark.components.TextArea;
    public class clickableText extends TextArea
    {
    public void clickableText()
    {
    Super();
    setStyle ("contentBackgroundAlpha", 0);
    setStyle ("borderVisible", false);
    buttonMode = true;
    Editable = false;
    mouseChildren = false;
    useHandCursor = true;
    addEventListener (MouseEvent.MOUSE_OVER, onMouseOver);
    addEventListener (MouseEvent.MOUSE_OUT, onMouseOut);
    }
    private void onMouseOver(event:MouseEvent):void
    {
    setStyle ("contentBackgroundAlpha", 1);
    }
    private void onMouseOut(event:MouseEvent):void
    {
    setStyle ("contentBackgroundAlpha", 0);
    }
    }
    }

    Thank you

    Jean Claude

  • InKeySetFilter not working correctly with the filter that is not IndexAwareFilter

    I found that InKeySetFilter works correctly with filter that does not implement IndexAwareFilter.

    for example:
    cache contains the Integer objects

    cache.keySet (new InKeySetFilter (new ClassFilter (Integer.class), cache.keySet ())) //returns all elements

    cache.keySet (new InKeySetFilter (new ClassFilter (String.class), cache.keySet ())) //also returns all the items

    InKeySetFilter works the same way, not only with ClassFilter, but with a filter that is not IndexAware. It looks like a bug.

    PS using coherence 3.5.3

    Hi Serge,

    Yes, there seems to be a bug, if m_filter isn't an IndexAwareFilter, applyIndex returns null instead of return m_filter.

    With the help of the following subclass should solve this problem:

    import java.util.Map;
    import java.util.Set;
    
    import com.tangosol.util.Filter;
    import com.tangosol.util.filter.InKeySetFilter;
    import com.tangosol.util.filter.IndexAwareFilter;
    
    public class FixedInKeySetFilter extends InKeySetFilter {
    
       public FixedInKeySetFilter() {
       }
    
       public FixedInKeySetFilter(Filter filter, Set setKeys) {
          super(filter, setKeys);
       }
    
       public Filter applyIndex(Map mapIndexes, Set setKeys) {
          Filter filter = getFilter();
          Filter res = super.applyIndex(mapIndexes, setKeys);
          return setKeys.isEmpty() ? null : filter instanceof IndexAwareFilter ? res : filter;
       }
    }
    

    Best regards

    Robert

  • onPause on BB10

    What does really mean by this event? Apparently not catching anything, even if I add the listener to it.

    The Ripple, there is an option to trigger an onPause event and it works well, but does nothing on a real device.

    What action triggers onPause event on BB10?

    I don't think we're going to be broke up the forums. There is fragmentation points, but the vast majority of subjects is all understandable to developers WebWorks.

    You can do a lot more games on the Dev Alpha today, although the WebWorks extensions are limited. If you build with waterfalls, the only way to see it on the device is with a Dev Alpha. As developers WebWorks, we can use a PlayBook for most all apps and releasing them on the market now, while tinker us with the Alpha of Dev and try the new APIs, as they are released.

    The next version of the SDK WebWorks for BB10 will add some new features that will really increase the value of having a WebWorks development.

  • Use QML ImageView in C++

    Hello

    I can see how to use one ImageView, or any other QML declared, stated purpose in QML the constructor method that creates the scene using the QML document, and then sets the AbstractPane root. But how to access an ImageView to anywhere else in the same class? I will keep a reference to the root or document QML?

    You can call Application: instance()-> scene() and cast your object type to top level, something like this:

    Page * appPage = (Page *) Application::instance()-> scene();
    Camera * camera = appPage->findChild ("myCamera");
    etc.

    Or let the appPage pointer or other controls in member variables. In this way, the code will be cleaner.

  • Selection of text in a label

    Hello

    How can I text selection in the Cascades. I have a Label which set the width, I have a requirement in which, if text doesn't fit in this label, to ellipses.

    From what I can tell, rather than text elliding with the classic «...» "at the end, the waterfalls, the designers chose to have fade the opacity of the text with the same area, so he just of 'ghosts' in oblivion.

    I haven't yet decided if I prefer this, hate or would that more choice in the matter, but that seems to be our main option at the moment.

    You should see this effect if you set maxWidth on your label, text that would be higher than that.

  • NavigationPane not found

    Hello guys.

    I want to order a NavigationPane with C++ still findChild can't find it. Thoughts?

    QML: http://pastebin.com/71K4J6zR

    C++: http://pastebin.com/5LPf4L5T

    I tried quite a few things with it, and yet navPane always points to 0.

    The AbstractPane object in your code (i.e. root) itself is what you are looking for. You must find the navigation pane in side this root. root is the navigation pane. If you want to cast to NavigationPane just use below code shows:

    navPane is qobject_cast (root);.

    Kind regards

    Nishant

  • ButtonField and USE_ALL_HEIGHT / USE_ALL_WIDTH

    Do I have reason to think that ButtonField does not pay attention to the USE_ALL_HEIGHT or USE_ALL_WIDTH?

    I want to the ButtonField subclass so that it uses these bits of style, and currently I'm the substitution of layout by below. This seems like the right way to go? It works, but there may be a cleaner way to do this.

    Also, is it possible to get the source of core components such as ButtonField or just guess what they do?

    protected void layout(int width, int height) {           super.layout(width, height);            long style = this.getStyle();           if ((style & Field.USE_ALL_WIDTH) == Field.USE_ALL_WIDTH) {     this.setExtent(width, this.getHeight());    }}
    

    RIM does not guarantee their open source code. So there's no way to get their code.

    You can set the width and height of a buttonField substituting as layout() method:

     protected void layout(int width, int height)  {     //width.      width = Display.getWidth();
    
         //height.     height = 20;
    
            //dimensions.     setExtent( width, height );
    
     }
    

    Take a look at this example from CustonButtonField:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=37909&query.ID=17...

    Also check the custombuttons sample shipped with the JDE.

    Concerning

    Bika

  • question about olb and compilation

    Forms 11 g.

    There are some things that I did not entirely understand on olbs and subclassing.

    If I have a few items in my forms inherited from an olb and I update of olb... The fmb is updated when I open it or it is also updated when I compile it without opening (with command line)?

    My problem is that I develop on windows, but deploy on linux. I take the CGF to linux and then compile with frmcmp_batch.sh

    The compiler updates the subclassed whith the olb version objects it has on its way?

    juliojgs wrote:

    ...

    The compiler updates the subclassed whith the olb version objects it has on its way?

    Yes, make sure you have the latest version of any object source (.olb, .pll, .fmb) on your Linux server, so the compiler forms will be able to find and understand the properties of the object, subclassed into the executable of forms (.fmx).

    Craig...

  • data type for astromical algorithms

    Hello everyone.

    IM using Oracle 12 g of data.

    I have to face a new application where I have to develop a large number of astronomical algorithms, normally calculated them on the speed of the planets, astronomical positions and so forth.

    These algorithms usually have a large number of decimal place, between 10 and 20.

    So, Im trying to find the best types of data, because the accuracy is a must. And these are my doubts...

    Read the tutorial of Oracle it say that the number data type contains all the other subclass of numbers. For example, as I understand it, the integer data type is only one type of data number with some restrictions.

    My question is:

    If I declare a variable as number, this variable will have the same accuracy as a variable declared as binary_double? For example

    Declare

    x number; -Without defining the decimal scale in this way, it can accept the range possible decimal

    x BINARY_DOUBLE:-that class will have the same accuracy as the number of x?

    What is the best way to declare these vars?  by order of accuracy, storage and speed is not so important in this application.

    Regards to all the world and thanks in advance.

    Use the NUMBER unless you have a specific reason NOT to use it.

    See the built-in data types in the doc of the SQL language

    http://docs.Oracle.com/CD/B28359_01/server.111/b28286/sql_elements001.htm#i54330

    2

    NUMBER[ (p [, s]) ]

    Number having precision p and scale s . Precision p may vary from 1 to 38. Wide s can vary from-84 to 127. Precision and scale are in decimal digits. A NUMBER value requires 1 to 22 bytes.

Maybe you are looking for