I have designed a pageframe which has 3 pages.
I am using the memvar for textbox,combox grid data on all the pages.
I scatter the memvar & getting the pages refreshed as follows.
thisform.pageframe1.page1.refresh
thisform.pageframe1.page2.refresh
thisform.pageframe1.page3.refresh.

Upto this everthing is fine. But, I have written the routine in the
cmdbutton 'SAVE' for saving the record in click procedure.
Here i am checking some validations for the memvar which are checked. Only
for page1 the check procedure are ok. But when trying to check the memvar of
the second page it gives the error as 'Variable not foun'. I checked that
field name exist & value is also shown, but m.filedname values are not found
for complete 2nd page.
If pageorder is 2 then memvar vvalues of the 1st pages are not found.

I can not understand what is wrong.

Thank u.

Re: Pageframe Memory Variable by Reetesh

Reetesh
Thu Nov 25 02:39:16 CST 2004

Hi,

I guess you have defined memory variables as local / private.

Please try PUBLIC variablename statement so that the variable becomes
availabe in all events anywhere.

For example:
public lc_testvar && here I am declaring that the variable is PUBLIC
testvar = space(10) && initializing the variable with some value
otherwise its value remains as .F.

I hope this helps !

Reetesh B. Chhatpar
ShawMan Software Enterprises
www.shawmansoftware.com

Diamond is just another piece of coal that did well under pressure.


"Bankim Desai" <BankimDesai@discussions.microsoft.com> wrote in message
news:AB088C9A-97CC-4FED-BEF4-3270A2F0A916@microsoft.com...
> I have designed a pageframe which has 3 pages.
> I am using the memvar for textbox,combox grid data on all the pages.
> I scatter the memvar & getting the pages refreshed as follows.
> thisform.pageframe1.page1.refresh
> thisform.pageframe1.page2.refresh
> thisform.pageframe1.page3.refresh.
>
> Upto this everthing is fine. But, I have written the routine in the
> cmdbutton 'SAVE' for saving the record in click procedure.
> Here i am checking some validations for the memvar which are checked. Only
> for page1 the check procedure are ok. But when trying to check the memvar
of
> the second page it gives the error as 'Variable not foun'. I checked that
> field name exist & value is also shown, but m.filedname values are not
found
> for complete 2nd page.
> If pageorder is 2 then memvar vvalues of the 1st pages are not found.
>
> I can not understand what is wrong.
>
> Thank u.



Re: Pageframe Memory Variable by Stefan

Stefan
Thu Nov 25 03:07:55 CST 2004


Try the NAME clause of the gather command. That way you
can store your values o nform.property level, i.e. they won't
fall out of scope (as local and "private", "spontaneous" vars
would do as soon as the creating stack level is over)
and you also don't need to declare them Public
&& Thisform.AddProperty("oRecord") && or do so at design time
Select yourAlias
SCATTER NAME Thisform.oRecord


hth
-Stefan

"Bankim Desai" <BankimDesai@discussions.microsoft.com> schrieb im Newsbeitrag
news:AB088C9A-97CC-4FED-BEF4-3270A2F0A916@microsoft.com...
>I have designed a pageframe which has 3 pages.
> I am using the memvar for textbox,combox grid data on all the pages.
> I scatter the memvar & getting the pages refreshed as follows.
> thisform.pageframe1.page1.refresh
> thisform.pageframe1.page2.refresh
> thisform.pageframe1.page3.refresh.
>
> Upto this everthing is fine. But, I have written the routine in the
> cmdbutton 'SAVE' for saving the record in click procedure.
> Here i am checking some validations for the memvar which are checked. Only
> for page1 the check procedure are ok. But when trying to check the memvar of
> the second page it gives the error as 'Variable not foun'. I checked that
> field name exist & value is also shown, but m.filedname values are not found
> for complete 2nd page.
> If pageorder is 2 then memvar vvalues of the 1st pages are not found.
>
> I can not understand what is wrong.
>
> Thank u.


Re: Pageframe Memory Variable by BankimDesai

BankimDesai
Thu Nov 25 04:55:08 CST 2004

I tried with 'Scatter memvar name thisform.orecord' & 'gather memvar name
thisform.orecord'

problem is same i can get only 1st page memory variable & all other blanks.


"Stefan Wuebbe" wrote:

