Although classes define properties, and PROTOCLASS creates one for each MV file field, you need a instance of a class to reference its properties.
So MVBasic can open an object corresponding to the record in the example, and reference and set the value of its properties, as:
p1="MVFILE.PERS"->%OpenId(1)
crt p1->Fname
p1->Fname="Mary"
p1->%Save()
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
> To post to this group, send email to Cac...@googlegroups.com
> To unsubscribe from this group, send email to CacheMV-u...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en
>
Lee H. Burstein
Product Manager
InterSystems
Office: 302-477-0180
Cell: 302-345-0810
OPEN "MV.FILE" to MV.FILE else STOP U002, "MV.FILE"
to
OPEN "MV.FILE" to MV.FILE else throw Brashers.FileOpenException("MV.FILE")
We then have wrapped all of our programs in a try/catch that loads up a
process private global with the information from our exceptions. When
the program falls back to the menu in an error state, we launch a
program that asks the user for information about menu items and what
they think caused the errors. All of this information along with the
data in the process private global is then written to a global that we
use as a holding pond. This global is scanned regularly by a background
task that sends out our emails. It also accesses our bug tracking
software and uses Web Services to create or update bug tracking cases
with that same information from the email.
Another example is our source control/deployment solution. We use Studio
hooks to export all of source code to our source control directory.
These are then tracked in Mercurial. Each user has at least 2 dev
namespaces on their box. Their "stable" namespace (not necessarily named
"stable") should hold the same code as our central repository. Bugs can
be fixed and pushed everywhere from that namespace. Their "dev"
namespace(s) are the experimental/breaking changes namespaces. We do our
serious development in that namespace.
We have mapped all of our routines and settings globals to another
namespace and left our data globals alone. This allows us to grab any
cache.dat from any of our live auctions (usually from last night's
backup) and drop it straight into any of our namespaces and work with
real data while not having to import code and mess with settings.
Also, all the deployment targets and scheduling is done through Zen and
ASP.Net pages. The Zen pages are for the Studio specific hooks and the
ASP.Net pages are for our management/scheduling programs.
We use web services to transfer projects around to various servers in
our testing/deployment environment and because of the hooks that Studio
gives us, we can pull that project info from a server and recreate the
project in Studio in any namespace we want. We also use web services to
update/close bugs in our bug tracking software and use the %Net.SMTP
class to notify us of compile/deployment problems.
We use the .Net gateway to give Regular Expression syntax to our MV
programs that allows easier screen scraping for some of our tools that
look at information on the web. Our screen scrapers use %Net.HttpRequest
to request and post data to web sites. Because all classes can be
extended in Cache, we've added some extensions to %Net.HttpRequest that
allow us to deal with sites that don't conform 100% to rules in the
various RFCs for the web.
As I read back through this, I hope that people don't see this as
bragging because that isn't my intention. I am just really excited that
Cache has given us the tools to be able to accomplish everything above
in a syntax and manner that we are comfortable with. We regularly ask
each other "How the heck would we have accomplished this in jBASE?". I
think that speaks highly to the toolset that Cache has provided us.
Jason
On Tue, 2011-11-01 at 14:40 -0700, oZone wrote:
> We are also investigating %Installer to automate certain elements of
> our installs.
Lee, I'd like to see that one covered, too. After you supplied an
example for me it looks pretty straightforward. I'm sure there are
nuances that we all might could put to use.
B
For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en
For those of you who don't know, I'm also the Product Manager for deployment which includes %Installer. I'll create a series of tips on this.
In the mean time, if any one needs help, please do not hesitate to contact me.
> --
> You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
> To post to this group, send email to Cac...@googlegroups.com
> To unsubscribe from this group, send email to CacheMV-u...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/CacheMV?hl=en