Click here to Skip to main content
15,891,409 members

Comments by fgoldenstein (Top 11 by date)

fgoldenstein 18-Aug-11 16:39pm View    
Thanks for your answer but it's not what i'm looking for. I need something simple so users can move a TextBox or add and image using a free tool. Something like ReportViewer but with a tool to edit report design and that doesn't require Visual Studio.
Imagine that your application is going to print invoices and each customer has a different pre-printed invoice. You have to options:
1) Configuration where the user enters coordinates. It's what I have today but it's not easy for customers.
2) Tool to drag and drop data and fit the pre-printed form.
fgoldenstein 26-Jul-11 9:46am View    
I deleted the "solution" I wrote because it was a comment, as BobJanova said. This is his comment, which was deleted after I deleted the solution:

"First thing, you should respond to a solution by using 'Add Comment', not posting a new solution.

If it is not possible for references to be circular, you can solve this by pre-walking and whenever you trip over one of these, switch the order of the parents." BobJanova
fgoldenstein 26-Jul-11 9:44am View    
Thanks for your answer!

Recalculating cost and price:
I thinks recalculating the cost is an issue because of performance problems. Imagine a producto composed by many products and components. Each children (product or component) composed by many products and components and so on. When you have to calculate cost of a product, it can get really messy. And price, sometimes, depends on cost (price can be fixed or variable).
Also, I prefer to have my DB with summarized values so I can create queries faster.

UpdatePrice method:
Your implementation is OK but I'm afraid of a situation. Take a look at this example:

A------- B
| | | | |
D E E F G

A = 2B + 5D + 2E
B = E + 5F + 8G

When E changes its cost, you have to get its parents, A and B in this case. A gets updated and the B is updated to. A has no parents but B has A as its parent. So you have to update A again.
Maybe this sample is short but this can get very huge.

Thanks again for your help.
fgoldenstein 23-Feb-11 14:58pm View    
I agree that Dispose() is not calling the GC but it's disposing any resource you need to get disposed. Calling GC is not a solution because even when you call it, it doesn't mean it's going to run. It runs when GC thinks it's time to run. My solution releases attached resources but it doesn't clean the object from memory.
Anyway, how many instances of a class should you create in order to fill the memory? I think that using the "using" block you can be sure that no memory leak or dead lock will occur. I think that the GC is going to be smart enough to run when the memory is almost full.
fgoldenstein 17-Feb-11 18:32pm View    
They're not the same because if you have a concrete class with a virtual method and you call that method there's no late binding. Late binding occurs when you have inheritance and you are calling an abstract or a virtual method with overriden method.
Do you agree?