>
> Try the NAME clause of the gather command. That way you
> can store your values o nform.property level, i.e. they won't
> fall out of scope (as local and "private", "spontaneous" vars
> would do as soon as the creating stack level is over)
> and you also don't need to declare them Public
> && Thisform.AddProperty("oRecord") && or do so at design time
> Select yourAlias
> SCATTER NAME Thisform.oRecord
>
>
> hth
> -Stefan
>
> "Bankim Desai" <BankimDesai@discussions.microsoft.com> schrieb im Newsbeitrag
> news:AB088C9A-97CC-4FED-BEF4-3270A2F0A916@microsoft.com...
> >I have designed a pageframe which has 3 pages.
> > I am using the memvar for textbox,combox grid data on all the pages.
> > I scatter the memvar & getting the pages refreshed as follows.
> > thisform.pageframe1.page1.refresh
> > thisform.pageframe1.page2.refresh
> > thisform.pageframe1.page3.refresh.
> >
> > Upto this everthing is fine. But, I have written the routine in the
> > cmdbutton 'SAVE' for saving the record in click procedure.
> > Here i am checking some validations for the memvar which are checked. Only
> > for page1 the check procedure are ok. But when trying to check the memvar of
> > the second page it gives the error as 'Variable not foun'. I checked that
> > field name exist & value is also shown, but m.filedname values are not found
> > for complete 2nd page.
> > If pageorder is 2 then memvar vvalues of the 1st pages are not found.
> >
> > I can not understand what is wrong.
> >
> > Thank u.
>
>

Re: Pageframe Memory Variable by Sietse

Sietse
Thu Nov 25 05:20:16 CST 2004

Hi Bankim,
As I see it the problem is how you're creating the memvars for the
controlsources. The save only displays the problem
How and where are you decaring and filling the memvars. Are there any memo
fields involved?

Regards,
Sietse WIjnker


"Bankim Desai" <BankimDesai@discussions.microsoft.com> wrote in message
news:69D1B063-9FB9-46FD-A015-6922B77C7DC5@microsoft.com...
>I tried with 'Scatter memvar name thisform.orecord' & 'gather memvar name
> thisform.orecord'
>
> problem is same i can get only 1st page memory variable & all other
> blanks.
>
>
<rest snipped>



Re: Pageframe Memory Variable by Stefan

Stefan
Thu Nov 25 05:33:32 CST 2004


"Bankim Desai" <BankimDesai@discussions.microsoft.com> schrieb im Newsbeitrag
news:69D1B063-9FB9-46FD-A015-6922B77C7DC5@microsoft.com...
>I tried with 'Scatter memvar name thisform.orecord' & 'gather memvar name
> thisform.orecord'


Maybe a typo?, you cannot use the "memvar" clause together with
"name"
CREATE CURSOR temp (test I)
INSERT INTO temp VALUES (5)
SCATTER MEMVAR NAME oRecord && no error ...
? oRecord.Test && ... but did not work: error 13
SCATTER NAME oRecord
? oRecord.Test && prints 5, Ok

> problem is same i can get only 1st page memory variable & all other blanks.

If it's not the typo above, maybe it would be easier not to care
for the page objects at all? Since they all share the form's
datasession, you could Scatter in a custom form.method() for
example.
Since the Scatter command has no IN (workarea) clause,
assumed you have more than one alias, you'd need to
SELECT aliasName beforehand.


hth
-Stefan


Re: Pageframe Memory Variable by BankimDesai

BankimDesai
Thu Nov 25 05:43:02 CST 2004

If 'Private' or Public is the problem ' How can i get the variable data of
the 1st Page'
I notice the problem only when i designed the same in pageframe.
In all other cases it works.
If page order is 1 memvar gives the data of 1st page etc.

I have 3 pages. All the pages contains the data & is shown correctly on all
pages.When queried. But when trying to check the condition of memvar of
different page the 'variable not found' error occures.

"Reetesh B. Chhatpar" wrote:

