opening files created by my app

Langers Christian christian.langers at education.lu
Thu Jun 30 17:07:08 EDT 2005


hello Jan, thierry

thanx, and how is it on windows ?

christian


P.s. Soorry for the multiple mails, but I had problems posting the  
message...



Le 30 juin 05 à 23:03, Jan Schenkel a écrit :

> --- Langers Christian <christian.langers at education.lu>
> wrote:
>
>> Hello everybody,
>>
>> how do I do to have my app read it's own created
>> data upon startup ?
>> e.g. when double-clicking a text file, the text is
>> loaded into the
>> Textedit (on Mac)...
>>
>> I manage to link the created file to open my app,
>> but not to read its
>> content...
>>
>> So, if anybody could give me a hint...
>>
>>
>>
>> Thanks,
>>
>>
>> Christian
>>
>>
>
>
> Hi Christian,
>
> When the user opens one of your files, the MacOS will
> send you an appleEvent of class "aevt" and ID "odoc".
> So you would add a handler to your mainStack:
> --
> on appleEvent pClass, pID
>   if pClass is "aevt" and pID is "odoc" then
>     -- the file path is in the appleEvent data
>     request appleEvent data
>     put it into tFilePath
>     -- do what it takes to open your file
>   else
>     -- very important, pass if you don't handle it
>     pass appleEvent
> end appleEvent
> --
>
> Hope this helped,
>
> Jan Schenkel.
>
> Quartam - Tools for Revolution
> <http://www.quartam.com>
>
> =====
> "As we grow older, we grow both wiser and more foolish at the same  
> time."  (La Rochefoucauld)
>
>
>
> __________________________________
> Yahoo! Mail Mobile
> Take Yahoo! Mail with you! Check email on your mobile phone.
> http://mobile.yahoo.com/learn/mail
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list