Re: [nsbasic-ce] Re: NSExecute error

2009-09-10 Thread George Henne
Sounds good!

>Hey George,
>
>I think I might have just found the issue.  Being the inital dim is
>setting an array of fixed size, the redim apparently can't resize that. 
>If I initialize the variable as a non-array, then the redims work fine
>and can happen as many times as needed.
>
>Shaun
>
>--- In nsbasic...@yahoogroups.com, "George Henne"  wrote:
>>
>> You might try testing this with a simpler program to see what is going
>> on. You should also try Execute and ExecuteGlobal, which have different
>> (and poorly documented) scoping rules.
>> 
>> >Hi All,
>> >
>> >I'm creating arrays based on my form names on the fly using NSExecute. 
>> >Form names are read from a text file, so they're not known until run-
>> >time.  For example, I have form named "Provenience" so I create a array
>> >to store that data named Provenience.  The size of the array is based on
>> >the number of controls that save data to files.  So if there are 4
>> >controls on the form, the code that does this is:
>> >
>> >NSExecute "dim " & CurrentForm & "(" & UBound(ControlsToWrite) & ")"
>> >
>> >where CurrentForm = "Provenience" and ControlsToWrite is an array of 4
>> >control names (Ubound returning 3).
>> >
>> >This works great with no errors.  The problem is in certain cases, I
>> >need to expand this array to hold data not stored in a control (it's
>> >being tracked internal to the app).  I have used NSExecute with "Redim
>> >preserve" before (including in this app), but for some reason it does
>> >not want to cooperate in this specific case:
>> >
>> >NSExecute "Redim preserve " & CurrentForm & "(" & UBound(ControlsToWrite)
>> >+1 & ")"
>> >
>> >I've tried even hardcoding this with no luck:
>> >
>> >Redim preserve Provenience(5)
>> >
>> >No matter which way I try, I get a VBScript failure - line x, char 6
>> >(just past Redim?) with no other information.
>> >
>> >Any ideas?  I'm totally stuck as to why this won't allow me to do it.
>> >
>> >Thanks,
>> >Shaun
>> >
>> >
>> >
>> >
>> >
>> >Yahoo! Groups Links
>> >
>> >
>> >
>>
>
>
>
>
>
>
>Yahoo! Groups Links
>
>
>


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---



[nsbasic-ce] Re: NSExecute error

2009-09-10 Thread phlipsmsu
Hey George,

I think I might have just found the issue.  Being the inital dim is setting an 
array of fixed size, the redim apparently can't resize that.  If I initialize 
the variable as a non-array, then the redims work fine and can happen as many 
times as needed.

Shaun

--- In nsbasic...@yahoogroups.com, "George Henne"  wrote:
>
> You might try testing this with a simpler program to see what is going
> on. You should also try Execute and ExecuteGlobal, which have different
> (and poorly documented) scoping rules.
> 
> >Hi All,
> >
> >I'm creating arrays based on my form names on the fly using NSExecute. 
> >Form names are read from a text file, so they're not known until run-
> >time.  For example, I have form named "Provenience" so I create a array
> >to store that data named Provenience.  The size of the array is based on
> >the number of controls that save data to files.  So if there are 4
> >controls on the form, the code that does this is:
> >
> >NSExecute "dim " & CurrentForm & "(" & UBound(ControlsToWrite) & ")"
> >
> >where CurrentForm = "Provenience" and ControlsToWrite is an array of 4
> >control names (Ubound returning 3).
> >
> >This works great with no errors.  The problem is in certain cases, I
> >need to expand this array to hold data not stored in a control (it's
> >being tracked internal to the app).  I have used NSExecute with "Redim
> >preserve" before (including in this app), but for some reason it does
> >not want to cooperate in this specific case:
> >
> >NSExecute "Redim preserve " & CurrentForm & "(" & UBound(ControlsToWrite)
> >+1 & ")"
> >
> >I've tried even hardcoding this with no luck:
> >
> >Redim preserve Provenience(5)
> >
> >No matter which way I try, I get a VBScript failure - line x, char 6
> >(just past Redim?) with no other information.
> >
> >Any ideas?  I'm totally stuck as to why this won't allow me to do it.
> >
> >Thanks,
> >Shaun
> >
> >
> >
> >
> >
> >Yahoo! Groups Links
> >
> >
> >
>



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---



[nsbasic-ce] Re: NSExecute error

2009-09-10 Thread phlipsmsu
Hi George,

I made this simpler program this morning.  It repeats the same functionality, 
but without all the background stuff going on, with the same result.  Just 
attach it to a form with a single command button.  If I change the NSExecute in 
_Load to an executeglobal, the redim in the _Click works, but the msgbox in 
_Load doesn't happen.

CurrentForm = "Provenience"
ShowOKButton True

Sub Form1_Load
   nsexecute "dim " & CurrentForm & "(4)"
   MsgBox UBound(Eval(CurrentForm))
End Sub

Sub CommandButton1_Click
   nsexecute "redim " & CurrentForm & "(8)"
   MsgBox UBound(Eval(CurrentForm))   
End Sub

