Indigo Rose Software
  #1  
Old 11-08-2007
ryanc ryanc is offline
Indigo Rose Customer
 
Join Date: Aug 2006
Posts: 25
<name> expected near `return'

Good Day

I am having a problem in compiling my Update Scripts with True Update 3.0. Upon verifying (check syntax) the on finish script for a screen in the updater I get the following error message: Line=x <name> expected near `return' this is line x

Code:
	Screen.return(SR_SUCCESS);
Now I haven't made any changes to this script, I've simply just done a syntax check. If I load and complile a backup of this exact project I don't have any problems. But of course If I do attempt to make any changes to this script I get the error again.

Thanks for your time.
Reply With Quote
  #2  
Old 11-09-2007
Adam's Avatar
Adam Adam is offline
Indigo Rose Staff Member
 
Join Date: May 2000
Location: Indigo Rose Software
Posts: 2,154
Not sure exactly what the issue is but the syntax for that action should be:

Code:
Screen.Return(SR_SUCCESS);
Adam Kapilik
Reply With Quote
  #3  
Old 11-22-2007
ryanc ryanc is offline
Indigo Rose Customer
 
Join Date: Aug 2006
Posts: 25
When I change the r to R as soon as the cursor moves away it reverts to lowercase "r". I thought that perhaps I couldn't write to the file, but I do have write access. Any other ideas?

I solved my problem by manually editing the .tu2 file, replacing "Screen.return" with "Screen.Return". But given that the editor reverts the case the script editor may be at fault.

Is it not possible that return being a reserved word, is being misidentified in the case of Screen.return by the syntax checker?

Last edited by ryanc; 11-22-2007 at 02:46 AM. Reason: I forgot to add how I Fixed it - and my theory
Reply With Quote
  #4  
Old 11-22-2007
Adam's Avatar
Adam Adam is offline
Indigo Rose Staff Member
 
Join Date: May 2000
Location: Indigo Rose Software
Posts: 2,154
I have run some tests here on my XP-SP2 machine and cannot replicate this issue. I am able to type in Screen.Return and it honors the capital R.

Adam Kapilik
Reply With Quote
  #5  
Old 12-03-2007
ryanc ryanc is offline
Indigo Rose Customer
 
Join Date: Aug 2006
Posts: 25
Still Happening

The problem isn't with new additions, it is when editing an already existing script. The project I am using I have been using since I first implemented TU (about a year ago now).

In terms of replication it's really easy, I create a new project. Go the HTTP Download Screens On Finish Event and there it is "Screen.return"
---------------------------------------------

To Test What I did was open the project in Notepad++ to check all the caps of Screen.Return, which was all 100%. And at each stage of the editing the file I reloaded the file to check that it had remained in the correct case. So far so good.

However when getting to the script editor, the script editor had already changed Return to return. The file on the HD was still correct.
At this point I had not saved the file to the HD. I then try to a compile and I get the error, I imagine its using the in memory version of my script which has been modified by the syntax editor.

So I am still having this problem, needless to say it is Extremely annoying.
I have double checked the write permissions to the file the only "odd" thing about my setup is that I do all my Dev on a Subst Drive, which I imagine plenty other people do.

Can I submit my project to the support department to be checked out? Any
other suggestions?

My Setup:
OS Name Microsoft Windows XP Professional
Version 5.1.2600 Service Pack 2 Build 2600
OS Manufacturer Microsoft Corporation
System Manufacturer INTEL_
System Model D865GLC_
System Type X86-based PC
Processor x86 Family 15 Model 3 Stepping 4 GenuineIntel ~3192 Mhz
Processor x86 Family 15 Model 3 Stepping 4 GenuineIntel ~3192 Mhz
BIOS Version/Date Intel Corp. BF86510A.86A.0063.P18.0406220349, 2004/06/22
SMBIOS Version 2.3
Windows Directory C:\WINDOWS
System Directory C:\WINDOWS\system32
Boot Device \Device\HarddiskVolume1
Locale South Africa
Hardware Abstraction Layer Version = "5.1.2600.2180 (xpsp_sp2_rtm.040803-2158)"
Time Zone South Africa Standard Time
Total Physical Memory 1,024.00 MB
Available Physical Memory 327.79 MB
Total Virtual Memory 2.00 GB
Available Virtual Memory 1.96 GB
Page File Space 1.63 GB
Page File C:\pagefile.sys

True Update:
Version 2.0.6.0

Last edited by ryanc; 12-03-2007 at 02:36 AM.
Reply With Quote
  #6  
Old 12-04-2007
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hi Raync,

In your first post you said that you were using TrueUpdate 3.0 but given your last post I assume that you are using TrueUpdate 2.0 is this correct?

Now as far as the code is concerned you mean the code on the "On Finish" event of the "Download File (HTTP)" screen? The code is the following correct?

Code:
if(screen_globals.DownloadResult == 0) then
	-- Return SR_SUCCESS so the calling script knows that
	-- the file was downloaded successfully
	Screen.Return(SR_SUCCESS);
