Powerbuilder resource file with spaces in icon names - icons

I created a Powerbuilder app that uses picture buttons. Some icons have names with spaces in them ('icon 1.png'). Now I created a resource file (.pbr). Rebuild goes thrue without problems, however when I ran the app, the picture buttons with icons that have spaces in the title show a white image. It works fine for buttons without spaces ('icon2.png').
Is there a way to make a valid .pbr with spaces? I tryed editing icon paths with ",',~b but I get errors during rebuild.

Yes, it is possible to use spaces in the icon file names. I am already using in Powerbuilder 11.5. What version do you use?

Related

Details about Icon Groups

I'm playing with Mingw and embedding Icons. I add a single Icon by using windres and linking it in at compile time.
TRAY_ICON ICON "np.ico"
The Icon for the executable shows as the linked one, and opening the file with CFF explorer or similar tools show the Icon in the resource section.
When loading the Icon from within the application I use LoadIcon like below:
LoadIcon(GetModuleHandle(NULL), "TRAY_ICON");
Which works as expected and I can use the Icon for whatever. When looking at other executables I can see multiple Icons in the resources however. These are similar and are only different in size.
With multiple Icons present in the resource section, how does Windows decide which one to use when viewing the file in explorer or similar?
How are specific Icons selected when specifying a given Icon group?
K, so solved both, just forgot to post an answer here.
Windows uses the first icon group for the program icon.
Icon files can contain multiple images. Use the Linux imagemagic package to merge them. Windows decides which one to use based on size.

Does CSS accept folder names with spaces?

I have tried to insert a background image in a CSS archive, the image is in my computer, I tried to put the image address but the editor does not recognize it. When I run the code my background photo does not appear. There is some problem with the spaces in some folder names? The image address is
"G:/Programação/Webdesign/Curso de Webdesign/Projeto CSS/imagens/bg-3.jpg". My code editor is Visual Studio Code.
It accepts folder with spaces it will be %20 in url.
But you should use relative path for your image like /imagens/bg-3.jpg or /Projeto CSS/imagens/bg-3.jpg

VS 2010 not opening css files in css editor

I have no idea how to fix this.
VS keeps opening css file in some text editing mode, see the picture below.
I have already tried to set it manually to open using css editor, right-click on css file and select "Open with..."
When I click OK here, it opens my css file in CSS source editor fine,
but every next time it opens again in that text mode, like it completely ignores that it has to open it using css editor :(
Of course I installed and reinstalled Web Standards Update a thousand times.
Nothing helps.
The damn thing keeps opening them in that ugly text mode :(
Hmmm. Have you tried looking under the view menu? It's been a while since I've used it, but I remember different views being under the view menu bar.
If that doesn't work then I'd always try creating a new .css file and copy and pasting all the information; after you copy and paste, overwrite the pre-existing corrupt file.

Arabic Locale Support in Flex

Today, I learn how to localize my Flex application and to support multiple languages. The tutorials on-line are great. However, non of them mention the Arabic locale.
So basically, I created the Arabic (Jordan) locale files in the SDK folder by using:
copylocale en_US ar_JO
I navigated to the locale folder and I was able to see the ar_JO folder in there... So I assume everything went smooth.
Next, I followed the tutorials (www.babelfx.org) and was able to localize my test application in English, French, and Arabic. Clicking on any of those languages switches the labels of my simple form/into the desired language... however:
When switching to the Arabic language the labels turn into empty square symbols. If you are wondering, yes I can open a notepad and type Arabic text and save it successfully.
When I type Arabic text into the text boxes, I can see the Arabic words that I typed correctly (the labels are still square symbols).
Any ideas what I might be missing here??
I tried changing the font of my application (right on the application tag I set the fontFamily) into Simplified Arabic which comes by default on Windows.
Thanks
Have you embedded a font into your swf which can render Arabic? Are you using that font? If the answer is no to either, then I suggest reading up on the subject.
One thing to remember about Flash and fonts is that it has incredible power which comes from the fact that one is able to embed actual fonts into the swf itself. One also needs to remember that Flash is incredibly finicky and is prone to throwing fits if you fail to do so.
The solution is to change the context-type to UTF-8. Three ways to accomplish this from within Flex Builder:
(Option 1) Right click the file from the File Navigator and select Properties
(Option 2) With the file open, navigate to the File menu and choose Properties
(Option 3) With the file open, press Alt + Enter to bring up the file Properties
Once the properties window is displayed, you will see the option to change the file encoding from Default to Other (UTF-8).
Note: At least for me, once I changed the content-type to UTF-8, I had to close my unsaved file, open it back up, and paste my contents back into the file in order to clear the error message. Then clean the project (Project -> Clean...) and let it rebuild.
I found the solution. Actually, I didn't have to embed any fonts or anything in order to get it working.
My problem was the encoding in the resources.properties file. I opened it in Notepad++, then I noticed the Encoding menu. At that time, I remembered reading something about that the encoding of the resources files should be UTF-8. So I converted the encoding to UTF-8 from the menu, compiled, it didn't work! After couple of retries and cleaning the project, it worked successfully!!!
Just a reminder for everybody (as I have fallen into this while working this problem out):
For mx components, embedded fonts must have the embedAsCFF set to false.

Visual Studio inserting indents as spaces to html output

I am using Visual Studio 2010 for an MVC website project. I have an big problem and dont know hot to solve it. When i am looking to the output of html in firebug indents in my aspx and ascx files are outputed as space in same places. I think its about line ending of files but i am not sure how to fix them. I am adding some pictures about problem.
When i am adding a breakpoint it also add red background to spaces (this is problem) I try to delete spaces after hit ctrl+k d same problem happen.
If i delete all indents make page 1 line without spaces output is fine but it not a solution.
ASPX/ASCX engine emits literal content within markup as is i.e if your file has spaces or tabs for indentation then they will be output as is. You can use Tools->Options for keeping tabs (instead of space) for indents - you can change for all languages or say only for HTML. VS 2010 has a great extension Productivity Power Tools that will (apart from other things) warn you if your file has tabs & space mix and allows you to choose either tabs or spaces.
Now as a better solution, you can use HttpModule to remove whitespace from your response - see http://madskristensen.net/post/A-whitespace-removal-HTTP-module-for-ASPNET-20.aspx

Resources