You don't define it anywhere. You just use it in a string. The
original code on this thread, would be re-written like this:
var db:SQLConnection = new SQLConnection();
var file:File = new File("app:/Ds-fs1/Shared/Faces/faces.db");
db.open(file);
AIR sees it when accessing a file and just knows where to look.
Kind of like the web browser knows the difference between "http://",
"ftp://:, and "file://".
Air knows the difference between "C:\", "app:/", and "app-storage:/".
Does that answer the question?
Andy Matthews wrote:
> Looking now. While I look, how would you define app:/? I mean, of what class
> it associated?
>
> This?
> public var localPath:FileReference = app:/;
>
> This?
> public var localPath:String = 'app:/';
>
>
> andy
>
>
> -----Original Message-----
> From: Jeffry Houser [mailto:[EMAIL PROTECTED]
> Sent: Friday, February 15, 2008 9:05 AM
> To: Flex
> Subject: Re: Relative file paths for AIR app dev
>
> I think he meant his question a bit rhetorically, as his recommendation is
> correct.
>
> "app:/" will give you a direct line into the application root.
>
> "app-storage:/" will get you to user's local storage directory, which (at
> least on Windows) is not the same as the application install directory.
>
> Search the AIR documentation for "Supported URL schemes" for more info.
>
> As an indirect correlation, you can get the absolute paths to application
> root or storage root using two properties on the File class:
> applicationDirectory and applicationStorageDirectory.
>
>
>
> Andy Matthews wrote:
>> Stefan...
>>
>> I don't know if I can, I'm brand new at Flex and AIR. Currently I'm
>> developing off a network drive so that my coworkers and I can share code.
> If
>> I use the app:/ directory would that pull the working db as well as when
> the
>> app is installed?
>>
>>
>> andy
>>
>> -----Original Message-----
>> From: Stefan Richter [mailto:[EMAIL PROTECTED]
>> Sent: Friday, February 15, 2008 8:18 AM
>> To: Flex
>> Subject: Re: Relative file paths for AIR app dev
>>
>> Could you use app:/ ?
>>
>> Fromt he docs:
>>
>> app:/
>> An alias to the application directory. Files accessed from this path will
> be
>> assigned the application sandbox and have the full privileges granted by
> the
>> runtime.
>>
>>
>> Regards,
>>
>> Stefan
>>
>>
>>
>>
>>
>> On 15 Feb 2008, at 14:00, Andy Matthews wrote:
>>
>>> I've got an Flex/AIR app which contains a SQLite db and some photos
>>> which will be included in the install package.
>>>
>>> /src
>>> faces.db
>>> /assets
>>> andymatthews.png
>>> ericcobb.png
>>>
>>> I need to open the db file locally rather than what I'm currently
>>> using which is:
>>>
>>> var db:SQLConnection = new SQLConnection(); var file:File = new
>>> File("//Ds-fs1/Shared/Faces/faces.db");
>>> db.open(file);
>>>
>>> Obviously that file path won't exist on the end user's machine.
>>>
>>> How might I go about referencing it this file so that it will work
>>> both in development, and installed?
>>>
>>>
>>
>>
>>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive: http://www.houseoffusion.com/groups/Flex/message.cfm/messageid:4958
Subscription: http://www.houseoffusion.com/groups/Flex/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.37