> Hi,
>
> I guess you have defined memory variables as local / private.
>
> Please try PUBLIC variablename statement so that the variable becomes
> availabe in all events anywhere.
>
> For example:
> public lc_testvar && here I am declaring that the variable is PUBLIC
> testvar = space(10) && initializing the variable with some value
> otherwise its value remains as .F.
>
> I hope this helps !
>
> Reetesh B. Chhatpar
> ShawMan Software Enterprises
> www.shawmansoftware.com
>
> Diamond is just another piece of coal that did well under pressure.
>
>
> "Bankim Desai" <BankimDesai@discussions.microsoft.com> wrote in message
> news:AB088C9A-97CC-4FED-BEF4-3270A2F0A916@microsoft.com...
> > I have designed a pageframe which has 3 pages.
> > I am using the memvar for textbox,combox grid data on all the pages.
> > I scatter the memvar & getting the pages refreshed as follows.
> > thisform.pageframe1.page1.refresh
> > thisform.pageframe1.page2.refresh
> > thisform.pageframe1.page3.refresh.
> >
> > Upto this everthing is fine. But, I have written the routine in the
> > cmdbutton 'SAVE' for saving the record in click procedure.
> > Here i am checking some validations for the memvar which are checked. Only
> > for page1 the check procedure are ok. But when trying to check the memvar
> of
> > the second page it gives the error as 'Variable not foun'. I checked that
> > field name exist & value is also shown, but m.filedname values are not
> found
> > for complete 2nd page.
> > If pageorder is 2 then memvar vvalues of the 1st pages are not found.
> >
> > I can not understand what is wrong.
> >
> > Thank u.
>
>
>

Re: Pageframe Memory Variable by BankimDesai

BankimDesai
Thu Nov 25 05:49:11 CST 2004

If 'Private' or Public is the problem ' How can i get the variable data of
the 1st Page'
I notice the problem only when i designed the same in pageframe.
In all other cases it works.
If page order is 1 memvar gives the data of 1st page etc.

I have 3 pages. All the pages contains the data & is shown correctly on all
pages.When queried. But when trying to check the condition of memvar of
different page the 'variable not found' error occures.


"Stefan Wuebbe" wrote:

>
> Try the NAME clause of the gather command. That way you
> can store your values o nform.property level, i.e. they won't
> fall out of scope (as local and "private", "spontaneous" vars
> would do as soon as the creating stack level is over)
> and you also don't need to declare them Public
> && Thisform.AddProperty("oRecord") && or do so at design time
> Select yourAlias
> SCATTER NAME Thisform.oRecord
>
>
> hth
> -Stefan
>
> "Bankim Desai" <BankimDesai@discussions.microsoft.com> schrieb im Newsbeitrag
> news:AB088C9A-97CC-4FED-BEF4-3270A2F0A916@microsoft.com...
> >I have designed a pageframe which has 3 pages.
> > I am using the memvar for textbox,combox grid data on all the pages.
> > I scatter the memvar & getting the pages refreshed as follows.
> > thisform.pageframe1.page1.refresh
> > thisform.pageframe1.page2.refresh
> > thisform.pageframe1.page3.refresh.
> >
> > Upto this everthing is fine. But, I have written the routine in the
> > cmdbutton 'SAVE' for saving the record in click procedure.
> > Here i am checking some validations for the memvar which are checked. Only
> > for page1 the check procedure are ok. But when trying to check the memvar of
> > the second page it gives the error as 'Variable not foun'. I checked that
> > field name exist & value is also shown, but m.filedname values are not found
> > for complete 2nd page.
> > If pageorder is 2 then memvar vvalues of the 1st pages are not found.
> >
> > I can not understand what is wrong.
> >
> > Thank u.
>
>

Re: Pageframe Memory Variable by Sietse

Sietse
Thu Nov 25 06:47:20 CST 2004

Hi Bankim,
Are you sure your controls display the values stored in the memvar and not
the contents of the fields directly?

"Bankim Desai" <BankimDesai@discussions.microsoft.com> wrote in message
news:07596B9D-E407-4459-829A-4160079B1FD5@microsoft.com...
> If 'Private' or Public is the problem ' How can i get the variable data of
> the 1st Page'
> I notice the problem only when i designed the same in pageframe.
> In all other cases it works.
> If page order is 1 memvar gives the data of 1st page etc.
>
> I have 3 pages. All the pages contains the data & is shown correctly on
> all
> pages.When queried. But when trying to check the condition of memvar of
> different page the 'variable not found' error occures.
>
<rest snipped>



Re: Pageframe Memory Variable by BankimDesai

BankimDesai
Thu Nov 25 09:35:04 CST 2004

Hi,
Control Source is memory varible only

as m.p_code,m.firstname etc


"Sietse Wijnker" wrote:

