Re: There is a folder returns 'false' for folder selected with 'answer folder'

2009-09-09 Thread Trevor DeVore

On Sep 9, 2009, at 12:11 AM, Phil Davis wrote:


Hi Trevor,

What happens if you set the defaultFolder to your target folder?  
Is the result empty?


Yes, the result is empty. Interestingly enough it seems to work and  
you can get the folders and the proper folders in the network share  
(see my response to Jim for further details).


So 'there is a folder' returns false for the path to the share and the  
defaultFolder accepts the path to the share. All very clear :-)


--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Developer Resources: http://revolution.bluemangolearning.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: There is a folder returns 'false' for folder selected with 'answer folder'

2009-09-09 Thread Trevor DeVore

On Sep 8, 2009, at 11:20 PM, Jim Bufalini wrote:

Yes. Windows doesn't like forward slashes for folders. So, there is  
a file

//computerName/folderName/filename works, but there is a folder
//computerName/folderName fails. I really don't know why this is,  
but it is.
So after your answer folder, add the line *replace slash with  
backslash in

it* and it will work. :-)


Hi Jim,

I just tried that but it doesn't make a difference. I've never run  
into problems myself with forward slashes and checking for folder  
existence. I believe the engine makes the necessary changes under the  
hood.


I did some more investigating and here is what I have found out.

When using the answer folder dialog in Revolution you can select  
objects that aren't actually folders. For example, you can select My  
Network Places or My Network Places  Entire Network and press  
the OK button. What you get back is an empty string in 'it' and 'the  
result' is cancel.


Another selection you can make in the answer folder dialog is My  
Network Places  MY_SHARE_NAME (a resource that has an icon of a  
folder with a network cable under it). Selecting the network share  
name returns a value in 'it' but the path does not actually point to a  
folder, but rather the share. 'the result' is empty.


Selecting a folder within the share such as My Network Places   
MY_SHARE_NAME  My Folder gives a valid folder path.


So if you are using answer folder and wondering why the value returned  
is not a folder then this likely why. In a few tests I just did with  
'answer file', clicking the Open button would not close the dialog  
box if a valid file was not selected. I would think that answer folder  
should behave the same, although it would mean that a Revolution  
developer would not be able to prompt the user for a network share  
name (is that something people need to do?).


--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Developer Resources: http://revolution.bluemangolearning.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: There is a folder returns 'false' for folder selected with 'answer folder'

2009-09-09 Thread Trevor DeVore

On Sep 9, 2009, at 9:31 AM, Trevor DeVore wrote:

Another selection you can make in the answer folder dialog is My  
Network Places  MY_SHARE_NAME (a resource that has an icon of a  
folder with a network cable under it). Selecting the network share  
name returns a value in 'it' but the path does not actually point to  
a folder, but rather the share. 'the result' is empty.


Another update -

After further discussions with the customer it turns out that he can  
create folders/files directly within the share.


On my setup I can't create folders or copy files directly to the  
share, I have to work on a folder inside the share. That behavior is  
probably related to how VMWare set the share up though.


So it appears that 'there is a folder' is just not seeing shares as  
folders when they should be. I think I'm going to file a bug report.


--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Developer Resources: http://revolution.bluemangolearning.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: There is a folder returns 'false' for folder selected with 'answer folder'

2009-09-09 Thread Jim Bufalini
Hi Trevor,

 Another update -
 
 After further discussions with the customer it turns out that he can
 create folders/files directly within the share.
 
 On my setup I can't create folders or copy files directly to the
 share, I have to work on a folder inside the share. That behavior is
 probably related to how VMWare set the share up though.
 
 So it appears that 'there is a folder' is just not seeing shares as
 folders when they should be. I think I'm going to file a bug report.

I think you are dealing with a couple things here. I did remember correctly
that there was a difference between there is a folder and there is a
file across network shares. So for example, this works where you select a
file like *//computerName/folderName/filename* You will get true:

ON mouseUp pMouseBtnNo
put empty into fld fldResult
answer file Select a network file
CheckFile it
END mouseUp

ON CheckFile pFile
put The selected file is:  pFile  cr after fld fldResult
put There is such a file:  (there is a file pFile)  cr  cr after
fld fldResult
END CheckFile

This does not work as expected:

