[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ADTPro - eye candy released



On Apr 26, 10:39 pm, "David Schmidt"
<david.schm...@a2central.com.remove-wap-this> wrote:
>   To: comp.sys.apple2
> On Apr 24, 11:10 pm, magnusfalkirk <dean.pha...@gmail.com> wrote:
>
> > I downloaded your new version of ADTPro and using the previous version
> > transferred the Apple II client to my IIe. I then booted the new
> > version on the IIe and launched 0.2.2 on my Mac. I like the look of
> > the interface, but unfortunately when I tried to transfer a disk image
> > from the Mac to the IIe I got an error message on the IIe saying
> > "unable to open file".
>
> Java doesn't have a native notion of "current working directory," so I have to
> manage it myself - and so have the opportunity to do it wrong.  Go back to
> Sourceforge and pull 0.2.3 - that should fix it.

Well, you can access the OS's current working directory through the
system property "user.dir", but yeah, there's no actual notion of
"current working directory".

My preferred way of handling it is to load "user.dir" into a File
object called (funnily enough) currentWorkingDir, then modify that
file object as the current working directory changes. As long as you
only access files with (File parent, File child) or (File parent,
String child) constructors it works perfectly.

Otherwise, yes, you run into all sorts of contortions once you start
treating path parents as Strings :-)

I appreciate why such a concept isn't a part of the runtime, as it's
obviously only relevant to devices that have filesystems, and Java
runs on many that don't. But it does seem a little silly that there's
no static property on the File class that would allow you to set the
default parent, giving the same functionality that native languages
have on most platforms.

Matt