Accessing a parameter in an MV class

2 views
Skip to first unread message

Bill Farrell

unread,
Oct 14, 2014, 10:29:28 AM10/14/14
to InterSy...@googlegroups.com
I've been happily coding along on this new gig for a few weeks now, using a mix of COS and MVBasic. I have an MVBasic method in which I'd like to access a parameter in the same class. IIRC, at one time the syntax for accessing a class parameter was a bit hinky and destined for change. I'm coding on 2012.2 at the moment. What's the correct MV syntax on that rev or later for accessing a parameter in @ME? Scouring the DocBook isn't helping me at the moment. I see $PARAMETER() for COS but nothing for MVBasic. I remember accessing parameters when I was at World Info but haven't needed since then until now.

Thanks!
Bill

Michael Cohen

unread,
Oct 14, 2014, 11:56:24 AM10/14/14
to InterSy...@googlegroups.com

Hi Bill,

 

Although $PARAMETER was never added to MVBasic, all classes have a $GetParameter() method you can invoke.  For example:

D3:;CRT "MVFILE.AR"->%GetParameter("MVFILENAME")

AR

--
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
---
You received this message because you are subscribed to the Google Groups "InterSystems: MV Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to InterSystems-...@googlegroups.com.
To post to this group, send email to InterSy...@googlegroups.com.
Visit this group at http://groups.google.com/group/InterSystems-MV.
For more options, visit https://groups.google.com/d/optout.

Bill Farrell

unread,
Oct 15, 2014, 8:11:38 AM10/15/14
to InterSy...@googlegroups.com
Thanks, Michael. I found what I was doing wrong (keyboard/chair disconnect). For the last couple of years I've been mostly using COS. I'm on a project now where it's appropriate to use both COS and MVBasic. (You just can't beat MVBasic for slicing, dicing, and transforming strings.)

It feels pretty darn good to be working with Cache again after a foray into the LAMP world.

Bill
Reply all
Reply to author
Forward
0 new messages