FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

browser bug?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT
View previous topic :: View next topic  
Author Message
Gertje



Joined: 25 Apr 2005
Posts: 9

PostPosted: Wed Jan 25, 2006 4:12 am    Post subject: browser bug? Reply with quote

Hello, I wrote the following program:

Code:

import dwt.all;

version = OLE_COM;

version(build){
   debug{
      pragma(link, "dwtd.lib");
   }else{
      pragma(link, "dwt.lib");
   }

   pragma(link, "advapi32.lib");
   pragma(link, "comctl32.lib");
   pragma(link, "gdi32.lib");
   pragma(link, "shell32.lib");
   pragma(link, "comdlg32.lib");
   pragma(link, "ole32.lib");
   pragma(link, "uuid.lib");
   pragma(link, "phobos.lib");
   
   pragma(link, "user32_dwt.lib");
   pragma(link, "imm32_dwt.lib");
   pragma(link, "shell32_dwt.lib");
   pragma(link, "msimg32_dwt.lib");
   pragma(link, "gdi32_dwt.lib");
   pragma(link, "kernel32_dwt.lib");
   pragma(link, "usp10_dwt.lib");
   pragma(link, "olepro32_dwt.lib");
   pragma(link, "oleaut32_dwt.lib");
   pragma(link, "oleacc_dwt.lib");   
}

public void main(char[][] args)
{
   Shell shell;
   try
   {
      Display display = new Display();
      shell = new Shell(display);
      Browser browser = new Browser(shell, DWT.NONE);

      char[] html = "<html><title>Title</title><body><p>Hello World!</p></body></html>";
      if(!browser.setText(html))
         throw new Exception("Error at rendering");

//      browser.setUrl("http://www.google.com");

      shell.setLayout(new FillLayout());
      shell.layout();
      shell.setText("Browser Test");
      shell.open();

      while (!shell.isDisposed()) {
         if (!display.readAndDispatch())
            display.sleep();
      }
      display.dispose();   
   }catch(Exception e){
      MessageBox.showMessage(e.toString(), "Exception", shell);
   }
}


The program does not do what I want it to do, I think I should render Hello World, but instead it stays blank. When I use setUrl instead it works like a charm! Is this a bug or am I doing something wrong?

Thanks! Geert
Back to top
View user's profile Send private message
Shawn Liu



Joined: 09 Mar 2005
Posts: 104
Location: Shanghai, China

PostPosted: Sat Jan 28, 2006 9:36 pm    Post subject: Reply with quote

A lot of codes are commented in DWT Browser porting.
It is just partially implemented because I get a lot violate access errors.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DWT All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group