Cross-platform SDK and HTML5 tools for mobile app development
X
 
8 posts / 0 new
Last post
Zoe
Zoe's picture
Offline
Mobile Conjurer
Joined: 23 Feb 2012
Posts:
Deleting Widgets

Hi

I've been having problems trying to delete native ui widgets.  I have a stackscreen with 2 screens.  When i want to move between the first screen to the second, i call a redraw function in the second screen which clears the widgets off the screen and rebuilds them (i will be linking a database into this so it will be pulling its data from there soon).

For a few attempts it seems fine to move between the first and second screens, and then it will crash.  No errors are appearing in mosync so i ran the project in xcode and and it returns EXC_BAD_ACCESS.  It seems to revolve around a function called free_ex.  Its not restricted to a single native ui widget type either so it seems more general issue.

Any help would be much appreciated.

Thanks

fan
fan's picture
Offline
Mobile Wizard
Joined: 9 Dec 2014
Posts:
Michael Kors Handbags UK Any

Michael Kors Handbags UK Any understands the life span, this quest for trendy women, she have more in comparison with Save Up 65% - Cheap Michael Kors Handbags Outlet Uk Sale one deal, usually, are not able to understand grow older girls. Start working, buying, dating, dinner party, day out, mountain climbing... Countless routines, will need distinct Michael Kors Uk attributes, different kind of offer to deal with. Bag is one of the girl's possessions, embodies the flavors of a woman, personality as well as condition, an excellent Michael Kors Uk, Wholesale Michael Kors Bags Uk Online handbag can instruct a ladies alone(p) appeal. Ladies' cup of tea, the actual mixture is definitely hand bags regarding gender group. You will find gender along with Michael Kors Purse limited by match feminine aesthetic bags are generally along often called women case. Handbag is amongst the ladies private decorations. It is operate is mainly Authentic Michael kors for sale accustomed to ChengNa products jar, tiny adequate to put lip gloss, cash, big to pack baggage wearing apparel etc. Using the class involving overseas about: Pocket book Billfold, COSMETIC Case, Beauty http://www.showerdrape.co.uk Case), Purse (Bag) on the inside as well as Handbag (Handbag), SHOULDERBAG (make Case), casks, etc Select a appropriate tote to fit your molding, total Michael Kors Outlet Uk, Michael Kors Handbags Uk For Sale modelling can be a extra in your case, or else, opt for the faulty carrier, non the actual modelling regarding leeway for you personally, in lieu of acting look really failing. So females throughout Michael Kors Handbags look closely at apparel while doing so, the actual handbag of preference can also be vital Cup of tea, because brand indicates, wealthy decorative, full of life design, offer a person with genuine along with new Michael Kors Outlet sense. These kinds of carrier is needed within spring and summer are usually recurrent, because time wearing apparel color has goal to help together with easy coloring, to a greater extent vibrant Michael Kors UK Online luggage just collocation, however had better non decide on this sort of handbag is too massive stylus, multi-colored tote might be more well suited for the European as well as American people taller Michael Kors Outlet UK, Cheap Michael Kors Handbags Outlet UK Online appearance and colour of pores and skin, asians is hard to undertake tropical stylus, therefore pick a little more lightweight design is nice Cup of tea would work Cheap Michael Kors Bags Uk Online for Sale regarding workers in offices, plus much more coloring to help african american, chocolate, ashen solid colors or colored event almond. Considering the white-colored-receiver collar tasks need formal Michael Kors for sale dress, and also overmuch apparel coloration for example black, white-colored, java brunette department, therefore the number of http://www.norab.co.uk handbags in layout in addition to details needs to have distinctive model, like tassels, rivets, precious metal archipelago, Arial mosaic design details, such as to a dreary coloration Uk Cheap Michael Kors Handbags On Sale provides eye-port. Handbag together with fairly several, in general applicable to the junket, get together, marriage, etc. Within the range of fabrics, can come up Michael Kors Uk Sale the fabric of silks in addition to satins, astragal part gleaming, stylus is given antecedence in order to with hand bags as well as handbags, ought to take compact level, can show can easily classy, tasteful Search on the Cheap Michael Kors UK elements This can be the basis with the bag, there are many kinds of textiles, textile, manufactured leather, PU, natural leather, towel is incredibly clear, skin of the most useful, course, these days almost all of the case is definitely PU synthetic leather, is already really Michael Kors Outlet slender layers associated with buckskin around the glue on the coating regarding PU, consequently think is nice, beneficial semblance, may also perform some figure in cortical area digesting, most of the cup of tea maker ought to use this cheap Michael kors uk type of framework, and on your tickets nonetheless reveal making use of buckskin or even suede cloth. Actually these kinds of material is great, challenging soiled, gorgeous and durable. Inside is mainly bamboo Michael kors outlet uk and also material, truly it is important isn't too comfortable, if as well smooth, put items you'll find limitations, lining furthermore take away Michael Kors Uk one thing, they will released, it is not full! And always start the particular share following it in the pile connected with irregular Michael Kors Uk, Michael Kors Handbags Outlet Uk For Cheap material, can not see the bag involving other pursuits. 2, from your perspective regarding design model can easily by means of Michael Kors master individuals, men and women of various age ranges have his or her desired type, normal brand name luggage product firm contains the specialized design and style squad, can always to be able to Michael kors canada meet the needs of the fashionable popular designs, that's one of the baggage ones reality, instead of simply by Michael Kors Outlet manufacturer handbags manufacturer there's no certain layout staff, the style involving approximately primary fake model, might not exactly looking looking http://www.audmed.org.uk/ not to turn out, whenever you can discover a couple of similar model plus a brand is usually a label of Buy Michael Kors Handbags UK Online, Cheap Michael Kors Handbags clutches, you can find that, on the other hand, the brand baggage artificial often there is a bit deficiency, as the potency Michael Kors UK Cheap in the troupe, the production equipment as well as management holes, the more belittled position more challenging effective artificial handbag, more efficiency throughout outside decorative rampart handbag, computer hardware Michael Kors Handbags Outlet accessories, ornaments involving form and also placement in addition to employment choice, plus the whole bundle of stereo audio Michael Kors Handbags Outlet Uk Sale, Michael Kors Handbags & Bags Online Uk Sale feeling along with a good relationship. Looking through the be employed in quite a few regular sewing sector, may possibly cup of tea stitchery is just about the almost all requiring, equally equipment Michael Kors Handbags UK along with workers expertise and the specifications in the tote is full of unsettled, regarding these types of since the textile carrier regular sewing substantial in accordance with www.art-tec.co.uk other more heavy, too difficult a lot, and also sewed also has a particular design and also stereo system intuitive feeling. Consequently a competent case stitching individuals to employ half a year or more time! Notice cup of tea Michael Kors Outlet Store UK do the job could have many things are some common-impression issues, but nonetheless can display this okay craft of several Cheap Michael Kors Bags Outlet Online belittled location, such as package deal borders yan fitting outside of almost any redundant, especially the interior deal, helping hand stitches get distorted, this procedure demands Authentic Cheap Michael Kors Outlet UK 2014 expertise and toughness, the simplest way would be to pulling some zip up no matter if even, in any other case placid, add-on is a little twisted, if your move go to your fabric, realistically work is a bit weak, can be are not able to accept the actual Michael Kors Handbags currently fixed carrier, adventure handbag for a few reduced-grade comfortable textiles can also be a little threshold! We all know, full http://www.resultsplus.net/ clothing content volition faithful unitedly and also fabrics, zero extra, tote, subsequently starting, the particular cloth ought to be towards the earlier mentioned textiles, interior place at a glance, and also add-on size, via a the truth, and also a superior Michael Kors Outlet price, this is a tiny bit definately not low-cost this kind of a number of word! several, in the equipment furnishing Each bag without some computer hardware accessories, at the very least like to possess a zipper! Very good carrier with equipment lighting fixtures have become light! Manipulation hands feel, circus tent remaining from the humidity will slowly and gradually fade out, and then application sparkle. Like to contact a new shiny and also well-defined cup. Undesirable computer hardware seems solely abrasive metal plating, ne'er throw easy. Exterior is not easy, plus the colour is just not pure. Various other extras, like thin collection plumber's snake, the color isn't direct, feel that friends have some id. Beneficial ironware equipment, such as routine, magnet belt, yank go, and some material earmark will be stainless sprucing treatment method immediately after metal plating, so it's difficult to decay in addition to oxidisation. That is costlier inside hand bags associated with raw materials, much more of a new case ones truth!

