Hot Topic (More than 10 Replies) 2.5 testing - where do my SBAS files go? (Read 3743 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
2.5 testing - where do my SBAS files go?
Sep 18th, 2009 at 1:28pm
Print Post Print Post  
I'm testing 2.5 in it's own directory, C:\Sesame2.5 (my copy of Sesame 2.0 usually runs in C:\Sesame) and am having trouble with Sbasic compilation errors related to my SBAS files.  The application I'm testing resides in C:\Sesame2.5\Miara.  The program is running from C:\Sesame2.5\Program.

Where should I be putting my SBAS files?  Thanks for your help.
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: 2.5 testing - where do my SBAS files go?
Reply #1 - Sep 18th, 2009 at 2:15pm
Print Post Print Post  
In your current working directory (start in directory), probably C:\Sesame2.5 in your case.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: 2.5 testing - where do my SBAS files go?
Reply #2 - Sep 18th, 2009 at 2:21pm
Print Post Print Post  
Thank you.  Did that.  I think I've localized the problem I'm having, but I'm a bit stumped.

This works when hard-coded in the application:
Code
Select All
On Retrieve Spec Open

// Loads the Dispatchers' sort spec

Var vLoadSortSpec as String

IF ( (sUserId = "Jason") OR (sUserId = "Michelle") OR (sUserId = "John") OR (sUserId = "Chris") )
THEN vLoadSortSpec = @SpecCommand(SPEC_OPERATION_LOAD, SPEC_TYPE_SORT, "Workorder # Descending")
 


But not when moved to an SBAS file. I get the error that @SpecCommand is an "unknown identifier".  Any ideas?
  

**
Captain Infinity
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: 2.5 testing - where do my SBAS files go?
Reply #3 - Sep 18th, 2009 at 2:28pm
Print Post Print Post  
Hammer wrote on Sep 18th, 2009 at 2:15pm:
In your current working directory (start in directory), probably C:\Sesame2.5 in your case.


A little bit of experimentation shows that if I'm firing off Sesame Designer in the Program directory, the SBAS files need to be there too.  So I did that, but the problem mentioned above is still being a pain.
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: 2.5 testing - where do my SBAS files go?
Reply #4 - Sep 18th, 2009 at 2:44pm
Print Post Print Post  
You can also use an absolute or relative path, if you need to be very certain.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: 2.5 testing - where do my SBAS files go?
Reply #5 - Sep 18th, 2009 at 3:16pm
Print Post Print Post  
Thanks Mark.  Any thoughts on the @SpecCommand kookiness?
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: 2.5 testing - where do my SBAS files go?
Reply #6 - Sep 18th, 2009 at 3:22pm
Print Post Print Post  
Infinity wrote on Sep 18th, 2009 at 3:16pm:
Thanks Mark.  Any thoughts on the @SpecCommand kookiness?

Does it say that @SpecCommand is unknown or does it say that spec_operation_load is unknown?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: 2.5 testing - where do my SBAS files go?
Reply #7 - Sep 18th, 2009 at 3:47pm
Print Post Print Post  
The error reads
Code
Select All
Error while parsing module "WORKORDR (8)":
Unknown identifier.
Line 6, position 35: [Identifier: SPEC_OPERATION_LOAD]
THEN vLoadSortSpec = @SpecCommand(SPEC_OPERATION_LOAD, SPEC_TYPE_SORT ...
                      ^ 



The ^ mark points to the S in @SpecCommand (in case my formatting of the above gets fungled).

When I click on the line in the error box, my #include line is highlighted,
Code
Select All
#include "WorkorderUsersSortSpec.sbas" 



As I said, if I take the SBAS code in its entirety and plug it directly into the app hard code (and rem out the #include statement) the Program Editor is happy dappy.

The code I'm working with is
Code
Select All
// Loads the Dispatchers' sort spec

Var vLoadSortSpec as String

IF ( (sUserId = "Jason") OR (sUserId = "Michelle") OR (sUserId = "John") OR (sUserId = "Chris") )
THEN vLoadSortSpec = @SpecCommand(SPEC_OPERATION_LOAD, SPEC_TYPE_SORT, "Workorder # Descending") 



I have similar code in an SBAS file for my Invoice database, doing the same thing (loading sort specs) which is having the exact same problem.  Program editor is fine with all my other SBAS files (although I had to rem out the ones that hide tree items, no biggy there, I'll get to that later).
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: 2.5 testing - where do my SBAS files go?
Reply #8 - Sep 18th, 2009 at 4:08pm
Print Post Print Post  
It's not finding your include file, Scott. It's a path problem. Look at the properties of the icon you are using to start Sesame or SDesigner. Look at the Start In directory. Put WorkorderUsersSortSpec.sbas in that directory.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: 2.5 testing - where do my SBAS files go?
Reply #9 - Sep 18th, 2009 at 4:16pm
Print Post Print Post  
The two SBAS files are right in there with all the rest which are working, in this case in C:\Sesame2.5\Program.  I'm starting the program by double-clicking on sdesigner.exe in that directory.  But I also did as Mark suggested and hard-coded the path in the #include statement.  Same result.
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: 2.5 testing - where do my SBAS files go?
Reply #10 - Sep 18th, 2009 at 4:26pm
Print Post Print Post  
This makes no sense, Scott. We're missing something, but it's hard to tell what when we're working blind like this. Get online with Support so they can look at your file setup?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: 2.5 testing - where do my SBAS files go?
Reply #11 - Sep 18th, 2009 at 4:36pm
Print Post Print Post  
Yeah, something is wonky.  However, I'll need to come back to this at another time.  For right now I'm going to hard code it so I can continue testing 2.5.  When I get closer to rollout I'll get in touch with support, see what we can figure out.  It's a fairly minor feature anyway, sorting specs for my users, and I don't see that I'll be changing it often, which is the reasoning behind tossing it into an SBAS file.

I really appreciate all your help, you guys are the best.
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: 2.5 testing - where do my SBAS files go?
Reply #12 - Sep 18th, 2009 at 5:04pm
Print Post Print Post  
It may be the order in which you are including the files. If an include file uses a definition from a different include file, make sure the defining include appears first in the set of includes.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: 2.5 testing - where do my SBAS files go?
Reply #13 - Sep 18th, 2009 at 5:20pm
Print Post Print Post  
There's no nested #include in this file, just the code I posted above.
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: 2.5 testing - where do my SBAS files go?
Reply #14 - Sep 18th, 2009 at 5:42pm
Print Post Print Post  
Not nested. Just multiple includes that depend on one another for defines. Ray is looking into it now.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: 2.5 testing - where do my SBAS files go?
Reply #15 - Sep 18th, 2009 at 6:25pm
Print Post Print Post  
Scott - try something for us.

In your included file, change this
vLoadSortSpec = @SpecCommand(SPEC_OPERATION_LOAD, SPEC_TYPE_SORT, "Workorder # Descending")

to this
vLoadSortSpec = @SpecCommand(spec_operation_load, spec_type_sort, "Workorder # Descending")

and tell me if it works.

Note that all I did was make the use of the defines lowercase.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: 2.5 testing - where do my SBAS files go?
Reply #16 - Sep 18th, 2009 at 7:23pm
Print Post Print Post  
The program editor is now happy dappy with a big fat grin.  The wonkiness has been de-wonked.

And I'm very curious why.

THANKS GUYS!!
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: 2.5 testing - where do my SBAS files go?
Reply #17 - Sep 18th, 2009 at 7:45pm
Print Post Print Post  
Version 2.5 includes a significant optimization to compiling when #define is in use. In the process, a piece of case-sensitivity snuck in. It's very specific and I'll surprised if it affects even six people.

In a nutshell, the use of defined constants in executable code contained in external files and then included will cause a compile error unless they are typed in all lowercase.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: 2.5 testing - where do my SBAS files go?
Reply #18 - Sep 18th, 2009 at 8:00pm
Print Post Print Post  
Thank you for the explanation.  It's a bit over my head but I think I get it.  Just to be safe, should I make sure that all future SBAS programming is done in lower case?  Will anything be affected in my current 2.0 application if I rewrite them all in lower case now?

Thanks again, you guys are the best.  I'll be on the lookout for more bugs just to keep you folks busy.
  

**
Captain Infinity
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: 2.5 testing - where do my SBAS files go?
Reply #19 - Sep 18th, 2009 at 8:06pm
Print Post Print Post  
Infinity wrote on Sep 18th, 2009 at 8:00pm:
...should I make sure that all future SBAS programming is done in lower case?


That would be overkill. Instead, try to use include files for defines and only include executable code that you are using across multiple applications (in which case the defines used will need to be in lower case until we get the next release out).
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: 2.5 testing - where do my SBAS files go?
Reply #20 - Sep 18th, 2009 at 8:17pm
Print Post Print Post  
I'm afraid I don't understand what you mean by "defines".
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: 2.5 testing - where do my SBAS files go?
Reply #21 - Sep 18th, 2009 at 8:25pm
Print Post Print Post  
Infinity wrote on Sep 18th, 2009 at 8:17pm:
I'm afraid I don't understand what you mean by "defines".


If you look in the sbasic_include.sbas file, you will see that most of the lies start with #define. This is a define. It defines something like SPEC_OPERATION_LOAD as a less human-readable value like 0. That way, you can use the define in your code, like this:
vLoadSortSpec = @SpecCommand(SPEC_OPERATION_LOAD, SPEC_TYPE_SORT, "Workorder # Descending")

You can clearly see what spec operation you are using, but Sesame sees it as 0.

The only thing affected by this issue is where you actually use the define in your executable code. The red text above indicates where this is. Nothing else will be affected by the case issue.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: 2.5 testing - where do my SBAS files go?
Reply #22 - Sep 18th, 2009 at 10:01pm
Print Post Print Post  
Ah, I remember now, knew it sounded familiar.  Thanks!
  

**
Captain Infinity
Back to top
IP Logged