Re: [Gambas-user] Load hidden file to variable?

2012-04-07 Thread sundar j
Thanks (tobi) for the help. Now i solved the problem. The is not related to 
gambas. String manipulation was incorrect in my program which resulted the 
error to look like the "subject". Also i understood the power of print for 
debugging / tracking errors.

From: tobi <tobiasboeg...@googlemail.com>
Sent: Mon, 02 Apr 2012 21:28:00 
To: sundar_...@rediffmail.com, mailing list for gambas users 
<gambas-user@lists.sourceforge.net>
Subject: Re: [Gambas-user] Load hidden file to variable?
On Mon, 02 Apr 2012, sundar j wrote:

> Print Error is False for both if statement and file.load function. I have 
checked file permission and it is root. I think file permission is not an issue 
here since it does not even detect file. Also i have tested the same with other 
file (root permission) and it works perfectly. Again i need not have to edit 
the file. 

> 



wow, mail citation gets weird now.



could we quickly recall? to clarify things to me, too... this all works as 
expected (gives True):



Print Exist("~/")

Print Access("~/", gb.Read)



and

Print File.Load("~/")



insistently fails?



regards,

tobi

--
For Developers, A Lot Can Happen In A Second.
Boundary is the first to Know...and Tell You.
Monitor Your Applications in Ultra-Fine Resolution. Try it FREE!
http://p.sf.net/sfu/Boundary-d2dvs2
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Load hidden file to variable?

2012-04-02 Thread tobi
On Mon, 02 Apr 2012, sundar j wrote:
> Print Error is False for both if statement and file.load function. I have 
> checked file permission and it is root. I think file permission is not an 
> issue here since it does not even detect file. Also i have tested the same 
> with other file (root permission) and it works perfectly. Again i need not 
> have to edit the file. 
> 

wow, mail citation gets weird now.

could we quickly recall? to clarify things to me, too... this all works as 
expected (gives True):

Print Exist("~/")
Print Access("~/", gb.Read)

and
Print File.Load("~/")

insistently fails?

regards,
tobi

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Load hidden file to variable?

2012-04-02 Thread sundar j
Print Error is False for both if statement and file.load function. I have 
checked file permission and it is root. I think file permission is not an issue 
here since it does not even detect file. Also i have tested the same with other 
file (root permission) and it works perfectly. Again i need not have to edit 
the file. 

From: "nando" <nand...@nothingsimple.com>
Sent: Mon, 02 Apr 2012 15:56:06 
To: sundar_...@rediffmail.com, mailing list for gambas users 
<gambas-user@lists.sourceforge.net>
Subject: Re: [Gambas-user] Load hidden file to variable?
A hidden file IS hidden by default from normal views.

So, the result appears to be correct.

(Benoit: maybe a flag is needed for hidden files in call?)

Nevertheless, LOAD ought to work with hidden files too.

(Are your permissions correct)

Files extensions and associations are a windoze thing and don't matter in Linux.

...and it shouldn't make a difference either what the extension is.

Make sure your filename without an extension doesn't have a trailing dot

because it can make things tricky and work funny to the human point of view.

(especially coming from windoze world)

So, in Linux:

~/.applicationtempfile/.hiddendir/file

  is not the same as

~/.applicationtempfile/.hiddendir/file.   <==notice the trailing dot

but in some versions of windoze/DOS, the two are the same file.

It is especially true if you think the dot starts an extension (windoze)

or if you understand the dot is just another character in the filename (Linux)



Also, filenames and directories can be have spaces in their name.

So  'Hello .'  is a valid filename or directory name

and 'Hello . ' is valid too

and ' ' is also valid too

so is '                     
                      
  '  (45 spaces, all spaces)



How about this: (I'm doing this from memory..so it may be a little off on 
syntax)



TRY search = File.Load("~/.applicationtempfile/.hiddendir/file")

'and on the next line, print the error produced

PRINT Error.  <===put something from Error. statement to describe the 
exact error.



-Fernando







-- Original Message ---

From: "sundar j" <sundar_...@rediffmail.com>

To: "Jussi Lahtinen " <jussi.lahti...@gmail.com>

Cc: mailing list for gambas users 
 <gambas-user@lists.sourceforge.net>

Sent: 2 Apr 2012 01:05:37 -

Subject: Re: [Gambas-user] Load hidden file to variable?



> Ok. Ifound out the issue where it is. It seems to be associated with file 

> extension. The file i want to load does not have any extension. So I 
created the 

> same file with ".txt" extension inside the same hidden directory to see 
the 

> result. This time it loaded fine and did not have an issue. However my 
problem 

