pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gkbr...@mac.com>
Subject Re: Alert Using Display
Date Fri, 28 Aug 2009 01:14:28 GMT
> I am trying to show an alert using the following line:
>
> 	Alert.alert( MessageType.INFO, "Loaded.",  display );
>
> Where display is the Display passed to the applications startup  
> method. The
> applications Window hasn't been opened yet. The alert isn't displayed.
>
> In this case should the alert be displayed?

I would think so. In fact, I just created an empty app to verify this,  
and it worked as expected. What happens when you run this app on your  
system?

package org.apache.pivot.wtk.test;

import org .apache.pivot.collections.Map;
import org.apache.pivot.wtk.Alert;
import org.apache.pivot.wtk.Application;
import org.apache.pivot.wtk.DesktopApplicationContext;
import org.apache.pivot.wtk.Display;
import org.apache.pivot.wtk.MessageType;

public class AlertTest implements Application {
     @Override
     public void startup(Display display, Map<String, String>  
properties) throws Exception {
         Alert.alert(MessageType.INFO, "Loaded.", display);
     }

     @Override
     public boolean shutdown(boolean optional) {
         return false;
     }

     @Override
     public void suspend() {
     }

     @Override
     public void resume() {
     }

     public static void main(String[] args) {
         DesktopApplicationContext.main(AlertTest.class, args);
     }
}


Mime
View raw message