AS3: weird dynamic text bug - actionscript-3

I'm working on a game and weird bug happens, when i want to display scores.
For example it shows 5 instead of 75. It happens sometimes, not regularly and only for a moment, until variable will change again.
The code is simple:
point_txt.text = String(points);
When I check variable "points" with trace(); it shows correctly.
Anyone got the same problem and know how to solve it?

This should fix your problem:
point_txt.text = String(points);
point_txt.width = point_txt.textWidth;
Cheers!

Change from the Properties panel Behavior: Single line

Related

xcode swift Thread 1: signal SIGABRT/display url data from retrieved website info

I have 2 questions.
1. I keep getting signal SIGABRT and I don't know the issue. There questions didn't help. Project below!
2. When I get data from a website(mine) how would I display it in my table? Thanks.
Download: https://ufile.io/2sso0
The issue you get is when something isn't hooked up properly, like an outlet. Do you have some sort of outlet that you're not 100% sure works? If so, delete and add it again. Also something that I do a lot when I get this issue is to right click(two finger click) on the yellow circle on your view controller. Then if there's a yellow triangle, I click on the x and delete it. That fixes it for me.

VS 2015 Razor Autocomplete/Intellisense dropdown hides immediately after dropdown

In VS 2015, only when in Razor (.cshtml) files, roughly half of the time the autocomplete/suggestion list/intellisense doesn't work correctly (sorry, not sure the actual term... when you type an object and hit . and the list of properties and methods shows to select from)
The behavior is that when I hit ., the list popups up for a fraction of a second and then closes. It happens so fast I try to do a quick Backspace, ., Backspace, . cycle a few times to at least see the name I need, but I usually cant' get it and end up having to find the exact name elsewhere from code. Extremely irritating...
It happens sporadically with no real pattern I can find. Here's patterns that I've ruled out:
The file that's open doesn't seem to matter.
Whether or not I close/reopen the file doesn't seem to matter
Whether I navigate to another file and back doesn't seem to matter
It will work/not work multiple times on and off throughout the same file
It doesn't seem to be relevant to any particular object/property/method
I've checked all my options (there doesn't seem to be Text Editing options for Razor?), have tried clearing caches, the reloading solution/projects, restarting VS, all of which seem to still provide no pattern.
Has anyone come across this and have any ideas of where else I can look to fix it?
Example
Here's an extremely simple example... new project, very little code/files, very simple view. Where the Model. stops, I should have the usual base methods, and an 'Items' collection. It pops up for a split second then disappears... no lambdas/complex view parsing involved (this is reproducible as well):
Update: Patterns
Things I've noticed:
If I'm entering a #model ns.ns.ns.type, it rarely happens toward the "base" end of the namespaces. It's as I get further towards the type that it happens. This one is intermittent.
In some cases, it works perfectly fine, every single time. For example, I often use DevExpress tools, and have never seen the behavior on any of their extensions (so, #Html.DevExpress(). (and other similar, not necessarily DevEx models) will never cause a problem)
It happens almost all the time when I'm accessing my #Model (which is where I most want it!). I've found some cases where this is reproducible every time (see above example), but it's about 90%+
Occasionally, as I work through the object tree, one will fail while the next works (ex: #models ProjName.Web.App.Subscriptions.Models.AccountCreateVM... it might fail on Subscriptions but work fine on Models)
Occasionally, beginning to type the name within autocomplete kicks it back into gear and it starts working again. In the above example, starting to type Acc for AccountCreateVM causes it to start working again.
I haven't found the root cause, but in all cases, CTRL+SPACE works. This isn't the best, but light years better than nothing at all.
(this shortcut is not one I've used in the past, so this is likely standard behavior, but...) If you're at the dot Model. and autocomplete list disappears, CTRL+SPACE consistently brings it back up, and when it does come back, it stays! If there's only one possible autocomplete member, it'll auto-fill the member for you upon CTRL+SPACE
This happens for me all throughout VS2015 during lambda statements.
It happens when editing code "mid-document", as in, if there is anything besides a ) or } following where I'm typing. VS appears to be struggling to tell where the current statement ends & the next statement begins.
The following code will consistently fail to trigger Intellisense at the period, even when explicitly invoked.
var subset = initialSet.Where(x => x.
var result = new Whatever();
In Razor, it is very common to be editing code between existing text and using lambda statements:
<strong>#Html.DisplayFor(m => m.</strong>
This is probably why you only experience this in Razor.
The way I work around this bug is just to write the ) to close the method.
var subset = initialSet.Where(x => x.)
var result = new Whatever();
<strong>#Html.DisplayFor(m => m.)</strong>
Intellisense can then be triggered on the period.
If you're using a method that requires a minimum of more than just the lambda (like RadioButtonFor), you'll also need to put in a comma for each of the extra parameters.
<strong>#Html.RadioButtonFor(m => m.,)</strong>
If Intellisense is appearing, but immediately disappearing again, the best solution I've found so far is to just type a few letters of any known member, then using Ctrl-Left to skip back to the period, and trigger Intellisense again (Ctrl-Space or backspace-retype). This usually gets it to appear and stay. You'll have to delete the characters you typed afterwards, which can be frustrating.
Just make sure the ) does not touch the text you are editing, and the popup will stay up.
Instead of...
#Html.Partial("ManageGrid", Model.)
Use...
#Html.Partial("ManageGrid", Model. )
The intellisense seems to get confused by touching close parenthesis. Not ideal, but this was the only way I could get it to work for me consistently.
In my specific case, i was able to solve the problem by installing the latest version Microsoft ASP.NET and Web Tools.
https://marketplace.visualstudio.com/items?itemName=JacquesEloff.MicrosoftASPNETandWebTools-9689
Once I installed it, the problem was gone. It is likely that this update fixed something that could be fixed with an older version, but either way I'm happy.
(I found this in Visual Studio under Tools->Extensions and Updates...->Updates->Visual Studio Gallery)
I had the same error and I fixed it by deleting all the files of the component model cache.
This is the path:
Users\YourName\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache
Hope that helps
I use ctrl+j as a temporary solution when I know the content.
Or keep writing without right parenthesis can use the completion:
#Html.LabelFor(m => m.Name
Whenever this annoying thing happens to me, I just put an extra dot and then it works. I have to put the extra dot every time. For example, if I write this and intellisence flashes and disappears:
#Html.TextBoxFor(m => m.
then I just do this:
#Html.TextBoxFor(m => m..
And intellisense will now show after first dot. I have made this a habit until MS has a fix for it.
Instead of...
#Html.Partial("ManageGrid", Model.)
Use...
#Html.Partial("ManageGrid", Model.

