[nsbasic-ce] Tray Object

2009-09-15 Thread phlipsmsu
Has anyone had success with using the Tray object on a WM5 device?  Is it even 
supported?  

I would like to load an image in the tray so that when it's clicked on, it 
shows/maximizes the forms again (after using the little X to minimize).  MyApp 
is declared as a global and I know that the FindWindow works (have used it 
before).  The problem is the imageIndex = 0 after adding the image.  The image 
is at the location specified.

Thanks in advance!

In Form1_Load
AddObject "NSBasic.win32.Tray", "MyTray"
imageIndex = MyTray.AddImage("\FIDO_1.0\Forms.bmp")
MyTray.Image = imageIndex

Sub MyTray_Click
   Dim wnd
   wnd=API.FindWindow(MyApp)

   If wnd > 0 Then  
  API.ShowWindow wnd,1
   End If   
End Sub

In Output_Close
MyTray.RemoveImage(MyTray.Image)


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[nsbasic-ce] NSExecute error

2009-09-09 Thread phlipsmsu
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


--~--~-~--~~~---~--~~
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] App Install/Run Issues

2009-09-09 Thread phlipsmsu
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


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---