Messages by egopinath

6 topics, 12 messages
Kuix technical support » Opening a browser from Kuix

My machine has 3GB RAM and 250 GB secondary memory. I hope i have sufficient amount of memory in my bank. i dont run any other program other than netbeans.

Kuix technical support » Opening a browser from Kuix
  • Does this exception occure on first start ?

              It doesn't occur on first startup.

  • Does this exception occure only on the simulator ?

              yes. It occurs only in simulator

  • Does this exception occure always after you close and restart the application ?

               Yes.

  • When you close the application, do you close the simulator ?

           No

  • What IDE / WTK combination do you use ?

            Netbeans 6.1 and Sun WTK 2.5.2

Kuix technical support » Opening a browser from Kuix

>out of memory

Yes, the error occurs at application startup and I am using KuixMidlet.getDefault().destroyImpl() method to close the application

Kuix technical support » Opening a browser from Kuix

> how can we do text wrapping in text field?

It is not implemented for the moment, but planned for the next release.

> I am using a Text widget not a TextField(sorry for that) and i am updating the text content dynamically. The text is too long that some of the content are sliced. Is there a way to wrap it to the next line.

And to the last question, I tried cleaning the screen before I exit the application but, i am still getting the same error. here is the error trace,

java.lang.OutOfMemoryError
        at org.kalmeo.util.xml.LightXmlParser.parse(+1289)
        at org.kalmeo.kuix.core.Kuix.parseXml(+20)
        at org.kalmeo.kuix.core.Kuix.loadXml(+17)
        at org.kalmeo.kuix.core.Kuix.loadScreen(+15)
        at org.kalmeo.kuix.core.Kuix.loadScreen(+8)
        at com.vhc.mc.frame.MCFrame.firstWSCall(+78)
        at com.vhc.mc.frame.MCFrame.startMIDlet(+224)
        at com.vhc.mc.frame.MCFrame.onAdded(+4)
        at org.kalmeo.util.frame.FrameHandler.pushFrame(+54)
        at com.vhc.mc.midlet.MobileConnect.b(+16)
        at org.kalmeo.kuix.core.KuixCanvas.a(+147)
        at org.kalmeo.kuix.core.KuixMIDlet.startApp(+95)
        at javax.microedition.midlet.MIDletProxy.startApp(MIDletProxy.java:44)
        at com.sun.midp.midlet.Scheduler.schedule(+270)
        at com.sun.midp.main.Main.runLocalClass(+28)
        at com.sun.midp.main.Main.main(+80)

Kuix technical support » Opening a browser from Kuix

hi,

I have three questions

how can i open a browser from kuix application. I know that from a midlet you can use platformRequest() method to open browser. Can we do the same in kuix and will it work?

how can we do text wrapping in text field?

I am getting out of memory error when i close and open the application. This is not coming from the simulator memory, it is thrown from kalmeo's parser. I read from the forum that you need to call cleanup when you are using @{..} properties to remove the link between dataprovider and the widget. Am I right ? if yes what should I do to overcome this error ? If i am wrong what else should i do?

Kuix technical support » creating Button through java code

I missed this part of the code,

Text text = new Text().settext("Button label");

button.add(text);

Thanks

Kuix technical support » creating Button through java code

hi,

I am trying to create a button through java code. But I am unable to see the button in my screen. here is the css

 

button {
    border: 0 0 0 0;
    border-color: #838386;
    bg-color: #000000;
    color: #f19300;       
    padding: 1 6 1 6;
    margin: 0 0 0 0;
}

Kuix technical support » Changing the visibility of widget based on condition

Hi,

I would like to change the visibility of widget based on a condition in my java application. How to set the visibility of the  widget dynamically?

I tried to set the visibility of a widget by passing a dynamic parameter to the visible attribute of the widget. But I couldn't suceed.

I have another question. What is the difference between using '@' and '$' symbol when using dynamic parameters?

Kuix technical support » Problem creating choiceradiogroup

Hi,

Thanks for your reply.

I do have a value attribute for the radiobutton I used. Please look into my xml file. This is what you are speaking about assigning a value or do I need to do something else because i cant see any radiobuttons in my screen but i see a two pixel border after i modified my css file.