Flex 4 ColorPicker not editable

I've got an application with several ColorPickers in them - they're just used as-is, no data provider-derived colours or anything - with editable = true. However, the textfield used to display/input the hex code for the selected colour is greyed out and uneditable. I can't find any help for this, only a plethora of tutorials telling me to set editable as true, which obviously doesn't work.
Have also tried binding to data array of colours, but this does nothing except stop the field from being greyed out (though no text appears or can be edited inside it).
Does anyone know how I can stop this happening? Thanks in advance.
It works for me just fine in Flex 3.6A and 4.6.0. Is there maybe something else your doing that is non standard? What theme are you using? Can you produce a test case that demonstrates the issue? (PS: sorry, I can't add comments yet)
Works for me with Flex 4.10.0 (can edit the text field):
<mx:ColorPicker id="_bgPicker" showTextField="true" />
Appears a dodgy font (set as the default for the entire application) was not showing up in the hex panel - forcing it to Arial did the trick. Probably more a result of the crazy set of fonts we have to use than anything but worth doing if anyone else gets a problem like this!

For the life of me I cant get the input to accept anything in the Game Of Darts tutorial for adding stuff to the dom

I have been researching for a while, At first my own code would not work so I tried the one provided and still when I try to enter a item into the list, nothing happens. No text is added or deleted and it is like the enter key does nothing. I found similar problems but nothing using dart.
Browser dependency needed to be updated... QQ Works now

ssrs 2008 extra page at end - checked usual suspects - how to find cause?

I can't seem to figure out what i'm doing wrong here...thought I might be overlooking something not common as the cause for this so I decided to post a thread.
Report is set for 8.5 x 11 with .25" margins on all sides
Body is 7.89 x 2.90 with all padding set to 0 for report items.
I use a footer but it is the correct width.
I use a hidden detail row that expands from my normal detail row, but the overall width is still less than 8".
I attempted to make a new report and copy the reportitems over so that if I had made a configuration issue I might find it. But the new report behaves the same as the original one I did.
ConsumeContainerWhitespace is True. The tablix on my report is the only item that can page break after and that option is unchecked.
I changed my footer to not appear on last page and it still leaves a blank page for me.
Any thoughts?
I know it may sound funny..but i have tried this many times whenever I got some issue like this..and I resolved the issue..
sometimes the report object may extend in length by very small inch..and you cant find out that..
What you can try is:--Give some background color to the object such as tablix and then render the report in some format like PDF..if its length giving you next page then the some part of color you can see on that next(blank) page..from that you can get idea about the size of perticular report item which is causing the issue.
I hope this will help you..
I had to throw out the current copy of this report and recreate it. 2nd time through I didn't get the extra space causing the extra page. I wish I could have figured out what caused it because the hand grenade approach is not the one I always like to take.