> Hi Bankim,
> Are you sure your controls display the values stored in the memvar and not
> the contents of the fields directly?
>
> "Bankim Desai" <BankimDesai@discussions.microsoft.com> wrote in message
> news:07596B9D-E407-4459-829A-4160079B1FD5@microsoft.com...
> > If 'Private' or Public is the problem ' How can i get the variable data of
> > the 1st Page'
> > I notice the problem only when i designed the same in pageframe.
> > In all other cases it works.
> > If page order is 1 memvar gives the data of 1st page etc.
> >
> > I have 3 pages. All the pages contains the data & is shown correctly on
> > all
> > pages.When queried. But when trying to check the condition of memvar of
> > different page the 'variable not found' error occures.
> >
> <rest snipped>
>
>
>

Re: Pageframe Memory Variable by BankimDesai

BankimDesai
Thu Nov 25 09:49:14 CST 2004

I have written the scatter memvar in the form load event.
This is ok.
I have created the cmdbuttons as 'prev,next.save,query,delete' etc
when i say 'prev'
skip -1
scatter memvar
when i say 'next'
skip 1
scatter memv
when i say query
search & scatter memv

then following command
thisform.pageframe1.page1.refresh
thisform.pageframe1.page2.refresh
thisform.pageframe1.page3.refresh

uto this everything is fine as going on 1,2,3 page shows the correct data.
But when page order is 1 & watching at memvar which are on page2,page3
does not shows anything but value as 'expression could not be evaluated'.

One thing i have noticed is if i click on 1st page (default) every memvar on
on the 1st page is ok. But on 2&3 not evaluated. If i click on page2 page 2
memvar will show the values & 3 will not be evaluated. if i click on 3 every
data will be evaluated.

Is there something wrong with the refresh.





"Sietse Wijnker" wrote:

> Hi Bankim,
> As I see it the problem is how you're creating the memvars for the
> controlsources. The save only displays the problem
> How and where are you decaring and filling the memvars. Are there any memo
> fields involved?
>
> Regards,
> Sietse WIjnker
>
>
> "Bankim Desai" <BankimDesai@discussions.microsoft.com> wrote in message
> news:69D1B063-9FB9-46FD-A015-6922B77C7DC5@microsoft.com...
> >I tried with 'Scatter memvar name thisform.orecord' & 'gather memvar name
> > thisform.orecord'
> >
> > problem is same i can get only 1st page memory variable & all other
> > blanks.
> >
> >
> <rest snipped>
>
>
>

Re: Pageframe Memory Variable by Stefan

Stefan
Thu Nov 25 09:57:13 CST 2004

> One thing i have noticed is if i click on 1st page (default) every memvar on
> on the 1st page is ok. But on 2&3 not evaluated. If i click on page2 page 2
> memvar will show the values & 3 will not be evaluated. if i click on 3 every
> data will be evaluated.
>
> Is there something wrong with the refresh.

That's by design - invisible pages will not be included by a
ParentContainer.Refresh() to increase performance.
You can either have a line in yourPage.Activate():
This.Refresh()
or use the UIEnable() event of your control/classes.


hth
-Stefan

Re: Pageframe Memory Variable by Gene

Gene
Thu Nov 25 10:50:40 CST 2004

Bankim Desai <BankimDesai@discussions.microsoft.com> wrote:

>If 'Private' or Public is the problem ' How can i get the variable data of
>the 1st Page'
>I notice the problem only when i designed the same in pageframe.
>In all other cases it works.
>If page order is 1 memvar gives the data of 1st page etc.
>
>I have 3 pages. All the pages contains the data & is shown correctly on all
>pages.When queried. But when trying to check the condition of memvar of
>different page the 'variable not found' error occures.

Where are you declaring/creating the variables and how?

[snip]

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

Re: Pageframe Memory Variable by BankimDesai

BankimDesai
Sat Nov 27 01:25:02 CST 2004

I tried with 'Active page() this refresh(). It did not work.
As, this will again give the active page memvar.

I do not know how to use UIenable method.



"Stefan Wuebbe" wrote:

> > One thing i have noticed is if i click on 1st page (default) every memvar on
> > on the 1st page is ok. But on 2&3 not evaluated. If i click on page2 page 2
> > memvar will show the values & 3 will not be evaluated. if i click on 3 every
> > data will be evaluated.
> >
> > Is there something wrong with the refresh.
>
> That's by design - invisible pages will not be included by a
> ParentContainer.Refresh() to increase performance.
> You can either have a line in yourPage.Activate():
> This.Refresh()
> or use the UIEnable() event of your control/classes.
>
>
> hth
> -Stefan
>