Zoe
Zoe's picture
Offline
Mobile Conjurer
Joined: 23 Feb 2012
Posts:
But i'm building for iphone,

But i'm building for iphone, not android (i think i failed to mention that earlier)

Ovidiu
ovidiu's picture
Offline
Mobile Sorcerer
Joined: 27 Jan 2011
Posts:
We reproduced the issue and

We reproduced the issue and we have a bug which you can follow here.

Thanks for pointing it out and have fun using MoSync.

Ovidiu
ovidiu's picture
Offline
Mobile Sorcerer
Joined: 27 Jan 2011
Posts:
Good to know :) (I also

Good to know :) (I also missed the xcode mentioning in your first post)

I'll check it asap

Zoe
Zoe's picture
Offline
Mobile Conjurer
Joined: 23 Feb 2012
Posts:
I've managed to narrow down

I've managed to narrow down the problem and it seems to just be affecting the native ui datapicker.

The code below has a stackscreen with 2 screens, when you click the button to go from the first to the second screen it deletes whatever widgets are in the layout so they can be replaced.  The button is replaced succesfully but the creation of a new date picker seems to cause problems - i create and delete the datepicker at the same time because it seems to prove there is something wrong with the declaration without having to add it to any layouts.  This does seem to be related in some way to the layout that is defined underneath - if you move the datepicker declaration and delete to after the layout  declaration, then everything seems to work fine.  If i put in any other type of widget instead of a datepicker then it works fine.  It doesnt seem to matter if its a layout as the second widget or something else - i tested with a button.

