Actually, let me suggest where this can be used effectively:  If you have a modeling type application (not necessarily PB) that works sort of like an Excel spreadsheet, for example for forecasting purposes, you could allow users to enter formulas in string fields, do field substitution, and run it through the XppCompiler after wrapping it in a body such as:
 
    str calculation = "2.5 * 3.25 + 1.1";    // Here is where you would do field substitution etc. etc. etc. from a form/table field.
    str code = "real calculate() { return" + calculation + ";}";
    XppCompiler compiler = new XppCompiler().compile(code);
    ;
    info(num2str(compiler.execute(),0,-1,-1,-1));
 
The above is rudimentary code, not validated (i.e. I haven't tested it).
 


From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jesper Kehlet
Sent: Wednesday, July 27, 2005 3:44 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Somthing cool - IO

It is actually being used in both the Product Builder, and in the Data Import/Export functionality in std. Axapta.  The Data Import/Export is probably the easiest example to go through as it is much more straight forward than doing product modeling...


From: Axapta-Knowledge-Village@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Subrahmanyam, Mamidi
Sent: Wednesday, July 27, 2005 3:42 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Somthing cool - IO

Yeah.
I also have not used this much.  but its very cool man.
 
 
static void Job2000(Args _args)
{
    XppCompiler xppCompiler = new XppCompiler();
    ;
  
  if(! xppCompiler.compile('void func() { ; info("hi"); }'))
    {
        info(xppCompiler.errorText());
    }
}
 
 Does anyboy have any exp of using this in real scenario?.
 
Looking for more info on the context where its being used......
Thanks & regards,
subbu
 

Morten Aasheim <[EMAIL PROTECTED]> wrote:

I agree!

 

XppCompiler yes. That is a cool class! I haven’t got that much experience with it, but I have used it to make some advanced queries for some forms. I am on of those guys who don’t like the Query object that much. I prefer using plain SQL. So I figured out if I used to some strings to build me some SQL queries, I could compile them runtime, and put them directly in the executequery() on a form! It worked out perfect!

 

Do you have any other ideas?

 

 

Regards,

Morten

 


From: Axapta-Knowledge-Village@yahoogroups.com [mailto:Axapta-Knowledge-Village@yahoogroups.com] On Behalf Of Jesper Kehlet
Sent: 27. juli 2005 22:14
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Somthing cool - IO

 

Brandon, I would just ignore the reply to your IO article.  Saying "shame on you" because you just found out about those classes is very arrogant in my opinion -- somebody once told me there are no stupid questions, only stupid answers, and the response to your post in my opinion just proves that there are no stupid posts, just arrogant replies.

 

And people replying so arrogantly may end up finding themselves with no answers when they suddenly need it because nobody wants to talk to them...

 

If this forum were only for experts, where would beginners get the answers they need to become experts?

 

So ignore the answer while exploring another cool class in Axapta:  The XppCompiler class...

 


From: Axapta-Knowledge-Village@yahoogroups.com [mailto:Axapta-Knowledge-Village@yahoogroups.com] On Behalf Of Brandon George
Sent: Wednesday, July 27, 2005 2:58 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Somthing cool - IO

Well...

 

 I mean I have only been developing in Axapta since June. I believe myself and other fellow Axapta Developers here have came a LONG way. We have done 4-5 months worth of development into 2 1/2 months time frame...

 

There's nothing really out there on Axapta IO, and so I thought I would get this out there as a marker, so when a search is done in the future someone, will have a way to get to what they need! :-)

 

-Brandon

 


From: Axapta-Knowledge-Village@yahoogroups.com [mailto:Axapta-Knowledge-Village@yahoogroups.com] On Behalf Of Dyachenko, Dmitry
Sent: Wednesday, July 27, 2005 2:48 PM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: RE: [Axapta-Knowledge-Village] Somthing cool - IO

Man, you want to say, that you didn’t know about *Io classes in axapta? Shame on you. ;-)

 


From: Axapta-Knowledge-Village@yahoogroups.com [mailto:Axapta-Knowledge-Village@yahoogroups.com] On Behalf Of Brandon George
Sent: Wednesday, July 27, 2005 11:43 AM
To: Axapta-Knowledge-Village@yahoogroups.com
Subject: [Axapta-Knowledge-Village] Somthing cool - IO

 

Hell All!

 

 I wanted to take the time to review a great class, that exists in Axapta - that for some reason there is not a lot of Documentation on. I guess they don't want us to know about this one! :-)

 

Class: Io extends Object

Run on: Called

Methods

finalize

new

read

status

write

writeExp

Properties

inFieldDelimiter

inRecordDelimiter

inRecordLength

outFieldDelimiter

outRecordDelimiter

 

Description

The Io classes are used to access external files. The basic Io class features no actual data I/O but works as base class for the format specific io classes. The methods common to all io classes are described here. For format specific features and behavior of the member functions, please refer to the documentation for each of the I/O classes.

Remarks

To support read and write of different formats of external files, MorphX features a range of different Io classes; CommaIo for comma separated files, Comma7Io for comma separated 7 bit files, BinaryIo for binary files and AsciiIo for plain text files.

See Also

Comma7Io, CommaIo, BinaryIo, AsciiIo

 

Anyway this is directly from the Documentation that exist in the System Documentation / Classes. It's great because now we have a way, or should I so, now I know of a way to process flat files, etc. without having to do it in C# (or some other language.)

The IO class exists, and then there are some classes that inherit from it which are listed in the the See Also section above. The one I am most intersted in is the ASCiiIO class. Well anyway, maybe this will help someone in the future know that there is Axapta Related Classes that help you use and work with IO. (ie: Text Files, CD Files, etc. etc.)

-Brandon

 


__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Sharing the knowledge on Axapta.



YAHOO! GROUPS LINKS




Reply via email to