Re: Pageframe Memory Variable by BankimDesai

BankimDesai
Sat Nov 27 01:29:02 CST 2004

By giving the command.

Scatter memvar for the current record & using the same as control source all
the continers.

"Gene Wirchenko" wrote:

> Bankim Desai <BankimDesai@discussions.microsoft.com> wrote:
>
> >If 'Private' or Public is the problem ' How can i get the variable data of
> >the 1st Page'
> >I notice the problem only when i designed the same in pageframe.
> >In all other cases it works.
> >If page order is 1 memvar gives the data of 1st page etc.
> >
> >I have 3 pages. All the pages contains the data & is shown correctly on all
> >pages.When queried. But when trying to check the condition of memvar of
> >different page the 'variable not found' error occures.
>
> Where are you declaring/creating the variables and how?
>
> [snip]
>
> Sincerely,
>
> Gene Wirchenko
>
> Computerese Irregular Verb Conjugation:
> I have preferences.
> You have biases.
> He/She has prejudices.
>

Re: Pageframe Memory Variable by Gene

Gene
Sat Nov 27 10:17:37 CST 2004

[reordered to chronological]

Bankim Desai <BankimDesai@discussions.microsoft.com> wrote:

>"Gene Wirchenko" wrote:
>
>> Bankim Desai <BankimDesai@discussions.microsoft.com> wrote:
>>
>> >If 'Private' or Public is the problem ' How can i get the variable data of
>> >the 1st Page'
>> >I notice the problem only when i designed the same in pageframe.
>> >In all other cases it works.
>> >If page order is 1 memvar gives the data of 1st page etc.
>> >
>> >I have 3 pages. All the pages contains the data & is shown correctly on all
>> >pages.When queried. But when trying to check the condition of memvar of
>> >different page the 'variable not found' error occures.
>>
>> Where are you declaring/creating the variables and how?

>By giving the command.
>
>Scatter memvar for the current record & using the same as control source all
>the continers.

That is half of it. Since variable scope could be the culprit,
the where is also important.

Sincerely,

Gene Wirchenko

Computerese Irregular Verb Conjugation:
I have preferences.
You have biases.
He/She has prejudices.

Re: Pageframe Memory Variable by Stefan

Stefan
Mon Nov 29 01:48:40 CST 2004

Hi,

Re Invisible page not refreshed

>I tried with 'Active page() this refresh(). It did not work.
> As, this will again give the active page memvar.
> I do not know how to use UIenable method.

Here I did not understand exactly what you tried and how it did
not work.
Invisible pages are not refreshed by design. But the page.Activate()
event takes place when it gets visible, so you can write a line in each:
This.Refresh()

The .UIEnable() event of any control on your page also runs when the
parent page gets visible, so you can do the same there for each
control separately:
LParameters lEnabled
If lEnabled
This.Refresh()
Endif

All this has probably nothing to do with your original problem.
I'd suggest to make your memvar handling work on form level,
e.g. build a separate simplified test form, through all pageframes
away, use the Name clause of the Scatter / Gather commands
(with a form property for each alias yiou want to handle) as discussed
earlier.
My guess is you'd find "Table Buffering" easier to handle than
the memvar approach, BTW.


hth
-Stefan




"Bankim Desai" <BankimDesai@discussions.microsoft.com> schrieb
>I tried with 'Active page() this refresh(). It did not work.
> As, this will again give the active page memvar.
>
> I do not know how to use UIenable method.
>
>
>
> "Stefan Wuebbe" wrote:
>
>> > One thing i have noticed is if i click on 1st page (default) every memvar on
>> > on the 1st page is ok. But on 2&3 not evaluated. If i click on page2 page 2
>> > memvar will show the values & 3 will not be evaluated. if i click on 3 every
>> > data will be evaluated.
>> >
>> > Is there something wrong with the refresh.
>>
>> That's by design - invisible pages will not be included by a
>> ParentContainer.Refresh() to increase performance.
>> You can either have a line in yourPage.Activate():
>> This.Refresh()
>> or use the UIEnable() event of your control/classes.
>>
>>
>> hth
>> -Stefan
>>