Thanks Jack,
Yes, f is nil at this point. Use GetFolderItem or whatever to  
instantiate a folderitem. OpenStyledEditField is a method of  
FolderItem, ie., it doesn't return a folderitem. So you need to  
create the folder item before calling it.  // and pass the folder item to the 
same call that the main window uses when we drag a file to it directly.
  ' And here is where the problem lies

  #If TargetWin32 then //Windows only
    f=GetOpenFolderItem("text;rtf") //displays open-file dialog
  #else //Linux and Macintosh
    f=GetOpenFolderItem("text") //displays open file-dialog
  #endif

  f.OpenStyledEditField w.TextField
  w.Document=f  //assign f to document property of TextWindow
  w.title=f.Name  //assign name of f to Title property of w

     f=GetOpenFolderItem("text") 
displays open file-dialog and all goes well, but I don't want the  open-file 
dialog to be displayed, I want the file be opened directly.

Any more suggestions?
Thanks.



                
---------------------------------
 Yahoo! DSL Something to write home about. Just $16.99/mo. or less
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to