ON mouseUp pMouseBtnNo
put empty into fld fldResult
answer folder Select a network folder
CheckFolder it
replace slash WITH backslash in it
CheckFolder it
END mouseUp

ON CheckFolder pFolder
put The selected folder is:  pFolder  cr after fld fldResult
put There is such a folder:  (there is a folder pFolder)  cr  cr
after fld fldResult
END CheckFolder

I thought I had gotten it to work before by changing the slash but as you
can see I just tested and it is false in both cases. There is a work around,
I just can't remember it. ;-)

Now as to writing files to a network share. This does work:

ON mouseUp pMouseBtnNo
put fld fldResult into URL (file: 
//computerName/folderName/AATest.txt)
END mouseUp

The reason why it may not be working for you is you need to check the share
property on the shared folder itself and go to Advanced button and then
Permission and make sure it is allowing Full Control. Otherwise you have
only read permissions, which is the default.

Aloha from Hawaii,

Jim Bufalini






___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: There is a folder returns 'false' for folder selected with 'answer folder'

2009-09-09 Thread Trevor DeVore

On Sep 9, 2009, at 2:34 PM, Jim Bufalini wrote:

I think you are dealing with a couple things here. I did remember  
correctly
that there was a difference between there is a folder and there  
is a
file across network shares. So for example, this works where you  
select a

file like *//computerName/folderName/filename* You will get true:

...

I thought I had gotten it to work before by changing the slash but  
as you
can see I just tested and it is false in both cases. There is a work  
around,

I just can't remember it. ;-)


Having the user map the network drive is one workaround, although not  
an ideal one.



...
The reason why it may not be working for you is you need to check  
the share
property on the shared folder itself and go to Advanced button and  
then
Permission and make sure it is allowing Full Control. Otherwise you  
have

only read permissions, which is the default.


Right. We got the file writing issue worked out. It was a red herring  
and was related to the fact that 'there is a folder' wasn't working  
properly. Thanks for the additional info Jim.


--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Developer Resources: http://revolution.bluemangolearning.com
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


There is a folder returns 'false' for folder selected with 'answer folder'

2009-09-08 Thread Trevor DeVore
I have a customer using a Windows 2003 server with a network drive  
that he has mapped to his Windows computer. I have a test stack that  
calls answer folder and then checks if the folder that was selected  
exists.


The path to the folder being selected looks like this:

//Aname/Astring

'there is a folder' returns false and I'm not able to write a file to  
the directory.


Has anyone seen similar behavior and know what is going on?

Thanks,

--
Trevor DeVore
Blue Mango Learning Systems
ScreenSteps: http://www.screensteps.com
Developer Resources: http://revolution.bluemangolearning.com

Email has been scanned for viruses by Altman Technologies' email management 
service - www.altman.co.uk/emailsystems
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


Re: There is a folder returns 'false' for folder selected with 'answer folder'

2009-09-08 Thread Phil Davis

Hi Trevor,

What happens if you set the defaultFolder to your target folder? Is 
the result empty?


Phil Davis


Trevor DeVore wrote:
I have a customer using a Windows 2003 server with a network drive 
that he has mapped to his Windows computer. I have a test stack that 
calls answer folder and then checks if the folder that was selected 
exists.


The path to the folder being selected looks like this:

//Aname/Astring

'there is a folder' returns false and I'm not able to write a file to 
the directory.


Has anyone seen similar behavior and know what is going on?

Thanks,


--
Phil Davis

PDS Labs
Professional Software Development
http://pdslabs.net

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution


RE: There is a folder returns 'false' for folder selected with 'answer folder'

2009-09-08 Thread Jim Bufalini
Hi Trevor,

 I have a customer using a Windows 2003 server with a network drive
 that he has mapped to his Windows computer. I have a test stack that
 calls answer folder and then checks if the folder that was selected
 exists.
 
 The path to the folder being selected looks like this:
 
 //Aname/Astring
 
 'there is a folder' returns false and I'm not able to write a file to
 the directory.
 
 Has anyone seen similar behavior and know what is going on?

Yes. Windows doesn't like forward slashes for folders. So, there is a file
//computerName/folderName/filename works, but there is a folder
//computerName/folderName fails. I really don't know why this is, but it is.
So after your answer folder, add the line *replace slash with backslash in
it* and it will work. :-)

Aloha from Hawaii

Jim Bufalini

___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution