I am using Delphi XE2. I have Dev Express 12 installed and use it for some projects.
However I have projects where I do not use DevExpress at all, and I wanted for those to not have any dependency on it.
When I assign a PNG image to any TPicture property on Object Inspector it always use a TdxPNGImage class to handle it.
That cause to add the unit dxGDIPlusClasses creating dependency on having DevExpress installed.
But I need to not break DevExpress on my Delphi. It must continue to work for those projects based on it and that eventually will need this png class.
Somehow I have missed the answer of this on DevExpress forum, even after many searches.
I am posting here the link for the issue and possible solutions:
Delphi 2010 always uses the TdxPNGImage class for loading PNG images (this corrupts form streaming)
I have tested and it works.
Related
So my problem is exactly the same as this guy's here: http://www.pubbs.net/201003/flex/61462-flexcoders-flash-builder-super-class-regeneration.html , but unfortunately, he got no answer.
After initially generating service classes connecting with PHP, I modified the PHP, added new call specifically.
While the Data/Services window successfully made notice of the changes, including new function in the list, the service super-class didn't change whatsoever. Which baffles me, since all super-classes in generated service and valueObject packages contain an annotation like this:
This is a generated class and is not intended for modification. To customize behavior
of this service wrapper you may modify the generated sub-class of this class - SomethingService.as.
And also the sub-class contains something about "regeneration of the super-class". So obviously, my goal is to force the mentioned regeneration. Any thoughts?
Just had a similar problem and it was driving me nuts. In my case, I am using an Eclipse plug-in for Team Foundation Server (a source control repository). In TFS, files are kept read-only until you check them out. Usually when something behind the scenes tries to modify a file that I have open, the plug-in will check out the file automatically and let it make the changes. For some reason, it didn't in this case.
So for me, all I had to do was check out the file and it would then be able to regenerate (which translates to making the file writable for the rest of you who might have the same issue).
I find that most code generators work once to generate classes, but do not work well updating them. It's really hard (I've worked on them).
Can you correct your classes by hand?
I wonder what's the best approach for using third party js libraries on a control library.
If the library uses (let's say) jquery and jquery-ui seems wrong to me to include those on the control library since, if the page using the controls already reference them, they will downloaded twice (the embedded version and the non-embedded version).
On the other side, seems wrong to me to not include them and see how everything fails because the libraries are not referenced.
I could very explicitly specify which js libraries must be referenced for using the controls but not sure if this is the correct approach.
What do you suggest in this case?
I think my concerns with having them embedded in the library would be:
What happens when, as you say, the
page already references jQuery? What if the page
is referencing a different version
of jQuery to the one you've
embedded? Which jQuery instance gets used when
some script runs?
Suppose a security
exploit is discovered in the library
you've shipped - what then? Would
you need to ship a new version of
your control?
I think it would be better for you to say up-front 'this control requires version x of jQuery and version y of jQuery-UI'.
Can i create round images with asp.net? Please advise. My requirement is to upload any image and get a rounded version of that created bu asp.net. I am using .Net framework 3.5, visual studio .net 2008.
Many thanks in advance.
Drawing and image manipulation with GDI+ is straightforward as the other answers suggested.
But please note this is an unsupported path, as stated by this MSDN article (emphasis added by myself).
Classes within the System.Drawing namespace are not supported for use within a Windows or ASP.NET service. Attempting to use these classes from within one of these application types may produce unexpected problems, such as diminished service performance and run-time exceptions.
I have successfully used GDI+ within an ASP.NET application several times, and have never faced any problems, but I guess it's just good to know.
You can do it with GDI+ at least. A short answer: use .Graphics.SetClip() to set your desired shape and then draw you image. Everything outside the clipping region will be cut away.
Here's an article disussing a method that will bring smoother corners (and even softed edges if you like): http://danbystrom.se/2008/08/24/soft-edged-images-in-gdi/
First of all you have to find yourself a library that can do such thing to an image.
I've found sth on CodeProject http://www.codeproject.com/KB/GDI-plus/rounded_corners.aspx but I'm not sure if this is going to work with asp.net (that's basically a thing that you should google).
Then when you have a library you do your job with uploading a file and when it's uploaded you check the mime-type, try to open it and use the library.
You haven't mentioned whether this is web or not, but have you considered rounding the images with css and/or javascript? Once you remove that image detail you can't get it back! What if the client wants a different clip shape later?
Has anyone created a 'realtime' csssprite generator for .NET ?
I want one or more directories of images that get loaded at runtime and the css is automatically generated.
Yes, there is. You'll find it at
http://www.codeproject.com/KB/aspnet/cssspritegenerator.aspx
Unlike Microsoft's attempt at sprites, with this package you don't have to change the way your images are stored and how they are shown. You simply add the .dll and configure the package in your web.config with a few lines.
This package also lets you resize images on the fly, compress them and other good things.
Is this what you are looking for?
It's the closest I found to a baked solution.
Ok finally something official...
Not clear yet if it'll make it into the core ASP.NET framework but here's a Microsoft codeplex project for csssprites :
http://aspnet.codeplex.com/releases/view/50869
if you like it - use it - or just like the idea then add a comment. I think this would be a great thing to have in the ASP.NET framework. Have not personally used it (I had to invent the wheel myself) but its got good reviews.
It includes the following components:
API for automatically generating sprites and inline images
Controls and helpers which provide a convenient way of calling into the API
Features Added in Second Release:
A CSS linking control for Web Forms (selects the proper CSS file for the user's browser, but does not display an image)
Using custom folder paths other than App_Sprites
Changing the tiling direction of sprite images
Merging the generated CSS with a user's own CSS
Features under consideration for future releases:
Automatically selecting the most efficient sprite background colour
Automatically minifying the rendered CSS
Compiling against .NET 3.5
I want to load the flex framework as an RSL (SWZ, using player caching) but I need to monkey patch a couple of bug fixes in the framework.
A number of forums suggest this is not possible. Has anyone gotten this to work?
Same thing as other answer to use frame1, but James Ward has some code to see: http://www.jamesward.com/blog/2009/03/10/flex-monkey-patching-and-framework-rsls/
I believe that only Adobe signed libraries can take advantage of the cross domain player caching mechanisms. Since yours won't be, it' can't.
It should be possible to create a RSL that doesn't take advantage of the player caching. This may be useful if you have multiple flex apps that all use the same Flex SDK RSL on the same domain and you'll let the browser cache them.
One of the guys on my team tried this about a month ago and said he had no problems. If your monkey-patched classes are part of your application project then it should work, since they are compiled into the SWF and basically "override" what's in the framework. You are not changing the Flex framework RSL, so it should still load and be cached fine. There isn't much published by Adobe to explain this but that's how I've understood it to work.
Create a custom Preloader for use and include your overwritten classes in there - that preloader gets loaded before any RSLs (such as the framework RSLs) so monkeypatched classes there will be in first and override the framework ones.
You can force the inclusion of a class by this pattern (put this in your customer Preloader class)
import com.yourclass.ClassName
private var emptyVariableTriggerInclusionOfImportedClass:ClassName
Here is another solution which creates separate RSL for monkey patched classes - http://www.hrundik.ru/blog/