Any idea?


--- In nsbasic...@yahoogroups.com, "George Henne"  wrote:
>
> You might try testing this with a simpler program to see what is going
> on. You should also try Execute and ExecuteGlobal, which have different
> (and poorly documented) scoping rules.
> 
> >Hi All,
> >
> >I'm creating arrays based on my form names on the fly using NSExecute. 
> >Form names are read from a text file, so they're not known until run-
> >time.  For example, I have form named "Provenience" so I create a array
> >to store that data named Provenience.  The size of the array is based on
> >the number of controls that save data to files.  So if there are 4
> >controls on the form, the code that does this is:
> >
> >NSExecute "dim " & CurrentForm & "(" & UBound(ControlsToWrite) & ")"
> >
> >where CurrentForm = "Provenience" and ControlsToWrite is an array of 4
> >control names (Ubound returning 3).
> >
> >This works great with no errors.  The problem is in certain cases, I
> >need to expand this array to hold data not stored in a control (it's
> >being tracked internal to the app).  I have used NSExecute with "Redim
> >preserve" before (including in this app), but for some reason it does
> >not want to cooperate in this specific case:
> >
> >NSExecute "Redim preserve " & CurrentForm & "(" & UBound(ControlsToWrite)
> >+1 & ")"
> >
> >I've tried even hardcoding this with no luck:
> >
> >Redim preserve Provenience(5)
> >
> >No matter which way I try, I get a VBScript failure - line x, char 6
> >(just past Redim?) with no other information.
> >
> >Any ideas?  I'm totally stuck as to why this won't allow me to do it.
> >
> >Thanks,
> >Shaun
> >
> >
> >
> >
> >
> >Yahoo! Groups Links
> >
> >
> >
>



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---



Re: [nsbasic-ce] Connect NS-Basic To MySQL Server

2009-09-10 Thread George Henne
Have a look at the TCPClient and TCPServer samples which come with NS Basic.

You could modify the TCPServer sample to send the requests from
TCPClient to MySQL, then return the results.

>Need help how to connect/access MySQL Server from NS-Basic (using WM5)?
>Thanks
>
>
>
>
>
>Yahoo! Groups Links
>
>
>


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---



Re: [nsbasic-ce] App Install/Run Issues

2009-09-10 Thread George Henne
If you're doing repeated updates to an existing program on the device,
use the "Update App on device" option (F6). It's faster.

Also, Start (F5) does not auto start the app.

I'm not sure what the memory usage issue is. I believe that the Window
Mobile OS may wait till garbage collection is needed before initiating it.

>Hi All,
>
>I've got a strange issue happening, never noticed this before.
>
>I'm in the middle of devel so I've been using the "Start" button from
>the NSB desktop to install/run the app on the mobile device.  When I
>close the app on the device, I use the "Ok" button.  When I try and hit
>the start button again, it looks like it's copying the file over, but it
>doesn't start on the device.  I've looked in the "Running Programs"
>list, but it doesn't appear there.  If I manually start the app on the
>device and then exit or delete it off the device, then I can use the
>"Start" again (sometimes, seems to be hit or miss).  
>
>I've also noticed the memory usage increasing, despite no new programs
>running (and a noticeable slow down).  It eventually requires a soft reset.
>
>I'm using a WM5 device with NSB 7.0.5b.  Any help would be appreciated.
>
>Thanks,
>Shaun
>
>
>
>
>
>Yahoo! Groups Links
>
>
>


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---



Re: [nsbasic-ce] NSExecute error

2009-09-10 Thread George Henne
You might try testing this with a simpler program to see what is going
on. You should also try Execute and ExecuteGlobal, which have different
(and poorly documented) scoping rules.

>Hi All,
>
>I'm creating arrays based on my form names on the fly using NSExecute. 
>Form names are read from a text file, so they're not known until run-
>time.  For example, I have form named "Provenience" so I create a array
>to store that data named Provenience.  The size of the array is based on
>the number of controls that save data to files.  So if there are 4
>controls on the form, the code that does this is:
>
>NSExecute "dim " & CurrentForm & "(" & UBound(ControlsToWrite) & ")"
>
>where CurrentForm = "Provenience" and ControlsToWrite is an array of 4
>control names (Ubound returning 3).
>
>This works great with no errors.  The problem is in certain cases, I
>need to expand this array to hold data not stored in a control (it's
>being tracked internal to the app).  I have used NSExecute with "Redim
>preserve" before (including in this app), but for some reason it does
>not want to cooperate in this specific case:
>
>NSExecute "Redim preserve " & CurrentForm & "(" & UBound(ControlsToWrite)
>+1 & ")"
>
>I've tried even hardcoding this with no luck:
>
>Redim preserve Provenience(5)
>
>No matter which way I try, I get a VBScript failure - line x, char 6
>(just past Redim?) with no other information.
>
>Any ideas?  I'm totally stuck as to why this won't allow me to do it.
>
>Thanks,
>Shaun
>
>
>
>
>
>Yahoo! Groups Links
>
>
>


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb-ce@googlegroups.com
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en
-~--~~~~--~~--~--~---