> remain same as gambas could not find the file without extension. How do I 

> overcome this?

> 

> From: Jussi Lahtinen &lt;jussi.lahti...@gmail.com&gt;

> Sent: Sat, 31 Mar 2012 21:33:31 

> To: sundar_...@rediffmail.com, mailing list for gambas users

&lt;');">gambas-user@lists.sourceforge.net>;

> Subject: Re: [Gambas-user] Load hidden file to variable?

> Why it doesn't work? It cannot find the file? Or does it give you error 
message?

> 

> Jussi

> 

> On Sat, Mar 31, 2012 at 18:36, sundar j 
&lt;');">sundar_...@rediffmail.com>; wrote:

> 

> I need to load file to a variable which is residing in side a hidden 
folder. So 

> i tried to load it like

> 

> If Exist("~/.applicationtempfile/.hiddendir/file") = True Then

> 

> search = File.Load("~/.applicationtempfile/.hiddendir/file")

> 

> ...

> 

> rest of coding

> 

> ...

> 

> However obove code does not work. Any help???

> 

> 
--

> 

> This SF email is sponsosred by:

> 

> Try Windows Azure free for 90 days Click Here

> 

> http://p.sf.net/sfu/sfd2d-msazure

> 

> ___

> 

> Gambas-user mailing list

> 

> Gambas-user@lists.sourceforge.net

> 

> https://lists.sourceforge.net/lists/listinfo/gambas-user

> 

> 
--

> This SF email is sponsosred by:

> Try Windows Azure free for 90 days Click Here 

> http://p.sf.net/sfu/sfd2d-msazure

> ___

> Gambas-user mailing list

> Gambas-user@lists.sourceforge.net

> https://lists.sourceforge.net/lists/listinfo/gambas-user

--- End of Original Message ---



--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Load hidden file to variable?

2012-04-02 Thread Benoît Minisini
Le 02/04/2012 03:05, sundar j a écrit :
>
> Ok. Ifound out the issue where it is. It seems to be associated with file 
> extension. The file i want to load does not have any extension. So I created 
> the same file with ".txt" extension inside the same hidden directory to see 
> the result. This time it loaded fine and did not have an issue. However my 
> problem remain same as gambas could not find the file without extension. How 
> do I overcome this?
>

Sorry, but Exist("~/.applicationtempfile/.hiddendir/file") perfectly 
works on my machine, whatever the file and directories names are.

Check the file access rights !

Regards,

-- 
Benoît Minisini

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Load hidden file to variable?

2012-04-02 Thread nando
A hidden file IS hidden by default from normal views.
So, the result appears to be correct.
(Benoit: maybe a flag is needed for hidden files in call?)
Nevertheless, LOAD ought to work with hidden files too.
(Are your permissions correct)
Files extensions and associations are a windoze thing and don't matter in Linux.
...and it shouldn't make a difference either what the extension is.
Make sure your filename without an extension doesn't have a trailing dot
because it can make things tricky and work funny to the human point of view.
(especially coming from windoze world)
So, in Linux:
~/.applicationtempfile/.hiddendir/file
  is not the same as
~/.applicationtempfile/.hiddendir/file.   <==notice the trailing dot
but in some versions of windoze/DOS, the two are the same file.
It is especially true if you think the dot starts an extension (windoze)
or if you understand the dot is just another character in the filename (Linux)

Also, filenames and directories can be have spaces in their name.
So  'Hello .'  is a valid filename or directory name
and 'Hello . ' is valid too
and ' ' is also valid too
so is ' '  (45 spaces, all spaces)

How about this: (I'm doing this from memory..so it may be a little off on 
syntax)

TRY search = File.Load("~/.applicationtempfile/.hiddendir/file")
'and on the next line, print the error produced
PRINT Error.  <===put something from Error. statement to describe the exact 
error.

-Fernando



-- Original Message ---
From: "sundar j" 
To: "Jussi Lahtinen " 
Cc: mailing list for gambas users  
Sent: 2 Apr 2012 01:05:37 -
Subject: Re: [Gambas-user] Load hidden file to variable?

