|
Let's see. The title of your message says "javascript." The title of this forum is "C / C++ / MFC." Is there something there you don't understand? Do you notice anything odd about those 2 pieces of information?
There's another forum called "Web Development[^]" and the description is "Discussions on AJAX, ASP, HTML, Javascript etc." I wonder what they might discuss over there?
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
You see, thats the problem! I am not sking about web development and title of my topic is:
Messing with javascript.
Messing with javascript may mean that i am trying to do some manipulations on javascript
from C application, so, from c or c++ code in fact. But, there is one but, that is i am not asking,
for example, "guys, c'mon, give me the code, or, better, complete solution how web browser parses javascript". I could name my topic this way: Javascript parsing in c++ - out of curiosity, would you interpret the very first word of such kind of title and send me to web development section yet again?
So, i dont need the code because i can write my very own, the only thing i have asked about - is my algorithm is fine?
P.S. i would understand if you would direct me to General It Discussions, but, please, my question is not about Web Development
011011010110000101100011011010000110100101101110
0110010101110011
|
|
|
|
|
csrss wrote: Messing with javascript may mean that i am trying to do some manipulations on javascript
from C application
And it may mean something else. There is nothing in your original question about C or C++ so perhaps you could rephrase it to show what bits of C/C++ code you are having a problem with.
It's time for a new signature.
|
|
|
|
|
It is pointless...
None of you have read my question even.
011011010110000101100011011010000110100101101110
0110010101110011
|
|
|
|
|
Had you called your original question something like: "Invoking javascript from a C application" or "Calling javascript functions from C" people might have read it a bit more carefully and not deployed sarcasm.
Cheers,
Ash
|
|
|
|
|
I did read it carefully, and I did not employ sarcasm; see my responses.
It's time for a new signature.
|
|
|
|
|
csrss wrote: It is pointless...
None of you have read my question even.
Well I have now read it a second time and apart from the following "all coding done with [C] btw" I can see nothing actually related to C or C++ coding. Most of the questions appear to relate to running JavaScript in an HTML page, so where does the C code come in? As I said before, try rephrasing your question to explain which part of your C code you are having trouble with (include a code snippet) and you may find you get a more acceptable answer. Alternatively if this is really not related to C, then post it in a more relevant forum so it is seen by people with experience of the product you are having problems with.
It's time for a new signature.
|
|
|
|
|
The algorithm of constructing javascript buffer before passing it to
javascript interpreter | parser | virtual machine | like google's V8 or
spidermonkey (i hope you have heard of any of them right?) - this is my question, seen
6 points i have mentioned? where od you see web developemtn here? My concludiosn is that
you simply dont know the answer becuase you have never taken any part in such scale project
therefore i can see there is NO more anything usefull here for me.
What code gyus? i am at the level - i dont have any kind of problems with the code.
I simply dont want to write 1000 lines of code in vain and waste 2 days thats why i have asked my
question but it seems like i am wasting more time here
Farewell
011011010110000101100011011010000110100101101110
0110010101110011
|
|
|
|
|
csrss wrote: it seems like i am wasting more time here
Well despite me asking twice that you rephrase your question to explain what it is that you are having trouble with, you have still not done so. The word algorithm above suggests that perhaps you are posting a design question, but I'm still not sure as the post does not offer any clarification. Maybe if you tried doing what I suggested rather than becoming aggressive and insulting you would find that people would be able to help you.
It's time for a new signature.
|
|
|
|
|
csrss wrote: Javascript parsing in c++ - out of curiosity, would you interpret the very first word of such kind of title and send me to web development section yet again?
No, I would suggest you do a google or bing for "jsgen" and see if that helps any.
Sorry, but I still don't see what your question has to do with C / C++ /MFC. It looks to me to be about how javascript should be parsed and/or interpreted.
My apologies if I'm just too dense to understand.
CQ de W5ALT
Walt Fair, Jr., P. E.
Comport Computing
Specializing in Technical Engineering Software
|
|
|
|
|
csrss wrote: Is it the right way?
Snce it is your project and your code, only you can answer this for sure. Does it produce the desired result? If so, then it likely is right. Otherwise, post actual code and specific questions to get more help.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hey everybody,
I was wondering...
If winspool.drv is a driver (how can I be sure, it is not .sys, but I've been told it is a driver),
than how LoadLibrary() loads a driver ?!?!?! does it make any sense ?!
Thanks!
|
|
|
|
|
|
Thanks
|
|
|
|
|
I am just wondering if this:
class Vector
{
public:
float x,y,z;
};
Vector v;
differs from this:
class Vector
{
public:
float x,y,z;
void Cross(Vector, Vector);
void Dot(Vector, Vector);
void Normalize();
};
Vector v;
in terms of performance.
modified on Friday, June 4, 2010 1:56 PM
|
|
|
|
|
What do you mean by "performances" ? If you mean memory size (which I guess you mean because speed is irrelevant here): there's little difference between the two. The methods of a class are in fact not contained in each instance of the class (which means that if you instantiate 10.000 classes, the methods in the class won't have a big impact on the memory consumption).
Does that answer your question ?
|
|
|
|
|
what's the question ?
performance is dependant on a whole lot of different factors!
memory usage ? computation speed ?
AFAIK, adding member function to a class does not really impact on performance.
Watched code never compiles.
|
|
|
|
|
If you mean does implementing operations on a class as member functions add any overhead to the time it takes to execute those operations compared to an equivalent global function then the answer is no.
If you use virtual functions then there's a bit of additional overhead but it's pretty minimal compared to dividing two floating point numbers.
Cheers,
Ash
|
|
|
|
|
Hey all,
the project I'm currently working on at one point generates several files with specific information in them. What I want to try and do is wrtie to the file properties after generating that file.
ie, right click on a (.txt) file -> properties -> summary
I want to be able to write to the author, keyword....etc... fields listed in that tab. I'm guessing that this can be done with a strig??? but I don't know if there's a MSDS function that allows for this or the proper way to access the information. All of this information (author, keywords and comments) is already stored in structs and arrays. I also already have access to the address of its base location.
idears?
obtw, looks like a good forum, looking for a good response from the first post
modified on Friday, June 4, 2010 12:09 PM
|
|
|
|
|
This[^] CodeProject article could be very useful for you.
|
|
|
|
|
litteraly just found that. Sorry and thanks!
|
|
|
|
|
Hi, im using Radio button to display status of state.
Like State0,State1,State2...
But,user should not click the radio button.
So i make all radio button to disabled,but its look in dull and white colr.
I dont want that.
How can i get that feature ?
Anu
|
|
|
|
|
Well, there is a point in keeping a disabled control looking disabled.
That said, you can handle WM_LBUTTONDOWN in your radio buttons and short-circuit the click from the user.
Edit: Language
|
|
|
|
|
Hey.
Was my first thought too but as it seems, WM_LBUTTONDOWN alone isn't enough since the user can also use the keyboard to tab to the control and then hit SPACE to check it. It helps somewhat if you remove the WS_TABSTOP style but then he can still doubleclick the radio (WM_LBUTTONDBLCLK) which magically sets the focus on the radio and again, he can use SPACE to check it...
Imho the best thing is to also handle some other messages, see here[^].
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Computers are evil, EVIL i tell you!! <
|
|
|
|
|
Create your own CButton class, in it, handle the following messages:
WM_LBUTTONDOWN -> void OnLButtonDown(UINT nFlags, CPoint point)
WM_LBUTTONUP -> void OnLButtonUp(UINT nFlags, CPoint point)
WM_LBUTTONDBLCLK -> void OnLButtonDblClk(UINT nFlags, CPoint point)
WM_KEYDOWN -> void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
WM_KEYUP -> void OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags)
WM_CHAR -> void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags)
In each of these functions, do nothing, don't call the super versions either. Don't know how failsafe it is, but seems to be working for me. Good luck.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Computers are evil, EVIL i tell you!! <
|
|
|
|