i have one more question, Can i able to have a drop down list inside choice instead of radiobutton?

Gopi

Kuix technical support » Problem creating choiceradiogroup

Hi,

i have problem in creating choice dynamically. i could not see the choice in my screen.

Here is my xml code

<screen style="align:fill-center;layout:inlinelayout(false,fill)" >        
        <choice>
            <choiceradiogroup>
                <_renderer><![CDATA[<radiobutton><_value>${custURL}</_value>${custName}</radiobutton>]]></_renderer>
                <_items>@{customerList}</_items>
            </choiceradiogroup>
        </choice>   
</screen>

This is my Frame class,

public class MainFrame implements Frame {

    public static final MainFrame instance = new MainFrame();
    private final DetailDataProvider detailDataProvider = new DetailDataProvider();    // MainFrame's Screen
    private Screen screen;

    public void onRemoved() {
    }

    public void onAdded() {
        detailDataProvider.addCustomers();

        // Preload the screen
        screen = Kuix.loadScreen("/KMobileConnnect.xml", detailDataProvider);
        if (screen != null) {            
            screen.setCurrent();
        }

    }

    public boolean onMessage(Object identifier, Object[] arguments) {
        return true;
    }
}

 

This is my dataprovider class,

public class DetailDataProvider extends DataProvider {
   
    private static final String CUST_LIST = "customerList";
    private static final String SITE_LIST = "siteList";
    private static final String QUEUE_LIST = "queueList";
   
    public void addCustomers() {
        for(int i=0;i<2;i++) {
            Customer customer = new Customer();
            customer.setCustName("Customer " + i);
            customer.setCustURL("CustomerURL " + i);
            addItem(CUST_LIST, customer);
        }
    }

}

 

This is the Customer class, DataProvider uses,

public class Customer extends DataProvider {

    private static final String CUSTOMER_NAME = "custName";
    private static final String CUSTOMER_URL = "custURL";
    public String custName;
    public String custURL;

    public void setCustName(String custName) {
        System.out.println("inside setting custName");
        this.custName = custName;
        dispatchUpdateEvent(CUSTOMER_NAME);
    }

    public void setCustURL(String custURL) {
        this.custURL = custURL;
        dispatchUpdateEvent(CUSTOMER_URL);
    }

    /* (non-Javadoc)
     * @see org.kalmeo.kuix.core.model.DataProvider#getUserDefinedValue(java.lang.String)
     */
    protected Object getUserDefinedValue(String property) {
        if (CUSTOMER_NAME.equals(property)) {            
            return this.custName;
        }
        if (CUSTOMER_URL.equals(property)) {
            return this.custURL;
        }
        return null;
    }
}

 

This is my CSS file,

text {
    align: center;
    font-style: normal;
    color: #f19300;
}
screenTopbar text {
    color: white;
    padding: 1 2 1 2;
}
screenTopbar {
    font-style: bold;
    bg-color: #cccccc;
    border: 0 0 1 0;
    border-color: #f19300;
}
textfield {
    align: center;
    font-style: normal;
    color: #000000;
    bg-color: #f19300;
}
desktop {
    bg-color: #8C8272;
}
choice {
    align: center;
    font-style: normal;
    color: #000000;
    bg-color: #f19300;
}
choiceradiogroup {
    align: center;
    font-style: normal;
    color: #000000;
    bg-color: #f19300;
}

Kuix technical support » Creating choices dynamically

Hi,

How to create choices just like combobox and add items dynamically

Kuix technical support » Effect on performance in using xml

Hi,

I am new to kuix and i am building a new application using web services. I would like to know the effect on performance when using xml rather than java code. The reason for my question is, the application will consume some memory when trying to parse the xml document. So how much will this affect the performance of the application.

I have another question. I want my application to be minimum in size. Application without kuix comes around 70kb but, with kuix it comes around 150kb which is after obfuscating. Is there any other way to reduce my jar file size?

I want to dynamically populate the list for every web service call. Please tell me whether it is good to do it in java or xml?

Thanks,

Gopi