Problem with SetTargetFrame and OpenPage, Help please!

Hi,This is Notes R6 project, which have one frameset contains 4 frames. one(English or French) of the outline links on the left frame has the following codes:

This “English” link:

@SetEnvironment(“BabelPrefITEC”; “ENUS;FRFR”);

@SetTargetFrame(“Frame2”);

@Command([OpenPage]; “MainMenu”);

@SetTargetFrame(“Main”);

@PostedCommand([OpenPage]; “welcome”);

@SetTargetFrame(“Frame4”);

@PostedCommand([OpenPage]; “ViewTitle”);

@SetTargetFrame(“Frame1”);

@PostedCommand([OpenPage];“APPTitle”)


This is French Link:

@SetEnvironment(“BabelPrefITEC”; “FRFR;ENUS”);

@SetTargetFrame(“Frame2”);

@Command([OpenPage]; “MainMenuFR”);

@SetTargetFrame(“Main”);

@PostedCommand([OpenPage]; “welcomeFR”);

@SetTargetFrame(“Frame4”);

@PostedCommand([OpenPage]; “ViewTitle”);

@SetTargetFrame(“Frame1”);

@PostedCommand([OpenPage];“APPTitle”)

This is “French” Link:

This codes basically switch the French page and English page on the menu(left) and open the pages on the specific frames. It works on most cases(about 98%), but when I use the database for a while, and then click the French, I got message “Page ‘WelcomeFR’ does not exist”, if I click English link, I got mesasge “Page ‘welcome’ does not exist”,(I also got the message today “cannot execute the specified command” message). the result is the Welcome(welcomeFR) page does not load on the Main frame, but the other pages loaded well.

It seems only at that moment( I can not get when this happen, it does not have any patten, it appears randomly), the system can not find the Welcome(welcomeFR) page.

Is this the notes bugs or something wrong with my codes? Or I need add more codes for the settargetframe and Openpage formula?

Thanks a lot for any help,

Subject: Problem with SetTargetFrame and OpenPage, Help please!

I don’t know about the problem, but I have a suggestion you might be able to use:

You can make you database a multilingual database and then name your forms the same name and specify which language the each form is for. Then when you call the form (or page), it will pull whichever one matches the language of the user.

Subject: RE: Problem with SetTargetFrame and OpenPage, Help please!

Thanks,Christopher:This project has been finished, this is the only problem I have now.

But I will try to use your suggestion when I design multilingual database in the future.

Anyway, thanks your help,

Subject: RE: Problem with SetTargetFrame and OpenPage, Help please!

Try clicking on to the side of the link (without touching link) and then click on the link. Then it may work. Try this when you get that problem again.

If that works, that means, the system is loosing the handle of that frame where link exists. Hence may have to do a workaround to fix this.

In notes these things happen, only is system looses handle because of some opearation on the frame. Check that when you get a chance.

Subject: RE: Problem with SetTargetFrame and OpenPage, Help please!

Hi,Narasimhan:Thanks a lot for your help.

I got this problem again today(it is hard to get this problem, like I said probably it is only 1% of chances). Then follow the way you suggested - “clicking on the side of the link(without touching link)”, yes the error is gone.

I think it is exactly like you said, the system is loosing the handle of that frame where link exists.

Do you know how to fix this problem?

Apart from this link(French and English), I also have other links(outline embedded on the same page), these links basically is open the view and loaded on the main frame which is the same frame with the welcome page.

Is there anything to keep the cursor the left menu before click the link?

Thank you very much for your help,

Subject: RE: Problem with SetTargetFrame and OpenPage, Help please!

Let’s us say there are two links on left navigator which is Link A and Link B on Page-I.

Code in such a way that the left page will be loaded all the time whenever you click on a link. You need to code even though you open a view directly in right frame.

You can write code in the corresponding outline (for all links on that page)as follows:

@Do(@SetTargetFrame(“LeftFrame”);@Command([OpenPage];“PageName”);@SetTargetFrame(“RightFrame”); @Command([OpenView];“viewName”))

This way you get the handle all the time and will not loose any handle.

No need to specify any Target frame in any of the element events or properties.

Hope this helps.

Subject: RE: Problem with SetTargetFrame and OpenPage, Help please!

HI,Narasimhan:Thank you very much for your quick helps.

I have follow your suggestions to change the codes, basically I added the @Do(…) to all of the links on the left menu page(embedded outline), most of them are @settargetframe and openview or openpage.

I will do more test after the codes changes, if this changes works, that would be the easy fixes.

That will be great.

I will let you know if I still got the errors, since it is hard(1%) to get the error message, I need test more until I got the errors.

But the thing is why this error message exists, because I have used the samilar codes on my projects, they are all works fine, but only I got errors this time.

Thank you very much again, have a nice day,

Peter

Subject: RE: Problem with SetTargetFrame and OpenPage, Help please!

You might have not observed this while developing other apps. But this time luckily you experienced those. Because with this type of development, they always exist.

Subject: RE: Problem with SetTargetFrame and OpenPage, Help please!

Hi,Narasimhan:Thanks a lot for your help again.

I keep testing the project these days, but unfortunately I got that error again today.

Probably that code did not fix the problem, same as your said, when I click the outside of the link(French or English), it opens the Welcome page. But after I click the French(English) link again, the error appear again. It seems as long as the error appears, it exists for all of the session until I close this database and re-open again, then the error will be disppear(It seems the error was cached in the system at that moment). And I also got the error message “Cannot execute the specified command” at that time.

Any other better ideas?

Thanks a lot again for your help,

By the way, if you do not mind, can I have your email address?(my email is:jiapings@gmail.com)

Peter