This does seem to be a rather specialised issue but i'm worried that it is a manifestation of something more major.

Thanks


#include <ma.h>                 // Syscalls
#include <MAUtil/String.h>        // C++ String class
#include <MAUtil/Moblet.h>        // Moblet class
#include <conprint.h>            // lprintfln for logging

#include <NativeUI/Widget.h>
#include <NativeUI/Widgets.h>// Include all widgets

using namespace MAUtil;
using namespace NativeUI;

class NativeUIMoblet : public Moblet, public ButtonListener {
public:

    NativeUIMoblet()
    {
        stack = new StackScreen();

        screen1 = new Screen();
        button1 = new Button();
        button1->setText("button1");
        button1->addButtonListener(this);
        screen1->setMainWidget(button1);

        screen2 = new Screen();
        button2 = new Button();
        button2->setText("back");
        button2->addButtonListener(this);

        VerticalLayout* layout = new VerticalLayout();

        mainLayout = new VerticalLayout();
        mainLayout->wrapContentVertically();
        mainLayout->addChild(button2);
        mainLayout->addChild(layout);
        screen2->setMainWidget(mainLayout);

        stack->push(screen1);
        stack->show();
    }

    void NativeUIMoblet::buttonClicked(Widget* button) {
        if(button == button2) {
            stack->pop();
        }
        else {
            int widgets = mainLayout->countChildWidgets();

            for(int i=0; i<widgets; i++) {
                Widget* temp = mainLayout->getChild(0);
                mainLayout->removeChild(temp);
                delete temp;
            }

            button2 = new Button();
            button2->setText("back");
            button2->addButtonListener(this);

            DatePicker* date = new DatePicker();
            delete date;
            date = NULL;

            VerticalLayout* layout = new VerticalLayout();

            mainLayout->addChild(button2);
            mainLayout->addChild(layout);

            stack->push(screen2);
        }
    }

    virtual ~NativeUIMoblet(){}

private:
    Screen* screen1;
    Screen* screen2;
    Button* button1;
    Button* button2;
    StackScreen* stack;
    VerticalLayout* mainLayout;
};

extern "C" int MAMain(){
    NativeUIMoblet* moblet = new NativeUIMoblet();
    Moblet::run(moblet);
    delete moblet;
    return 0;
}

Ovidiu
ovidiu's picture
Offline
Mobile Sorcerer
Joined: 27 Jan 2011
Posts:
The issue I could see in the

The issue I could see in the log is

I/MoSync  (  419): initCompatibility mDatePicker_setMaxDate fail
I/MoSync  (  419): initCompatibility mDatePicker_setMinDate fail
I/MoSync  (  419): initCompatibility mDatePicker_getMaxDate fail
I/MoSync  (  419): initCompatibility mDatePicker_getMinDate fail

However this is not an error or a problem: the four methods are just not available in the current Android version and what you see is the result of the java reflection mechanism we used. When these methods will become available in newer Android versions, we won't have to do anything in mosync and you'll have access to them (and no "error" message will appear).

Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:
Hmm, I've not come across

Hmm, I've not come across this.  Are you using the NativeUI C++ library or C?  Can you share some code?

Login or register to post comments