else
What happens if you type Screen.Return(SR_SUCCESS); on the main screen? Does the capital R revert there as well? What if you copy and past Screen.Return(SR_SUCCESS); does that work?

Have you tried saving your project file using another name? Or to another drive?
__________________
MSI Factory The Next Generation Intelligent Setup Builder
Reply With Quote
  #7  
Old 12-06-2007
ryanc ryanc is offline
Indigo Rose Customer
 
Join Date: Aug 2006
Posts: 25
ah yes

Correct I am using True Update 2.0 my mistake.

I will try your suggestions

[edit]
As for saving to another file name, experience has taught me that for each change save to a new file name. So for each change I make to my True Update project I save to a new filename.

[edit 2]
Yes the screen in question is the download http screen.

The code editor isn't reverting Screen.Return (in the main screen). It still honors it in the main screen editor (Client/Server Scripts)

[edit 3]
As I load the screen for editing "Download File (HTTP) -> On Finish editor display it already as Screen.return and typing it (Screen.Return) in the editor reverts it to Screen.return

So there we have it

Last edited by ryanc; 12-06-2007 at 07:49 AM.
Reply With Quote
  #8  
Old 12-06-2007
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hi ryanc,

Please try to answer these questions as best you can:

1) When you say revert, do you mean that the character changes after you type it? Are you trying the full action each time?

2) Did you try pasting:

Code:
Screen.Return(SR_SUCCESS);
What happened when you did?

3) What happens when you try typing Screen.Return(SR_SUCCESS); on another event of the "Download File (HTTP)" screen? Does it work properly there?

4) What about on a different screen? Have you tried that does it work properly there?

5) What happens if you add another "Download File (HTTP)" screen, and then type Screen.Return(SR_SUCCESS);?

6) Have you tried uninstalling the software and reinstalling it? This is a very strange error that has never been reported to us, and cannot be replicated by any of our testers.

7) Do you have any screen capture software? Would it be possible for you to create a video of the revert happening so that we can see exactly what is happening?
__________________
MSI Factory The Next Generation Intelligent Setup Builder
Reply With Quote
  #9  
Old 12-07-2007
ryanc ryanc is offline
Indigo Rose Customer
 
Join Date: Aug 2006
Posts: 25
Video

I have recorded my testings in a flash video.

It makes it pretty clear as to what my problem is.
Attached Files
File Type: zip TrueUpdate.zip (1.33 MB, 12 views)
Reply With Quote
  #10  
Old 12-07-2007
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hi ryanc,

Thanks for the video, it really cleared things up for us on this end. What gave it away was the fact that "Return" was being coloured blue, meaning that it was being parsed as a keyword.

This is actually an editor setting, right-click on the script and select "Editor Settings". Then on the Language tab of the Editor Settings dialog you should see a checkbox that is checked near the bottom labeled "Fixup text case when typing language keywords." uncheck that checkbox and everything should work properly again.
__________________
MSI Factory The Next Generation Intelligent Setup Builder
Reply With Quote
  #11  
Old 12-08-2007
ryanc ryanc is offline
Indigo Rose Customer
 
Join Date: Aug 2006
Posts: 25
Thanks

Just tested it with the changed setting and it no longer occurs. But will I not be loosing some functionality with this setting changed?
Reply With Quote
  #12  
Old 12-10-2007
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hi ryanc,

You may be losing some functionality with that setting turned off. However it is turned off by default and it obviously is incompatible with the screen.Return() action since return is a keyword.
__________________
MSI Factory The Next Generation Intelligent Setup Builder
Reply With Quote
  #13  
Old 12-10-2007
ryanc ryanc is offline
Indigo Rose Customer
 
Join Date: Aug 2006
Posts: 25
An Error?

Is this not possibly a bug then? I haven't noticed anything different as yet, but then I haven't had to do any major work in the project of recent
Reply With Quote
  #14  
Old 12-10-2007
Mark's Avatar
Mark Mark is offline
Indigo Rose Staff Member
 
Join Date: Jun 2000
Location: Indigo Rose Software
Posts: 1,773
Hi ryanc,

No this is not a bug, everything is working properly.

The "Fixup text case when typing language keywords." checkbox does exactly what it says that it does. It ensures that the case of any keyword that it encounters is correct.

So with that option enabled, if "Return" is encountered the editor will notice that it is a keyword with the incorrect case an adjust it to be: "return". This is the correct functionality.

However this is incompatible with the Screen.Return() action since the action's name contains a keyword.
__________________
MSI Factory The Next Generation Intelligent Setup Builder
Reply With Quote
  #15  
Old 12-11-2007
ryanc ryanc is offline
Indigo Rose Customer
 
Join Date: Aug 2006
Posts: 25
It's a feature that causes problems as it doesn't respect the Internal TU functions, if I understand you correctly?
Perhaps some sort of visual warning about enabling this option, if it renders TU unable to compile your in screen scripts?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CompareFileVersions does not work as expected tkilshaw Setup Factory 7.0 Discussion 2 05-18-2005 11:15 AM


All times are GMT -6. The time now is 02:59 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software