Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently April 20th, 2025, 12:25 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Script for bar frame failing
PostPosted: March 26th, 2010, 8:57 pm 
Offline

Joined: May 28th, 2007, 11:39 pm
Posts: 81
Location: Wirral, UK
Opus: v7.03
OS: XP / Win 7
System: Various
Hi

I'm using a simple script to draw graphs, as shown below. When I enter the page, and the page reads data, the graph is drawn successfully. Whenever I test this in Preview mode it works fine.

In a published version, if I navigate to the page the graph is there - but click to another page and straight back, and the graph isn't drawn. I've used variable watch and all the same data is there to draw the graph, but it fails to appear.

Has anyone got any insight or suggestions?

Many thanks,

Paul

Script:
BarFramea.SetLineStyle(1)
BarFramea.SetLineColour(254,0,0)
BarFramea.SetFillColour(254,0,0)
var XPosa=561
var YPosa=210+(160-zxptime1)
BarFramea.DrawRectangle(XPosa,YPosa,40,zxptime1)

_________________
Opus Pro. v6.0
XP hOME
Intel Core 2 Duo 6550, 2 gb Ram
iNTEGRATED graphics card


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 26th, 2010, 11:39 pm 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
test

_________________
Too much coffee can result in frequent toilet breaks!


Top
 Profile  
 
 Post subject:
PostPosted: March 26th, 2010, 11:50 pm 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
Hi Paul

Please ignore the test message above - I'm having forum submit problems and cannot edit atm.

I'd have a look at the script triggers.

Good luck

Graham

_________________
Too much coffee can result in frequent toilet breaks!


Top
 Profile  
 
 Post subject: Feedback
PostPosted: March 27th, 2010, 2:25 am 
Offline

Joined: May 28th, 2007, 11:39 pm
Posts: 81
Location: Wirral, UK
Opus: v7.03
OS: XP / Win 7
System: Various
Hi

All the triggers for the bars to be drawn are simply 'On Show' commands, and like I said, it works fine in a test environment, but the graphs fail to redraw from certain pages at runtime, even though the variables are eactly the same!

_________________
Opus Pro. v6.0
XP hOME
Intel Core 2 Duo 6550, 2 gb Ram
iNTEGRATED graphics card


Top
 Profile Visit website  
 
 Post subject:
PostPosted: March 27th, 2010, 2:36 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Something to try (and try and try), partially out of curiosity, ...partially as a potential factor/solution.

Insert a wait() state at the beginning of the series of code. Depending what else you have going-on on the Page... start with wait(3) and then decrease the value to smallest possible that works (assuming it is a factor). My guess is the Script wants to execute immediately and not all things are 'in-place' already.

Going further...
- might as well encapsulate that code into the boundaries of a function, and then call the function automatically (with a bit of a wait(0.2) inside the func.)
-- check the basic help files for "Optimizing your Publication". There are several informative tips for how a Page loads (objects from the bottom of the Tree first... etc.). Maybe it is a simple matter of re-ordering, re-stacking.


[Lar Edit:] if that's not it, you've barked up the wrong tree. :lol:

_________________
_good things come to those who wait(0)_


Last edited by Lar_123 on March 27th, 2010, 2:42 am, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: March 27th, 2010, 2:36 am 
Offline

Joined: October 25th, 2004, 3:03 pm
Posts: 540
Location: Tyalgum Creek. Australia
Opus: Opus Pro Latest version 9.02 Build 16458
OS: Won 10
System: Asus laptop Intel Core i5 8 gig ram, big monitor, reading glasses
Hi Paul

Tried to test your script - only one problem

What is zxptime1?

How did you initialise zxptime1?

Tks

Graham

_________________
Too much coffee can result in frequent toilet breaks!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group