Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
I'm having a hard time getting to the bottom of this:
Is there any way to call a function once per set of values and then call it again only when the set of values has changed?

I have this ini. file structured like this:
VB
1_Type=012
1_Name=VOLVO
1_PDIcfgPath=D:\Work\Scanner\

2_Type=013
2_Name=VOLVO
2_PDIcfgPath=D:\Work\Scanner\

etc...




and I have a function PDIinit function that initializez the config file from the give path in the ini file (1_PDIcfgPath).
I want this function to be called only for the products that belong to one type and only if the product type is changed I want it to be called and initialize the config file for the products of that type.
Now when I call this function it initializes all the config files for every type and I want it to initialize only the config for specific type.
Posted
Updated 15-Oct-13 1:17am
v2
Comments
Captain Price 15-Oct-13 6:08am    
Remember We can't peek at you screen nor read your mind. This question is pointless and not constructive. You should improve the question describing your situation, background and the exact problem.
Richard MacCutchan 15-Oct-13 9:39am    
As with anything you need to write some decision code. Create a function that does type specific initialization and then you can call it for every type or one specific one as required. alternatively you could use a parameter which is the 'type', a string or value, and use some specific value which means select all types.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900