I'm not sure if I have everything set up correctly. When I go to the calendar from my app it opens in a new window. When running Jump To Event in My Layout the calendar stays open which I like. From my app, if the user hits my Calendar button instead of selecting the existing open calendar, a 2nd Calendar is created. How can I setup that up better.
Thanks
Scott
Multiple Open Calendars
6 posts
• Page 1 of 1
Posts: 33
Joined: Sun Sep 26, 2010 12:46 am |
|
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
Hi Scott,
In your file, the script a use runs to open the calendar should do something like this: Set Error Capture [ On ] Select Window [ the name of the calendar window, which is probably the name of the file, be sure you uncheck the box constraining this selection to windows of the currrent file ] If [ Get ( LastError ) = 0 ] // ie the window was there and is now selected Exist Script Else Do whatever you were doing to open the calendar End If Hope that helps, John John Sindelar
SeedCode |
Posts: 33
Joined: Sun Sep 26, 2010 12:46 am |
The script it running the exit script line even when the calendar is not open. It is using the name of the file, "Peak7"
In my startup script "Upon Opening" is on the first line. A few lines down I have Set Window Title[Current WIndow;New Title: Get (FileName)] #---------Required by Seed Code Calendar Is there a chance that my other windows are called "Peak7". I'm sure how to figure that out. Thanks Scott |
Posts: 33
Joined: Sun Sep 26, 2010 12:46 am |
I changed the name of my main window since the calendar uses the filename also.
Close to the beginning of the Load Calendar Layout it checks for multiple windows. The code there is #So we do't run this on spawning new windows if[ValueCount(WIndowNames(get(filename))>1) Exit Scrip[] It exits there so does not load data for the calendar. Perhaps I could skip that section but would like to know if that is what would be recommended. Obviously it is there for a reason. Thanks Scott |
Posts: 33
Joined: Sun Sep 26, 2010 12:46 am |
John,
You had said that the easiest way to open the calendar in a new windows is by having the calendar as a separate app. I have all ready integrated the calendar into my app and would like to keep it in the app at this point. Here is where I am having trouble Close to the beginning of the Load Calendar Layout it checks for multiple windows. The code there is #So we do't run this on spawning new windows if[ValueCount(WIndowNames(get(filename))>1) Exit Scrip[] |
Posts: 2764
Joined: Thu Nov 20, 2003 11:01 am |
You've already integrated it: got it. Thanks.
If you're always having two windows up, you could change the following to us a 2 instead of a 1: If[ValueCount(WIndowNames(get(filename))>1) Exit Scrip[] If that doesn't help, unfortunately I have to confess that I've kind of lost the thread of what behavior we're trying to change. Can you let me know what the problem is and I'll try to help. - John John Sindelar
SeedCode |
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests