realbasic-nug
[Top] [All Lists]

Re: f.launch in win32

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: f.launch in win32
From: Chris Little <cslittle at mac dot com>
Date: Mon, 30 Jul 2007 09:29:48 -0400
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
Thread-index: AcfSrbMj8etqWT6gEdyw+AAX8shUyA==
Thread-topic: f.launch in win32
So the problem isn't in the app doing the launching but in the app
receiving. Have you tried creating a simple Windows shortcut that launches
your app with the created file as a parameter to see what happens?

Chris

on 7/29/07 10:23 PM, Lennox Jacob at lenpartico at yahoo dot com wrote:

> Hi Chris,
> 
> Yes it is in the launched app... one instance of the launched app occurs then
> the error window then three more windows, all four windows are new documents.
> 
> It is tricky indeed. If I take the newly created file and drag it over the
> app's icon it opens it and write the contents of the file in the newkly
> created document.
> I have the same arrangement on Mac and f.launch does it neatly.
> 
> On Win32, If I use f.launch for a folder it opens the folder, if I use
> f.launch for an app it opens the app, if I use f.launch for a file nothing
> happens, not even a window to ask which app.
> 
> Lennox.
> 
> Chris Little <cslittle at mac dot com> wrote: Lennox,
> 
> Where are the NilObjectException's happening? In the launched app? I'm
> guessing it is from the behaviour. Are you sure that your application is
> using the passed in file name correctly?
> 
> I only have a Mac at home so putting together a sample that I know works on
> Windows is tricky.
> 
> Chris
> 
> on 7/29/07 8:43 PM, Lennox Jacob at lenpartico at yahoo dot com wrote:
> 
>> Hi Chris,
>> Did exactly as you said and it still does not work, getting a
>> NilObjectException error and four instances of the blank document appears.
>> Any other suggestions, or example project?
>> Lennox.
>> 
>> Chris Little  wrote: You need to pass the absolute path of
>> the file not the folderitem.
>> 
>> f.launch DocumentsFolder.child("myFile").absolutepath
>> 
>> Chris
>> 
>> on 7/28/07 12:32 AM, Lennox Jacob at lenpartico at yahoo dot com wrote:
>> 
>>> OK Chris,
>>> I have been trying your suggestion and this is what I got
>>> f = Volume(0).child("program Files").child("myApp").child("myApp.exe")
>>> f.launch DocumentsFolder.child("myFile")
>>> that gives this message "Parameters are not compatible with this function"
>>> when I try to compile it.
>>> 
>>> but if I use
>>> f.launch it compiles and when the pushbutton is pushed myApp opens a new
>>> document.
>>> How can I get the contents of myFile to be written to that new empty
>>> document?
>>> 
>>> Thanks.
>>> Lennox
>>> 
>>> Chris Little  wrote: on 7/26/07 9:38 PM, Lennox Jacob at
>>> lenpartico at yahoo dot com wrote:
>>> 
>>>> Hello,
>>>> I have myApp in C:\Program Files\myApp\myapp.exe
>>>> 
>>>> I would like to open a text file using FolderItem.Launch so I have in a
>>>> Pushbutton
>>>> Dim f as folderitem
>>>> then I create a text file f
>>>> then I add this code:-
>>>> f.launch "C:\program Files\myApp\myApp.exe"
>>>> 
>>>> When I click the pushbutton f is created as a text file at the specified
>>>> location but myApp is not launched.
>>>> 
>>> 
>>> You have this backwards. You need a folder item to your application that you
>>> call launch on and you pass the absolute path to your text file as a
>>> parameter.
>>> 
>>> Chris
> 
> 
> _______________________________________________
> Unsubscribe or switch delivery mode:
> 
> 
> Search the archives:
> 
> 
> 
>        
> ---------------------------------
> Yahoo! oneSearch: Finally,  mobile search that gives answers, not web links.
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
> 
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>