> Ok. Ifound out the issue where it is. It seems to be associated with file 
> extension. The file i want to load does not have any extension. So I created 
> the 
> same file with ".txt" extension inside the same hidden directory to see the 
> result. This time it loaded fine and did not have an issue. However my 
> problem 
> remain same as gambas could not find the file without extension. How do I 
> overcome this?
> 
> From: Jussi Lahtinen <jussi.lahti...@gmail.com>
> Sent: Sat, 31 Mar 2012 21:33:31 
> To: sundar_...@rediffmail.com, mailing list for gambas users
<gambas-user@lists.sourceforge.net>
> Subject: Re: [Gambas-user] Load hidden file to variable?
> Why it doesn't work? It cannot find the file? Or does it give you error 
> message?
> 
> Jussi
> 
> On Sat, Mar 31, 2012 at 18:36, sundar j <sundar_...@rediffmail.com> 
> wrote:
> 
> I need to load file to a variable which is residing in side a hidden folder. 
> So 
> i tried to load it like
> 
> If Exist("~/.applicationtempfile/.hiddendir/file") = True Then
> 
> search = File.Load("~/.applicationtempfile/.hiddendir/file")
> 
> ...
> 
> rest of coding
> 
> ...
> 
> However obove code does not work. Any help???
> 
> --
> 
> This SF email is sponsosred by:
> 
> Try Windows Azure free for 90 days Click Here
> 
> http://p.sf.net/sfu/sfd2d-msazure
> 
> ___
> 
> Gambas-user mailing list
> 
> Gambas-user@lists.sourceforge.net
> 
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> --
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
--- End of Original Message ---


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Load hidden file to variable?

2012-04-01 Thread sundar j

Ok. Ifound out the issue where it is. It seems to be associated with file 
extension. The file i want to load does not have any extension. So I created 
the same file with ".txt" extension inside the same hidden directory to see the 
result. This time it loaded fine and did not have an issue. However my problem 
remain same as gambas could not find the file without extension. How do I 
overcome this?

From: Jussi Lahtinen <jussi.lahti...@gmail.com>
Sent: Sat, 31 Mar 2012 21:33:31 
To: sundar_...@rediffmail.com, mailing list for gambas users 
<gambas-user@lists.sourceforge.net>
Subject: Re: [Gambas-user] Load hidden file to variable?
Why it doesn't work? It cannot find the file? Or does it give you error message?

Jussi




On Sat, Mar 31, 2012 at 18:36, sundar j <sundar_...@rediffmail.com> wrote:


I need to load file to a variable which is residing in side a hidden folder. So 
i tried to load it like



If Exist("~/.applicationtempfile/.hiddendir/file") = True Then

search = File.Load("~/.applicationtempfile/.hiddendir/file")

...

rest of coding

...

However obove code does not work. Any help???

--

This SF email is sponsosred by:

Try Windows Azure free for 90 days Click Here

http://p.sf.net/sfu/sfd2d-msazure

___

Gambas-user mailing list

Gambas-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/gambas-user



--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Load hidden file to variable?

2012-03-31 Thread Jussi Lahtinen
Why it doesn't work? It cannot find the file? Or does it give you error
message?

Jussi




On Sat, Mar 31, 2012 at 18:36, sundar j  wrote:

> I need to load file to a variable which is residing in side a hidden
> folder. So i tried to load it like
>
> If Exist("~/.applicationtempfile/.hiddendir/file") = True Then
> search = File.Load("~/.applicationtempfile/.hiddendir/file")
> ...
> rest of coding
> ...
> However obove code does not work. Any help???
>
> --
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Load hidden file to variable?

2012-03-31 Thread tobi
hi,

On Sat, 31 Mar 2012, sundar j wrote:
> I need to load file to a variable which is residing in side a hidden folder. 
> So i tried to load it like 
> 
> If Exist("~/.applicationtempfile/.hiddendir/file") = True Then 
> search = File.Load("~/.applicationtempfile/.hiddendir/file")
> ...
> rest of coding
> ...
> However obove code does not work. Any help???
> --
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure
> ___
> Gambas-user mailing list
> Gambas-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user

actually, it should, there is no difference between "normal" and hidden files. 
it works for me.
maybe you messed around with the variable? try
Print File.Load("~/.applica...")
to see the content, it really should work.

regards,
tobi

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user


Re: [Gambas-user] Load hidden file to variable?

2012-03-31 Thread Sebi
Hi! Try to use User.Home instead of ~. 

I.e.
File.Load(User.Home &/ "/.applicationtempfile/.hiddendir/file")

-Original Message-
From: "sundar j" 
Date: 31 Mar 2012 15:36:56 
To: gambas-user
Reply-To: sundar_...@rediffmail.com,
mailing list for gambas users 
Subject: [Gambas-user] Load hidden file to variable?

I need to load file to a variable which is residing in side a hidden folder. So 
i tried to load it like 

If Exist("~/.applicationtempfile/.hiddendir/file") = True Then 
search = File.Load("~/.applicationtempfile/.hiddendir/file")
...
rest of coding
...
However obove code does not work. Any help???
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user
--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user